Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

ASA Viva

Download as pdf or txt
Download as pdf or txt
You are on page 1of 37

PL/SQL Libraries

.PL/SQL Library is a collection of program units that include functions, procaduras e It


maintains standardization across forms.

PL/SQL has extension .pll and compiled into .plx as executable file.

Object Libraries

Object Library are created with common objects to maintain standards across the forms.
Oracle Forms Builder allows the creation of Object Library that stores objects in a collection

o Alerts

o Blocks

o Canvases

o Property Class

Visual Attributes

o Windows

Database Objects

SQL Plus, Oracle's interactive tool, allows to create objects like Stored Procedures,
Functions, and Database Objects are used to create these objects through Forms Builder.

1.What are the Oracle forms services components include?

Oracle forms consist of

Client: Client sends the HTTP requests

Forms Listener Servlet: It start, stop and communicate with the Forms Runtime Process
Forms Runtime Process: It executes the code contained in a particular forms application

Database The data fetched from the database

2. Explain what is the difference between CALL FORM, NEW FORM and OPEN_FORM? .
CALL FORM: It starts a new form and pass control to it
New FORM: It terminates the current form and replace it with the indicated new form

OPEN FORM: It opens the indicated new form without replacing or suspending the parent
form

3. Mention what is the sequence of firing triggers in forms?


The sequence of firing triggers in forms, when forms open is

Pre-form

Pre-block

Pre-recorded

Pre-text-item

Canvas

• Canvas is a layer within a window where the visual objects like interface items or graphics
items such as hd sex, p check box, radio buttons

Content canvas (default canvas)


Tab canvas
Toolbar canvas ( Horizontal and Vertical) Stacked canvas

Window

• The object specifies the windows in which the canvas object is displayed at runtime.

Model Window-Requires an end user to dismiss the window before any other user
interaction can continue

Modeless Window-Requires no user interaction

Visual Attributes

Visual Attributes are the font, color and pattern characteristics of objects that operators in
our application .
You can programmatically change an object's named visual attribute setting to change the
foot, coier, and pattern of the .object at runtime.

Eg using SET CANVAS VisualAttributeName'); PROPERTY, Set Item Property


("Blockname.Itemname,VISUAL ATTRIBUTE,'VisualAttributeName ');

1.Oracle Forms

a. Oracle Forms is a component of Oracle Developer Suite.


b. Oracle Forms are the user interfaces that are developed to present the data to the user
c. The data can be presented once retrieved from the Oracle database.
d. Form can be integrated with web services or java. e. Forms has extension .fmb and
compiled into .fmx as executable file.
f. Created either by wizard or manually.

Oracle Forms include

a. Forms Developer: It helps in the development and compilation of Oracle Forms.

b. Forms Services. It is considered for the deployment of Forms.

Oracle Forms Developer consists

a Farms Builder

b. Forms Compiler

C Forms Runtime

Oracle Form Services is a three-tier application.

a.At the client level, HTTP requests will be sent by a client to the system.
b. This request will be received by the Forms Listener Servlet at the Server and it will initiate
Forms Runtime pres
c. This process will send the request to the Database to retrieve the information and send it
back to the cent

2.Oracle Forms Component

Form Module

Forms are primary objects created using Form Builder

Menu

A menu module a hierarchically structured object

Menu are created through the menu module are independent forms

They are reused in multiple forms

Menu has extension, minib and compiled into mins as executable file •
Properties use for Menu ale GET MENU ITEM PROPERTY and SET MENU ITEM
PROPERTY.

3. Mention what is the sequence of firing triggers in forms?

The sequence of firing triggers in forms, when forms open is


• Pre-form Pre-block
Pre-recorded
Pre-text-item
When-new-form-instance
When-new-block-instance When-new-record-instance When-new-item-instance

4. In Oracle Forms Report, what is the maximum length of Record group Column?

What are the different types of Record Groups?


The maximum length of Record group column names cannot exceed 30 characters. Different
types of Record Groups include

Query Record Groups


State Record Groups
NonQuery Record Groups

Layout Editor
It is the editor where the objects like text item
,radio buttons, push buttons etc. are placed on the form.

Blocks

Block works as a logical container for various items on the form.

Data Block: Data Block is a block which connects to the database.

Control Block Control Block is a block which is not connected to the database

Items

Base-Table Items are text items that correspond to Database Columns, Form creates them
automatically.
Control-items can be buttons, Check box, radio buttons, display items etc

Frames

Use the frame control to visually group a set of controls on a page.

Canvas

Canvas is a layer within a window where the visual objects like interface items of graphics
items such as text box,Check box,radio buttons.

16. How many maximum numbers of radio buttons can you assign to a radio group?

Unlimited no of radio buttons can be assigned to a radio group


17. Can you change the default value of the radio button group at run time?

No.

18. What triggers are associated with the radio group?

Only when-radio-changed trigger associated with radio group.

19. What are the types of visual attributes?

Common
Prompt
Title

20.How to change Visual Attribute at Runtime

You can programmatically change an objects named visual attribute setting to change the
font color and putten of the object.

Different Data Items in Forms

a.Test Item

Text items are used for displaying data values used for editing or entering purpose.

b.Display Item

Display items are similar to text items but store only fetched or assigned values. Display
Items cannot be edited, be queried, be navigated to, accept user inputs.

c.List Item

It is a list of text elements.

a Poplist - The poplist style list item appears initially as a single field. When the end user
selects the stof available choices appears.

Thist -The Tlist style list item appears as a rectangular box, which displays a fixed number of
When the e contains values that cannot be displayed (due to the displayable area of the
item), a vertical sobur appr

Combo Box- The combo box style list item combines the features found in poplists and text
est de f values and can accept a user entered value.

12. Can a single canvas have multiple windows?


No, in a window we have more than one canvas.

13. Can a calculated item be stored in a database?

No

14 While specifying master/detail relationship between two blocks specifying the join
condition is a must?

True

15. Name the different triggers which are associated with Oracle forms having a master
detail relationship Below triggers are created when the master-detail block is created

ON CHECK-DELETE-MASTER
ON-CLEAR-DETAILS ON-POPULATE-DETAILS

20 How to change Visual Attribute at Runtime

You can programmatically change an objects named visual attribute setting to change the
font, color, and pattem of the object at runtime Eging SET CANVAS PROPERTY, Set Item
Property (Blockname Remname VISUAL ATTRIBUTE VisualAttributeName Where
VisualAttributeName is either the name of a visual attribute you've set up in the form (which
has foreground background fort ent) of a the name of a logical visual attribute from the
resource file.

21. How many types of canvas are there in a form?

There are 5 types are canvas are there in form

a)Content Canvas
b)Stacked Canvas
a)Horizontal Tool Bar
b)Vertical Toll Bar
c) Tab canvas

8. Explain can you convert or reverse engineer a FMX back to a FMB file?
It is not possible to convert or reverse engineer a FMX back to a PMB files to ensure they
are not lost

9. Is it possible to execute a dynamic SQL from forms?

Yes, it is possible to execute a dynamic SQL from forms by using the FORMS ODL built in or
by calling the DBNS SOL database package from forms

10 Committed block sometimes refer to a BASE TABLE? True or False

False
11 Can we create two blocks with the same name in form?

No

12. Can a single canvas have multiple windows?

No,in a window we have more than one canvas.

13.Can a calculated itembe stored in a database?

No

25. What is trigger associated with the timer?

When-timer-expired.

26. What is the difference between the following statements?

Form A: Insert into emp(ename) values ("Tom");

Form B: FORMS_DDL('insert into emp(ename) values(""Tom')':

User have to con t the form manually for Form A Once the Form B statement executes, it will
be implicitly committed.

27: What are the different modals of windows?

Modalless windows
Modal windows

28. Can forms FMX be moved from one operating system to another?

No, FMX files are operating system dependent.

5. What are Record groups?


Query Record Group-A query record group is associated to SELECT statement and can be
created or updated during d or execution,

Non-Query Record Group-While a non-query record group is not associated with any query
and hence it can be updated during execution only.

Static Record Group The static record group is again not associated with any query and can
be created or updated during the design phase only.

6 If you have property class attached to an item and you have same trigger written for the
item. Which will fire first?
Item level trigger fires, if item level trigger fires, property level trigger won't fire.

Triggers at the lowest level are always given the first preference. The item level trigger fires
first and then the Form level trigger

7. How do Blocks relate to each other

The relationship between block represent the relationships of an ER schema.

It can also represent relationship between tables in the relational data model based on
foreign keys

It can specify a "join condition between a "master" and "detai blocks.

8.What is call form stack?

• When successive forms are loaded via the CALL FORM procedure, the resulting module
hierarchy is known at the call form stack.

Thanks and Regards,


Peenaaz

Alerts

Window that displays message where the user must choose a response .

Three buttons

STOP

CAUTION

INFORMATION

Use Show Alert build in function

Editors

. A text editor dialog box for entering lines of text into text items.

Parameter

Used as a form variable to pass values from one form to another form

3. Different Data Items in Forms


a Text Item

Text items are used for displaying data values used for editing or entering purpose

31 What is Query all records'?

Usually set to No This means that the block will initially query only the no of rows set in the
query amay size property This may

Yes to calculate the summary val

32 What are the different types of modules in Orade forms?

following are the different modules in Oracle form

Form module

Menu module

P/SQL Library module

Object Library module

28. Can forms FMX be moved from one operating system to another?

No, FMX files are operating system dependent.

29. What is the difference between a POST-FIELD trigger and a POST-CHANGE trigger?

Post-field trigger fires whenever the control leaving from the field.

Post-change trigger fires at the time of execute-query procedure invoked or filed validation
status changed

30. Can you execute a DDL statements from Oracle Forms?

No. DDL (Data Definition Language) commands like CREATE. DROP and ALTER are not
directly supported

31. What is Query all records

Usually set to No. This means that the block will initially query only the no of rows set in the
query array

Yes to calculate the summary val


22. How many types of Master and Detail relationships are there in Oracle Forms?

The various Master and Detail Relationships in oracle forms are:

a) Nonisolated - The Master cannot be deleted when a child is existing


b) Isolated The Master can be deleted when the child is existing
c) Cascading The child gets deleted when the Master is deleted.

23. What are the types Blocks in Oracle Forms?

Base Table block-based on database table/views

Control Block-non-database items are placed here like Calculation values, buttons,
checkbox etc.

24. What is use of custom library?

Custom pill is used to implement any new plan code that you would need to write in
customizing fams

25, What is trigger associated with the timer?

When timer-expired

Program units

• Program units can be incorporated into your Oracle Application Express application as a
PL/SQL package, page process computation or validation.

Toolbar

The toolbar is positioned along the top of the Form Builder

Object Navigator

The navigator shows a hierarchical view of object in the form.


The object navigator provides a central location to access and modify all the objects in your
form.

Property Palette

This window helps you to enable and access properties of the currently selected in object
navigator.

PL/SQL Editor
PL/SQL enables to create and edit PL/SQL program units (Triggers, Formula, Summary)

The code needs to be compiled separately,

h. VBX control

A custom control that simplifies the building and enhancing of user interfaces.

i Chart item

A bordered rectangle of any size that can display a chart or other display generated by
Oracle Graphics. Operators cann navigate to or manipulate chart items.

4. What is LOV?

LOV is a list of values populated in a pop-up window and is displayed to the end-user for
selection. These values can be assigned and invoked statically or dynamically in LOV.

If any of the LOV values match the text item, then validation succeeds and LOV will not be
displayed if the stie dins match, LOV will be displayed and a search will happen based on
the test item.
To open LOV-CTRL+L

5.Mention what the "LOV of Validation property of an item? Mention what is the difference
between lov and list item?
When LOV for validation is set to True Orade Forms compares the current value of the text
item to the values in the first un dipention be

LOV

LOV is a property whereas list item is an item

A list item can only have one column while lov can have one or more columns

6. Explain how can you une the same LOV for 2 columns

We can use the same LOV for 2 columns by passing the return values in global values and
using the global values and using the global values in the code.

7. Explain how one can iterate through items and records in a specified block?

To iterate through tems and records in a specified lock one can une NEAT FIELD to rate
thought in a pick and NEXT, AIGORD erate through records in a block

8.Explain can you convert or reverse engineer a FMX back to a FMB file?
It is not possible to convert or reverse engineer a FMX back to a FMB file, to ensure they are
not lost.

d. Push button

A push button is a item used for initiating some action. It has a text label or icon.

e. Image

• A bordered rectangle of any size that can display images fetched from the database or
read in from the file system

f. Radio

Radio groups display a fixed no of options that are mutually exclusive.

User can select one out of n number of options.

Unlimited no of radio buttons can be assigned to a radio group

g. OLE container
An area that stores and displays an OLE object that is created from an OLE server
application

h.VRX control

Acustom tred that simplifies the building and enhancing of user interfaces.
SQL
The PL/SQL debugger in SQL Developer supplies many commands to control program execution
including Step Into, Step Over, Step Out, Run to Cursor, Pause, Resume, and Terminate.

A database is part of a larger information system that is used to manage the resources of an
organization.

Data modeling is the process of designing database structures to represent real-world activities
and objects. This is a key part of software development process

Data modeling is the analysis of data objects that are used in a business or other context and
the identification of the relationships among these data objects

Data modeling is a collection of techniques and approaches that defines and models the
application's information requirements. These requirements include identifying information
types, their relationship to other information, and their associated business rules.

Data Modeling Roles:


1. Designing the applications which will meet your data processing needs.
2. Identifying data structures for the database
3. Implementing the database design on a software platform

Objectives of Data Modeling:


+ Represent all the entities of business for efficient storage, update and retrieval of data
* Represent other business functions like data warehouse, archiving
* Database designed to be fully scalable and adaptable to new requirements
* Database should meet security standards
* Database should meet regulatory standards like HIPAA

Types or Levels of Data Modeling:


* Conceptual Data Model
+ Logical Data Model
+ Physical Data Model

Conceptual Data Model


A conceptual data model is a straw-man data architecture that translates and communicates
the application's data requirements into data specific subject areas. It provides a basis for
estimating the downstream data-related activities such as database design and data
conversion.
Types or Levels of Data Modeling
+ Includes the important entities and the relationships among them.
+ No attribute is specified.
+ No primary key is specified.
Logical Data Model
Transform the conceptual data model created during application analysis into logical
entities/attributes and the relationships between those entities and attributes.
Features of logical data model include:
Includes all entities and relationships among them.
All attributes for each entity are specified.
The primary key for each entity specified.

Physical Data Model


Physical design is a blueprint for how to store data on a particular system. It defines the
database structure in terms of tables, columns and indexes. The design concern is to modify
database design to optimize performance of the database.
Features of physical data model include:
* Specification of all tables and columns.
+ Foreign keys are used to identify relationships between tables.
+ Denormalization may occur based on user requirements.

SET operators are used to work on multiple tables and return information that is:
+ Common as well as unique in all the tables.
+ Common in all the tables.
+ Unique in the table.
There are three sets of operators:
+ UNION/UNION ALL
+ INTERSECT
- MINUS

UNION/UNION ALL
The UNION operator is used to combine the result of two or more SELECT statements into
one result SET.

INTERSECT
The INTERSECT operator returns only rows that are common in all the tables.

MINUS
The MINUS operators return only rows that are unique in the first table.

Views
+ A view is a representation of data from one or more tables.
+ It is created through a query that uses one or more tables.
+ Tables used to create views are called base tables.
+ Data in a view is dependent on these base tables.
+ To restrict data access by providing an additional level of security for the columns and rows of
the base table.
Types of Views:
Simple View Complex Views
Based on only one table. Based on one or more tables.
Does not contain functions or group data. Contains functions and grouped data.
DML operations are possible through a simple DML operations are not always possible
through view. complex views.

* USER_VIEWS data dictionary tables contain details of the view.


* USER_OBJECTS maintains information on database objects

Sequence
+ In Oracle, a sequence is an object used to generate a number sequence.
+ tis used to create unique numbers that can be used as primary keys.

In Oracle, a pseudo column is an item that is not a table column but acts like one.
Users can only select values from a pseudo column. Values cannot be inserted, updated, or
deleted from a pseudo column.
The two pseudo columns used with sequence are:
+ CURRVAL: This pseudo column returns the current value of the sequence.
+ NEXTVAL: This pseudo column returns the next value of the sequence.

Index
An index is a database object that speeds up the data retrieval process.

Some characteristics of an index are provided below:


* Itis independent of the data from the associated table i.e., the Index doesn’t reside in the
table.
* It reduces disk I/O by locating data quickly.

Disadvantages of Using Index


+ {t occupies storage or disk space on the server.
« Every time an INSERT or DELETE operation is executed on a table, an update of each INDEX
related to that table is
created on the server. This takes up more space and time.

Synonym
Synonyms are created for tables that are in another schema for making their access easier.

Subqueries
Sub-queries are also called ‘nested queries’
This means that one SELECT statement can be placed inside another.
They allow users to group multiple SELECT statements together.
The Inner Query needs to be enclosed within brackets
There are 2 types of sub-queries:
Independent or Non-correlated sub-queries
A sub-query is also called an inner query.
The query that is placed before the inner query is called the ‘outer query’ or ‘parent query.’
In independent sub-queries:
The inner query is executed independent of the outer query.
The inner query executes only once.
The inner query is executed first, and the results replace the inner SELECT statement.
The outer query executes based on the results provided by the inner query.

Dependent or Correlated sub-queries


A correlated sub-query references the outer query.
For correlated sub-queries:
+ The inner query is dependent upon the outer query.
+ The outer query is executed first and then the inner query gets executed.

Joins
+ Joins are normally used to retrieve data from more than one table.
+ The keyword JOIN joins one or more tables together in a results set.
+ To perform a join, ideally there must be a common key that defines how the rows in the table
correspond to each other.
The different types of joins are:
* Cartesian Join
+ Inner Join
+ Outer Join (Left Outer Join, Right Outer Join, Full Outer Join)
+ Self Join

Cartesian Join
+ A Cartesian Join is also known as Cross Join.
+ If there are two tables, then the Cartesian Join is obtained when every row of one table is
joined to a row in another table.
+ A Cartesian Join is time consuming and taxing on the database

Inner Join (Equijoin)


The Inner Join joins two or more tables, returning only matched rows.
It requires that both tables involved in the join must have a primary-foreign key relationship.

Self Join
A Self Join is a query in which a table is joined (compared) to itself.
It is used to compare values in a column, with other values in the same column in the same
table.
Self Joins are also very useful in conjunction with sub-queries.
PL/SQL
PL/SQL is a Procedural Language.
+ It is an extension to SQL with design features of programming language fundamentals,
constructs, and implementation.
+ It is a procedural language developed by the Oracle Corporation for the purpose of handling
relational databases.
+ The features supported by PL/SQL are:
- Data encapsulation
- Data abstraction
- Exception handling
- Object-orientation
+ It allows a block-structured and procedural unit of code to execute different categories of SQL
Statements
PL/SQL Architecture
+ There are two environments in which PL/SQL can reside. They are:
The Oracle Server
The Oracle Tools
+ These two environments are independent.
Benefits of PL/SQL
+ Support for SQL
+ Full Portability
+ Better Performance
+ Integration with SQL
* Exception Handling
PL/SQL: Block Structure
A PL/SQL block consists of:
an optional declaration section.
an execution section.
one or more optional exception handler sections.
+ The declaration section declares PL/SQL variables, exceptions, and cursors.

Types of PL/SQL Blocks


Anonymous Block
« Anonymous blocks are those blocks that lack a local PL/SQL engine at run time.
* These blocks are sent to the Oracle server for processing where they are compiled and
executed.

Named Block
* Named blocks are those blocks in which subprograms, such as packages and procedures are
compiled and stored.
+ These blocks stay permanently in the Oracle database; they can be used when required.
PL/SQL Data Types
+ PL/SQL supports a variety of data types, which may be used for declaring variables and
constants.
+ PL/SQL provides support for various data types, such as:
+ Scalar
+ Large Objects (LOB)
+ Composite
PL/SQL Data Types — Scalar Data Types
+ Scalar data types are atomic and can only store single values.
+ These data types do not have any internal components.

Char CHAR (size) This is used for store fixed length character data. The maximum
size is 2000 bytes.
varchar2 VARCHAR2 (size) This is used to store variable length character data. The maximum
size is 4000 bytes.
Date DATE Used for specifying dates.
Number NUMBER Used to specify numeric data

Number (Precision)
or Number (Precision, scale) The maximum values of precision is 38.
Integer INTEGER It is similar to that of number data type, but without the decimal
digit.
Boolean Boolean This is used to store logical values, such as TRUE, FALSE, NULL. It
does not take any parameters.
PL/SQL Data Types - Large Objects
* An LOB (Large Object) is a data type that is used to store large, unstructured data.
+ Unstructured data, such as multimedia data can be thousands of times larger than any
structured data.
* Multimedia data may reside on different Operating System (OS) files that may need to be
accessed from a database.
PL/SQL Data Types - Composite Data Types
+ Collections are also known as Composite Data Types. They have internal components, and
they can also be manipulated
unlike the elements of an array, table.
+ Composite data types in Oracle include:
- Record
- Table
- Nested Table
- VARRAY
 The assignments are legal in the executable and exception handling sections of a block.
A value can be assigned or reassigned to a variable in the DECLARE section of the block.
A variable is used to receive a new value through the assignment operator.
 An expression is a sequence of variables or literals separated by operators.

Scope and Visibility


+ The visibility of a variable is that portion of the program where the variable can be accessed
without having to qualify the reference.
+ The scope of a variable lies between the variable declaration, and the end of the block.

Bind Variables
+ Bind variables are also called non-PL/SQL variables.
* These variables are declared in the ‘host’ environment, such as SQL *Plus.
* They can be referenced in PL/SQL statements, by prefixing the variable by a colon inside a
PL/SQL block.

PL/SQL Collections
* Collections are also called Composite Data Types.
+ They are similar to one-dimensional arrays.
* Elements in collection are referred by unique index value.
* Collections are classified into two types:
- PL/SQL Record
- PL/SQL Collection
INDEX BY Table
Nested Table
VARRAY

PL/SQL Record
* PL/SQL record is a composite typed data structure.
* It is a data structure which is composed of fields.
* Individual component values can be accessed.
The three types of records are...
Table-based
Cursor-based
Programmer-defined

Benefits of Using PL/SQL Records

Data Abstraction Helps present only the essential details.


Aggregate Operations Helps perform operations
Leaner-Cleaner Code Helps write more understandable code.
Varrays
« A Varray is a Variable-size Array.
« Varray will store its elements in the same order as it get added.
- Itis used for holding a fixed number of elements.
- We can change the number of elements at runtime.
« The elements will be accessible by index.
« We need to initialize Varray before using it.

Nested table is a unbounded collection.


* They are like a Varray and don’t require a size specification.
* They can also be be used for SQL operations.

EXTEND Increases size of the collection by one or a number specified, i.e. EXTEND(n) but can't
be used on Associative Array.
TRIM Removes an element at the end position

Cursors are the PL/SQL construct that allow users to name these work areas, and to access their
stored information. They act as pointers to the context area.
To write and run SQL statements and store processed information, the Oracle server uses a
work area called context areas or private SQL areas.

Types of Cursors
Implicit Static Cursor Explicit Static Cursor
Implicit Static Cursors are implicitly Explicit Static Cursors are declared and
declared for all DML and PL/SQL named by the programmer. They are used
SELECT statements that return a for processing queries that return more
single row. than one row.
“The user has all rights (Open, Fetch, and
Close), and access to information in the
database.

Cursor Operations
PARSE EXECUTE
BIND FETCH
OPEN CLOSE

Implicit Cursor Attributes


+ Cursor attributes can be used to get information about the most recently executed SQL
statement.
* Implicit cursor attributes are:
=> %FOUND
=> %NOTFOUND
=> %ISOPEN
=>%ROW COUNT
Explicit Cursor Attributes
* Explicit cursor manipulation happens through the DECLARE, OPEN, FETCH, and CLOSE
statements.

The FETCH cursor operation places the contents of the current row into local variables. To
retrieve all rows in a result set, each row needs to be fetched.

REF Cursors are also known as Cursor Variables. They act as references to cursor objects.
Advantages of Cursor Variables are:
* Cursor Variables can point to multiple queries.
* They can be passed as parameters between application layers and between server side
components.
« They are used to reduce client-server network traffic, by allowing several cursors to be
opened on the server in a single round trip.
¢ Memory is released when the variable goes out of scope.

The BULK COLLECT in a cursor bulk-binds entire columns of Oracle data, so that all the rows of
the result set can be fetched at once.
It can be used with SELECT INTO, FETCH INTO, and RETURNING INTO clauses.
BULK COLLECT can be used in server-side programs such as procedures, functions, packages.
However, they cannot be used in client-side programs (like application programs).

PL/SQL Exceptions
- An exception is a run-time error or warning condition.
These are some characteristics of exceptions:
- Exceptions handle run-time errors, rather than compile time errors.
- Errors encountered during compilation time are detected by the PL/SQL engine and reported
back to the user.
- Exceptions encountered during run-time are handled by the exception handlers defined in the
PL/SQL block.

Exceptions that have been raised are handled by separate routines called exception handlers.

Types of Exceptions
a Pre-defined PL/SQL Exceptions
a User Defined Exceptions
a Non-Pre-defined Exceptions

Pre-defined Exceptions
+ Oracle has several Pre-defined exceptions that correspond to the most common Oracle
errors.
+ These are internally defined by the run-time system.
+ They are raised implicitly.
User Defined Exceptions
+ User defined exceptions are declared and defined by the program.
+ These exceptions must be declared by introducing the name followed by the keyword

Non-Predefined Exceptions
+ Non-Predefined Exceptions are Oracle errors that do not have a defined name.
- E.g. Oracle error number -2292, an integrity constraint violation error, does not have
exception name.
* To handle such unnamed exceptions, EXCEPTION_INIT pragma handler is used. This pragma
must be in a declarative section.

PRAGMA is a compiler directive that allows developers to associate the exception name with
an Oracle error number.

Exception Propagation
* Exceptions cannot be declared twice in the same block, but it is possible to declare the same
exception in two different blocks.
* Exceptions declared in a block are local to that block and are global to its sub-block.

Using RAISE APPLICATION ERROR


+ |t only raises the exception, but does not handle it.
* tis a pre-defined procedure of the DBMS_STANDARD package.
+ It allows you to create user-defined error messages along with the error numbers.
« The error numbers can range between -20000 and -20994.

Subprograms
* Subprograms are named PL/SQL blocks that accept parameters and are invoked whenever
required.
« PL/SQL subprograms can be stored in the database as stored programs (e.g., procedures and
functions).
« They avoid re-parsing, when invoked by multiple users.
* Since they allowing access to the subprograms, and not to the database objects directly, they
provide security and integrity control.

Types of Subprograms
Procedures usually perform an action.
Functions perform an action and return a value.

Advantages of Subprograms:
* Extensibility: Subprograms allow tailoring of the PL/SQL language to suit their needs
* Modularity: Subprograms allow the user to segment a program down into manageable, well-
defined, and logical modules.
* Reusability and Maintainability: Subprograms can be used in multiple applications (they
simplify maintenance and enhancement).
A procedure is a subprogram that performs an action. It can be called from any PL/SQL
program.

Argument modes are used to define the behavior of formal parameters.


Types of argument modes include:
* IN
— This argument mode lets the user pass values to the called subprogram.
* OUT
— This argument mode lets the user return values to the calling block.
* IN OUT
— This argument lets the user pass initial values to the called subprogram and
— returns either the original, unchanged value, or updated value to the calling block.

IN Argument Mode
«Inside the subprogram, the IN parameter functions like a constant. As a result, it cannot be
modified and assigned a
value.
+ IN parameters can be assigned default values. This is also called the default mode.

OUT Argument Mode


* OUT parameters are variables that have not been initialized.
+ They cannot be used to pass values to the procedures.
* The OUT formal parameter can be used as a local variable.

IN OUT Argument Mode


« IN OUT Argument Mode is used to pass the argument as well as return a value to the calling
environment.
+ It acts like an initialized variable.

Functions
« A Function is a subprogram that performs an action and returns a value.
* It is stored as a schema object in the database for repeated execution.
* Functions and Procedures have a similar structure.

Procedures Functions
A procedure does not return any value but A function returns only a single
has OUT and IN OUT parameter to give the value.
output.

It doesn’t contain a RETURN clause in the It contains a RETURN clause in the


header. header.
It can be run by using the keyword EXECUTE. It can be invoked through an
expression.
Packages
Packages are database objects that group logically related PL/SQL objects.
Packages are used to wrap related procedures, functions, associated cursors, and variables
together into a logical unit.

The advantages of packages:


Modularity: Procedures, functions, cursors, and variables are encapsulated in
named PL/SQL modules.
Easier Application Design:
It is not important to compile a package body completely until the application is
complete.
When designing an application, initially the information in the package specification is
required.

Oracle Supplied Packages


Oracle is supplied with product-specific packages, which help build PL/SQL-based applications.
Some key Oracle supplied packages include:
* DBMS OUTPUT Package
— Is used to display the output from PL/SQL blocks and subprograms.
* Put_line
— Is a procedure that outputs the information to a buffer in the SGA.
* SERVEROUTPUT ON in SQL*Plus or procedure ‘put_line’
— They can be used to display information on the screen.

Triggers
+ Triggers are PL/SQL blocks or PL/SQL procedures associated with a table, view, schema, or the
database.
— They are implicitly executed whenever a particular event takes place.
- The event may be a system event or a DML statement being issued against the table.

Features of Trigger
* Triggers include the execution of SQL and PL/SQL statements as a unit.
* Triggers are implicitly executed when an event occurs.
* Triggers are similar to subprograms in the following ways:
- They implement PL/SQL blocks with declarative, executable, and exception-handling sections.
- They can be stored in a database and can invoke other stored procedures.

Benefits of Triggers
* Triggers audit data modifications.
* They log events transparently.
* They enforce complex business rules.
* They implement complex security authorizations.
* They maintain replicated tables.
* They enable building complex updatable views.
Triggers Subprograms
Triggers are defined with CREATE Subprograms are defined with CREATE TRIGGER.

Types of Triggers
Application Triggers
« Execute whenever an event occurs within a particular application.
Database Triggers
« Execute whenever a data event or system event occurs on a schema or database.

Application Triggers
+ Application triggers are executed implicitly when a DML event occurs with respect to an
application (usually a front end application).
* They operate in the Client layer in the client/server architecture.
* Oracle 9i Forms uses Application triggers.

Database triggers are PL/SQL program units that are associated with a specific table or view.
* They operate in Client/Server architecture in the server layer.
+ They are compiled and stored permanently in the database. Hence the name database
triggers.
« They are integrated with middle-tier applications.

Row Level Triggers


+ Row level triggers execute once for each row affected by the triggering event.

Database triggers can be defined based on:


DML statements - INSERT, UPDATE, and DELETE
DDL events - CREATE, DROP, and ALTER
Database operations - SERVERERROR, LOGON, LOGOFF, STARTUP, and SHUTDOWN

Conditional predicates are imaginary tables associated with the trigger to implement an
application.
+ It combines several triggering events into one trigger.
« Conditional predicates, which can be used within the trigger body are:
- INSERTING
- DELETING
- UPDATING

*Data dictionary view is used to view trigger information.


*In dynamic PL/SQL, the entire code constructed at run-time are dynamically compiled and
executed at run-time.
->In PL/SQL, dynamic SQL can be implemented by using:
- Native Dynamic SQL - allows users to execute DDL commands that are not supported.
- Calling procedures in the DBMS_SQL package
Forms
Calling Forms
The form that calls another form is known as a Calling Form.
The form that opens when called is known as a Called Form.
A Form can be opened in two ways:
* Document
+ Dialog
The OPEN_FORM and CALL_FORM procedures are used to open the form from the current
form.
Parameters
Values passed by the Calling Form to the Called Form are stored in special variables that are
accessed by any PL/SQL code.
Variables that hold these values passed from the Calling Form are called Parameters.
3 types of variables:-
1. Global variables
2. System Variables
3. Parameters
*The procedure ADD_PARAMETER is used to add the parameters to the parameter list.
*The space between the window title bar and the canvas is called the Menu Bar.
*The menu items included in the Menu Bar are called Menu Bar Items.

A Master-Detail Form has at least two Data Aware blocks. These Data Aware blocks are related
to each other. The relationship between these blocks is called as Master-Detail Relationship.
To create the Master-Detail Relationship at form level, the following are required:
+ A Master block
* A Detail block
+ A Relation object
* Non-lsolated: A Master record cannot be deleted if associated Detail records exist in the
database.
* Cascading: A Master record can be deleted and any associated Detail records are
automatically deleted from the database.
* Isolated: A Master record can be deleted, but the associated Detail records are not affected.

The type of canvas that can include multiple tab pages is called Tab Canvas.
The type of canvas that resembles a horizontal toolbar is called Horizontal Toolbar Canvas and
the one that resembles a vertical toolbar is called Vertical Toolbar Canvas.

An Object Library is a collection of common Oracle objects that can be used in any form as
required.
Oracle Forms Builder allows the creation of Object Library that stores objects in a collection of
property classes, visual attributes, and triggers.
An Object Library is created to maintain standards across forms.
Advantages of an Object Library:
The Object Library allows global changes to be made to the applications quickly.
It can be used to create standard reusable objects.
It allows to rapidly create applications by using drag-and-drop feature to apply predefined
objects onto the form.

A business rule can be implemented by providing a selection list from which an appropriate
value can be chosen. This method of providing a selection list is called as List of Values or LOV.
List of Values (LOV) is an object that opens itself in a separate window and displays the values
from one or more tables by choosing an appropriate key sequence.

A list item displays a fixed number of elements from which a text element can be selected.
Types of List Items:
A list item is a list of text elements that are displayed in three different styles.
* Poplist: This is a list item that appears initially as a single list item, but expands when the list
item is clicked.
* Tlist: This is a list item appearing in a rectangular box, displaying fixed number of values. A
scroll bar is attached if all values cannot be displayed.
* Combo box: This is a combination of list and text items. This list item displays the lists and
allows the user to enter values to be added in the list.

A PL/SQL library is a collection of program units that include procedures, functions, and
packages independent of the Form Module.
A PL/SQL library is used to maintain standardization across forms.
Library Formats:
The library in .PLL format contains the library source code and the compiled, platform specific
p-code (executable code).
The library in .PLX format is a platform specific executable.

Alerts inform the user or gives a warning for an action that can have undesirable effects.

A Property Class is a named object that contains a list of properties and their values.
Advantages of a Property Class:
-If one or more properties of the data entry field require change, a property class enables all
the other data entry fields on the form to map to this change.
-If each property is individually set, then it will be tedious to maintain the standards in the form.
A property class helps to avoid this.
-To help maintain consistency in the form, Oracle Forms Builder provides a solution of Property
class.
ON-ERROR Triggers
To handle the error in the ON-ERROR trigger, identify the error based on the error number and
error description.
Oracle forms provides in-built functions to capture the type of error, error code, and error
description.
* ERROR_TYPE(): This function is used to capture the type of error.
* ERROR_CODE(): This function is used to capture the error code.
* ERROR_MESSAGE(): This function is used to capture the error message.
Oracle Forms10g is a tool for building client-server database applications.
Oracle Forms10g architecture includes:
Oracle 10g Products
Oracle Forms Services
Forms Services Architecture
Oracle Forms Services is a component of Oracle 10g Application Server.
This component is used to deploy Oracle Forms Developer applications on the Internet.
Forms client is a generic Java applet consisting of a set of Java classes.
+ Forms Servlet is a Java Servlet.
* Forms Servlet dynamically creates an HTML page containing all the information to start the
Forms Session.
* It creates a dynamic HTML file by merging information from the following sources:
- The Forms Web Configuration file
- The Forms Base HTML file
- The Application’s URL parameters
Forms Listener Servlet is a Java Servlet that runs on a Web server. The client applet connects to
Forms Listener Servlet to start the session. It starts an instance of Forms Runtime Engine on
Forms Server.
Forms Runtime Engine is a process that runs on the Application Server.
It is started by Forms Listener Servlet.
It handles all the application logic and executes the code written into the application.
Oracle Forms Developer is a Graphical User Interface (GUI) and is a component of Oracle
Developer Suite.
Oracle Forms Developer is Oracle’s GUI-based forms creation tool that consists of the following:
--- Forms Builder
— Forms Compiler
— Forms Runtime
+ Forms Builder is used to create forms.
* The design and layout of data entry screens is managed through Forms Builder.
* It supports data validation and the creation of PL/SQL code.
« Forms Compiler is required to compile the file created in Forms Builder.
* It creates a binary file that is executed by Forms Runtime.
+ Forms Runtime is used to run the compiled code created by Forms Compiler.
Forms Module — Forms are the primary objects created using Forms Builder.
Menus - The menus are created to increase the user friendliness of the application.
PL/SQL Libraries - PL/SQL Libraries is a collection of PL/SQL procedures and functions that are
stored in a single library file.
Object Libraries - Object Libraries are created when standards need to be maintained across
forms.
Database Objects - Database Objects are used to create these objects through Forms Builder.

The Canvas view acts as a background on which other objects are placed like text box, push
buttons, graphics, and frames.
Blocks act as logical containers for different items that are placed on the form.
Frames are graphic objects appearing on the canvas.
Blocks consist of the objects called Items that act as containers for the actual data.
Object Navigator displays information on each object created and allows you to navigate
through the hierarchy of objects.
Property palette allows the user to view the properties of the object.
Layout Editor is used to place these objects on the form.

- Text items are navigable items used for displaying data values.
- Itis used for editing or entering data.

- Display items are used to display information in which the values are fetched or are assigned
using a program.
- These items are not navigable and hence their contents are not directly editable.

- List items display options from which one value is selected at a time.

- A push button is a rectangle with a text label or an icon graphic attached to it.
- These items are used for initiating some action.

Image Items display images stored in databases or files.


- Images are added to image items using programs. These items are dynamic since the image to
be displayed is changed as required.
- A radio group is a group of two or more radio buttons.
- Only one radio button is active at a time.
- A check box is a text label that displays a checked or unchecked value.

An event that gets executed at a specific moment is called a trigger. Triggers are named and
built-into form items.
* There are three types of triggers:
- Interface triggers
- Navigational triggers
- Smart triggers
Interface Triggers
* Triggers associated with user interface objects are called as Interface triggers.
Interface triggers are further classified into:
- Key triggers
- Action triggers
- Mouse triggers

Navigational Triggers
+ Navigational triggers are executed in response to navigational events.
* These triggers are executed at different levels in the Oracle forms hierarchy like form, block,
record, and item levels.
* Navigational triggers are further classified into:
— Pre- and Post- triggers
--- When-New-Instance triggers

Smart Triggers
* Each object in the Object Navigator has a set of events associated with it.
* Oracle Forms Builder provides a list of pre-defined triggers for the form, block, or specific
item.
* Oracle Forms Builder shows a list of triggers attached to a specific object.
* When triggers are classified on the basis of the object, they are called as Smart Triggers..
Reports
Oracle 10g Report architecture includes:
Oracle 10g Products
Oracle Report Services
Reports Services Architecture
Oracle10g Report Services is a component of Oracle 10g Application Server.
This component is used to deploy Oracle Reports Developer applications on the internet.

The Reports Engine fetches data from the data source, formats the report, sands output
to cache and notifies the Reports Server that the job is ready.
The Reports cache stores the completed jobs.
Reports Server - It processes client requests, including user authentication, scheduling, caching,
and report distribution.
Oracle10g Reports Developer is an enterprise reporting tool. This enables businesses to give
immediate access to information to all levels within and outside of the organization in a
scalable and secure environment.

Benefits of Oracle 10g Developer Suite:


Oracle 10g Developer Suite is optimized for the Oracle 10g Database and Oracle 10g Application
Server.
It provides flexible and scalable solutions for Data Warehousing and Business Intelligence.
It provides a standard Java and XML Integrated Development Environment (IDE) and supports
the full application development lifecycle.
It combines the power of Oracle Application Development tools and Oracle Business
Intelligence tools.

Overview of Oracle Reports Developer


Oracle9i Reports Developer delivers high quality information to users with only an Internet
browser in open Internet document standards.
The goal of Oracle9i Reports Developer is to be the universal publishing solution of choice for
any publishing need within an organization.

Object Navigator: It is a hierarchical browsing and editing interface that enables user to locate
and manipulate application objects quickly and easily.
Data Model: A data model should be defined to specify the data for the report.
Layout Editor: It is used to create the structure and format of the report.
Report Editor: It contains different views to handle the data objects and layout objects for Web
and Paper objects.
Property Inspector: All objects in the module have certain properties. These properties are
viewed in the Property Inspector.
The frames surround the layout objects, which enable control of multiple objects
simultaneously. It ensures that the layout objects maintain their positions relative to
each other in the output.
The repeating frames act as a placeholder for groups. They act as repeating groups and
see ate present rows of data retrieved from the database. Repeating frames repeat as often as
the number of rows retrieved.

The fields act as placeholders for column values. They define the formatting attributes
for all the columns displayed in the report. A field can be placed inside the frame or
repeating frames.
Groups determine the hierarchy of data appearing in the report. They are primarily used to
group columns selected in the query. Oracle report automatically creates groups for each
query.

Boilerplate consists of text and graphics that appear in a report each time it is run. For
example, a label appearing above a column of data is boilerplate text. The graphics
drawn in the layout as well as text added to the layout are called boilerplates.
Summary columns are used for calculating summary information like sum and average.
These columns use a set of predefined Oracle aggregate functions that which can be
applied to data or formula columns. To distinguish the summary columns from the data
columns, the summary column names are generally preceded by CS_.

Data links are used to establish parent-child relationships between queries and groups via
column matching.
Report Editor is a work area in which the objects can be manipulated in the report directly or
by changing properties in the Property Inspector.
The Report Editor window allows user to navigate between different views of the report.
The views are:
* Web Source view
* Paper Design view
* Paper Layout view
* Data Model view
* Paper Parameter Form view
Report Editor’s Views:
Web Source: The Report Editor's Web Source view displays the source code for the JSP-based
Web report, including HTML, JSP, and XML tags.
Paper Design View: The Report Editor's Paper Design view is a work area, in which paper report
can be previewed and manipulate the actual, or live, data at the same time.
Paper Layout View: The Report Editor's Paper Layout view is a work area in which the format of
the paper report can be modified.
Data Model View: The Report Editor's Data Model view is a work area in which data model
objects (queries, groups, formula columns, summary columns, placeholder columns, system
and user parameters, and data links) can be created, defined, and modified to be used in the
report.
Paper Parameter Form View: The Report Editor's Paper Parameter Form view displays the
layout of the Parameter Form that, at runtime, allows user input of parameter values in the
Runtime Parameter Form.
EBS
Enterprise resource planning (ERP) is an enterprise-wide information system designed to
coordinate all the resources, information, and activities of complete business process(es) such
as order fulfillment or billing.
Oracle e-Business Suite is an Enterprise resource planning software package that allows
organizations to manage their business processes.
Examples of é-Business suite product families are:
--Financials, Procurement, CRM, Project Management, Supply Chain Management, Process
Manufacturing, Order Management, Human Resource Management System, Application
Technology, Etc...

Oracle Sub Ledger Accounting (SLA) is accounting hub in Oracle Application.

A server (or service) is a process or group of processes that runs on a single machine and
provides a particular functionality.

Three Tier Architecture:


The client tier in EBS R12 can be a HTML or HTML-based applications and/or a java applet in a
web browser.
The application tier hosts the various servers and service groups that process the business
logic, and manages communication between the desktop tier and the database tier.
The database tier contains the Oracle database server that stores and manages all the data
maintained by Oracle e-Business Suite.

Instance Home is the top-level directory for an Oracle e-Business Suite instance. It is denoted
by the environment variable SINST_TOP.We can share application and technology stack code
among multiple instances using Instance Home.

The APPS schema has access to the complete Oracle e-Business Suite data model,lt is
analogous to the SYSTEM schema, which has access to the entire database.
All data objects for a product are owned by a specific schema for that product, known as the
base product schema.
Navigator window is used to navigate to a form that lets you perform a specific business flaw.
* The Navigator consists of three regions:
Functions, Documents, and Processes.
+ Function tab: displays list of forms that you access for selected responsibility.
+ Documents tab: displays links to documents that you have created.
« Processes tab: provides graphical maps of business processes, allowing you to automate
business flaws across forms.
Menu Bar: Use pull down menus from this menu bar to navigate or perform actions within a
form.
* Window: Area where user interacts with an applications.
+ Window Title: Text that indicate the name of the window.
* MODI Window: Window that contains all windows, toolbars, and application window.
* Tool Tips: iconic button to determine the function of button on the toolbar.
List of values (LOV) provides users an easy access to data. It allows users to choose the
required data from the acceptable list of values.
* LOV Shortcuts
Auto Selection
List Search
Long List Fields
Power lists
Concurrent Request: A request that you submit to run a concurrent program as a concurrent
request.
* Concurrent Manager: A component of concurrent process that monitors and runs tasks
without tying up to computer.
* Stage: A component of a request set used to group requests in the set.
* Request set: A collection of reports or programs that can be submitted as a set.
Oracle Alert provides the flow of information within the organization by letting the user to
create entities called alerts to monitor business information.
It provides the option to notify the information that user needs.
There are two types of alerts:
- Periodic Alert
- Event Alert
Both types are defined by a SOL Select Statement that user specifies.
A periodic alert checks the database for information according to a schedule you define.
An event alert immediately notifies user the activity in the database as it occurs, A database
event determines an insert or an update to a table, and Oracle Alert informs user when it
happens.
Oracle workflow is a management system that integrates all the business processes of an
enterprise and manages business processes conferring to rules that are defined by the
architects.
Workflow provides a complete
- definition,
- automation and
- integration solution for the business process.
The process, called as Workflow Process Definition, include the activities that occur in the
process (like approving a requisition, mailing the requisition etc.) and the relationship between
those activities.
Directory Services are used by the workflow engine and notification engine to determine who
should receive notification and in what format.
Conflicts Domain — It identifies the data where two incompatible programs cannot run
simultaneously.
* Security Group — This option is for HRMS security only. The valid values are Government and
Standard.
* Sequence - Provide the sequence numbers that specify the order in which the program
receives the parameter values.
+ Parameter — lt represents the parameter name.
+ Value Set —Enter the name of the value set respective to the parameter to use for validation.
* Display Size — It represents the length of the parameter in characters.
* Prompt - The name entered in this field will be displayed to the user instead of the parameter
name in the Parameters window of the Submit Requests Window (SRS).
A request group is a collection of concurrent programs that can be assigned to responsibilities.

A function is a part of an Oracle Apps that is registered under a unique name for the purpose of
assigning it to or excluding it from a User’s responsibility which dictates what an user can do.
There are two types of functions:
- A form function (form) invokes an Oracle Forms form.
- Form functions have the unique property that you may navigate to them using the Navigate
window.
- A non-form function (sub-function) is a function executed from within a form (securable
subset of a form's functionality).
- Sub-functions are frequently associated with buttons or other graphical elements on forms.
A menu is a classified organization of the functions (which lead to Forms)
+ Each and every responsibility must be associated with a menu.
+ Menus can have Sub-Menus (A Menu attached to another Menu), Functions associated with
them.
A concurrent program executable links an execution file and the method used to execute it
with a defined concurrent program

The execution method identifies the concurrent program executable type and the execution
method to execute the Oracle Applications.
The following are the different types of execution methods:
* Host
+ Immediate
+ Java Concurrent Program
* Multi Language Function
* Oracle Reports
+ PL/SQL Stored Procedure
* Request Set Stage Function
* Spawned
+ SQL *Loader
* SQL *Plus
* Perl Concurrent Program
A concurrent program is an instance of an execution file along with parameter definitions and
incompatibilities.
* The combination of application name plus program name uniquely identifies concurrent
program.

A consumer group defines a set of users having similar usage requirements. These resource
consumer groups apply to CPU resources only.
Copy to window is to create another copy of the concurrent program using same executable,
request and report information as the current program.

A request group is the collection of requests, request sets, and concurrent programs that a
user, operating under a given responsibility, can select from the Submit Requests window.

Request sets are divided into stages. Each stage contains one or more concurrent requests.

Concurrent Managers are components of Concurrent Processing that monitor and run time-
consuming, non-interactive tasks.

A concurrent program is a set of definitions which describe an executable file or a module (sql
script, plsql script, java code etc.,) that is executed.
* The concurrent program passes the parameters to the executable or module.

Relationship Between Base Product Schema and APPS Schema


The base product schemas contain grants from various tables and sequences to the APPS
schema.
It also has access to grants for synonyms from the APPS schema to the same objects owned by
APPS schema.

Oracle BI Publisher, earlier called as XML Publisher is a template-based publishing tool solution
developed by Oracle. It is delivered with the Oracle E-Business Suite.

RICEFW - Reports, Interfaces, Conversions, Enhancements/Extensions, Forms, Workflow


+ Customizations has to be made to the unchanged oracle implementation system as per the
client requirements will be fall under RICEFW components.

AIM - (Applications Implementation Methodology) is the methodology/Standards/published


guidelines, which oracle suggests its clients to follow while developing RICEFW components for
their business requirements.
AIM defines business needs at the beginning of project and maintains their visibility throughout
the implementation.

CEMLI – Configurations/Customization, Extension, Modification, Localization and Integration.

You might also like