Vous êtes sur la page 1sur 22

{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fmodern\fcharset0 Courier

New;}}
{\*\generator Msftedit 5.41.15.1507;}\viewkind4\uc1\pard\f0\fs40 What are INTEGR
ITY CONSTRAINTS ? \par
INTEGRITY CONSTRAINT is a rule that restricts the range of valid values for a co
lumn, it is placed on a column when the table is created. \par
What is REFERENTIAL INTEGRITY ? \par
REFERENTIAL INTEGRITY is the property that guarantees that values from one colum
n depend on values from another column. This property is enforced through integr
ity constraints. \par
What is a PRIMARY KEY ? \par
The PRIMARY KEY is the column(s) used to uniquely identify each row of a table.
What is a FOREIGN KEY ? \par
A FOREIGN KEY is one or more columns whose values are based on the PRIMARY or CA
NDITATE KEY values from the database. \par
What is a UNIQUE KEY ? \par
A UNIQUE KEY is one or more columns that must be unique for each row of the tabl
e. \par
What is the difference between UNIQUE and PRIMARY KEY ? \par
The UNIQUE KEY column restricts entry of duplicate values but entry of NULL valu
e is allowed. In case of PRIMARY KEY columns entry of duplicate as well as NULL
value is restricted. \par
What is a SEQUENCE ?\par
A SEQUENCE is a database object used to generate UNIQUE INTEGERS for use as PRI
MARY KEYS. \par
What is a VIEW ? \par
A View is a database object that is a logical representation of a table. It is d
erived from a table but has no storage space of its own and often may be used in
the same manner as a table. \par
What is a SYNONYM ? \par
A SYNONYM is a name assigned to a table or view that may thereafter be used to r
efer it. If you access to another user\'12s table, you may create a synonym for
it and refer to it by the synonym alone, without entering the user\'12s name as
a qualifier. \par
What is a ROWID ? \par
ROWID is the logical address of a row, and it is unique within the database.The
ROWID is broken into three sections: left,middle,, and right (corresponding to 0
0001F20,000C, AND 0001, just shown). The numbering is in hexadecimal notation. T
he left section is the block in the file, the middle is the row sequence number
within the block(numbering starts with 0, not 1), and the right is the file numb
er within the database. Note that the file numbers are unique within the whole d
atabase. The tablespace they are in is not relevant to the ROWID. ROWID can be s
elected, or used in a where clause, but cannot be changed by an insert, update,
or delete. However it can change if the table it is in is exported and imported.
\par
What is INDEX ? \par
INDEX is a general term for an ORACLE / SQL feature used primarily to speed exec
ution an impose UNIQUENESS upon certain data. INDEX provides a faster access met
hod to one table\'12s data than doing a full table scan. There are several types
of Indexes : UNIQUE INDEX, COMPRESSED INDEX, CONCATENATED INDEX. An Index has a
n entry for each value found in the table\'12s Indexed field(s) ( except those w
ith a NULL value ) and pointer(s) to the rows having that value. \par
What is an UNIQUE INDEX ? \par
An UNIQUE INDEX is an index that imposes uniqueness on each value in indexes. Th
e index may be one column or concatenated columns. \par
What is a COMPRESSED INDEX ?\par
A COMPRESSED INDEX is an index for which only enough index information is store
d to identify unique entries; information that an index stores with the previous
or following key is \'13compressed\'14 (truncated) and not stored to reduce the
storage overhead required by an index. \par
What is CONCATENATED INDEX or KEY? \par
A CONCATENATED INDEX is one that is created on more than one column of a table.
It can be used to guarentee that those columns are unique for every row in the t
able and to speed access to rows via those columns \par
What are CLUSTERS ? \par
A CLUSTER is a means of storing together data from multiple tables, when the dat
a in those tables contains information and is likely to be accessed concurrently
. \par
What is CLUSTER KEY or CLUSTER COLUMNS ? \par
A CLUSTER KEY is the column or columns that cluster tables have in common, and w
hich is chosen as the storage / access key. For example two tables, WORKER and W
ORKERSKILL, might be clustered on the column name. A cluster key is the same thi
ng as a cluster column. \par
What is CLUSTER INDEX ? \par
A CLUSTER INDEX is one manually created after a cluster has been created and bef
ore any DML ( that is SELECT, INSERT, UPDATE AND DELETE )statements can operate
on the cluster. This index is created on the CLUSTER KEY columns with the SQL st
atement CREATE INDEX. In ORACLE 7, you can define a hash cluster to index on the
primary key. \par
What are EXCEPTIONS ? \par
Exceptions are the error handling routines of PL/SQL.The EXCEPTION section of a
PL/SQL block is where program control is transfered whenever an exception flag i
s raised. Exception flags are either user-defined or system exceptions raised au
tomatically by PL/SQL. \par
What are CURSORS ? \par
Cursor has two definitions : ? \par
A cursor is a marker such as a blinking square or line, that marks your current
position on a CRT screen. ? Cursor is also a synonym for context area - a work a
rea in memory where ORACLE stores the current SQL statement. For a query , the a
rea in memory also includes column headings and one row retrieved by the SELECT
statement. \par
What is NULL ? A NULL value is one that is unknown, irrelevant, or not meaningfu
l. Any ORACLE data type can be NULL. NULL in a number data type is not the same
as zero. The default value for a field in ORACLE is NULL. \par
What is EXPRESSION ? \par
An expression is any form of a column. This could be a literal, a variable, a ma
thematical computation, a function, or virtually any combination of functions an
d columns whose final result is a single value, such as a string, a number, or a
value. \par
What is a CONDITION ? \par
A Condition is an expression whose value evaluates to either TRUE or FALSE, such
as AGE > 16. \par
What is a PROFILE ? \par
A PROFILE is a collection of settings on ORACLE7 that limit database resources.
What are ROLES ?\par
A ROLE is a set of privileges that an ORACLE7 user can grant to another user or
to a role. ORACLE version 6 privileges DBA, CONNECT, AND RESOURCE have become s
ystem-supplied roles in ORACLE7, and there are also two new roles for importing
and exporting a database. ORACLE has five system-supplied roles : CONNECT,RESOUC
E,DBA,EXP_FULL_DATABASE,IMP_FULL_DATABASE. \par
What is a SEGMENT ? \par
A SEGMENT is another way to classify the space allocated to a table, index, or c
luster. A table has one segment that consists of all of its extents. Every index
has one segment similarly defined. A cluster has atleast two segments, one for
its data and one for its cluster key index. \par
What is TABLE SPACE in ORACLE ? \par
TABLE SPACE is a file or set or files that is used to store ORACLE data. An ORAC
LE database is composed of the SYSTEM tablespace and possibly other tablespaces.
\par
What are PCTUSED and PCTFREE parameters ? \par
PCTFREE is a portion of the data block that is not filled by rows as they are in
serted into a table. but is reserved for future updates made to the rows in that
block. PCTUSED is the percentage of space in a data block, which ORACLE attempt
s to fill before it allocates another block. CLIENT A Client or Front End databa
se application acts as an interface between the user and the Database. It also c
hecks for validation against the data entered by the user. CLIENT is a general t
erm for a user , software application, or computer that requires the services, d
ata, or processing of another application or computer. SERVER A Database server
or Back End is used to manage the Database tables optimally among multiple clien
ts who concurrently request the server for the same data. It also enforces data
integrity across all client applications and controls database access and other
security requirements. SERVER system is the configuration of the ORACLE when a r
emoe user accesses ORACLE via SQL*NET. \par
What is a SESSION ? \par
A SESSION is a sequence of events that happens between the time a user connects
to SQL and the time he or she disconnects. \par
What is an INSTANCE ? \par
An INSTANCE is everything required for ORACLE to run: backround processes (progr
ams), memory, and so on. An INSTANCE is the means of accessing a database. What
is a BACKROUND PROCESS ? A BACKROUND process is one of the processes used by an
instance of multiple-process ORACLE to perform and coordinate tasks on behalf of
concurrent users of the database. The base process are named ARCH (archiever),D
BWR (database writer), LGWR (log writer), PMON (process monitor), and SMON (syst
em monitor), and exists as long as an instance does. What is a BLOCK in ORACLE ?
Basic unit of storage (physical and logical) for all ORACLE data. The number of
blocks allocated per ORACLE table depends on the table space in which the table
is created. The ORACLE block size varies by operating system and may differ fro
m the block size of the host operating system.. Common block sizes are 512 bytes
(characters) and 2048 bytes. A Block is a logical container for items. It is al
so a separate object, with its own set of properties. The properties of the bloc
k determine how end users interact with the interface items it contains. What is
the use of ROLLBACK segment ? A ROLLBACK segment is a storage space within a ta
ble space that holds transaction information used to guarantee data integrity du
ring a ROLLBACK and used to provide read consistency across multiple transaction
s. What is READ CONSISTENCY ? READ CONSISTENCY is a state that guarentees that a
ll data encountered by a statement / transaction is a consistent set throughout
the duration of the statement / transaction. What is SGA ? SGA is a shared stora
ge area in main or virtual memory (depending on your operating system) that is t
he center of ORACLE activity while the database is running. The size of the SGA
( and perfomance of the system ) depends on the values of the variable init.ora
parameters. The SGA provides communication between the user and the backround pr
ocesses. What is SYSTEM USERID ? What does it have ? SYSTEM is one of the DBA us
ers that is created when the database system is installed and initialized ( the
other is SYS ). While SYS owns most of the data dictionary tables, SYSTEM owns t
he views created on those base tables. What is SYS USERID ? What does it have ?
SYS is one of the DBA users that is created when the database system is installe
d and initialized ( the other is SYSTEM ). SYS owns most of the data dictionary
tables, SYSTEM owns the views created on those base tables. What is a Datadictio
nary in ORACLE ? The DATA DICTIONARY is a comprehensive set of tables and views
owned by the DBA users SYS and SYSTEM, which activates when ORACLE is initially
installed, and is a cental source of information for the ORACLE RDBMS itself and
for all users of ORACLE. The tables are automatically maintained by ORACLE, and
holds a set of views and tables containing information about the database objec
ts, users, privileges, events, and use. What is Sqldba ? SQL * DBA is an ORACLE
utility used by DBAs while performing database maintenance and monitoring. What
are Database files ? A DATABASE file is simply any file used in a database. A da
tabase is made up of one or more tablespaces, which in turn are made up of one o
r more database files. What is a Control file ? What is its significance ? A CON
TROL file is a small administrative file required by every database, necessary t
o start and run a database system. A control file is paired with a database, not
with an instance. Multiple identical control files are preferred to a single fi
le, for reasons of data security. What is an INIT file ? What is its significanc
e ? init.ora is a database system parameter file that contains numerous settings
and file names used when a system is started using the CREATE DATABASE , START
UP, or SHUT DOWN command. What does a INSERT statement do ? INSERT adds one or m
ore new rows to the table or view. What does an UPDATE statement do ? Updates (c
hanges) the values in the listed columns in the specified table. What does a DEL
ETE statement do ? DELETE deletes all rows that satisfy condition from table. Wh
at does a SELECT statement do ? SELECT retrieves rows from one or more tables (
or views or snapshots ), either as a command, or as a subquery in another SQL co
mmand (with limitations), including SELECT,INSERT,UPDATE and DELETE. ALL means t
hat all rows satisfying the conditions will be returned ( this is the default ).
DISTINCT means that only rows that are unique will be returned: any duplicates
will be weeded out first. What is Startup and Shutdown ? STARTUP is the process
of starting an instance, presumably with the intent of mounting and opening a da
tabase in order to make a database system available for use. To SHUTDOWN is to d
isconnect an instance from the database and terminate the instance. What is Moun
ting of database ? To MOUNT a database is to make it available to the database a
dministrator. What is Two Phase - Commit ? ORACLE7 manages distributed transacti
ons with a special feature called TWO PHASE - COMMIT. TWO PHASE - COMMIT guarant
ees that a transaction is valid at all sites by the time it commits or roll back
. All sites either commit or rollback together, no matter what errors occur in t
he network or on the machines tied together by the network. You don\'12t need to
do anything special to have your applications use a TWO PHASE - COMMIT. What ar
e Snapshots ? A SNAPSHOT is a means of creating a local copy of remote data. A s
napshot can be used to replicate all or part of a single table, or to replicate
the result of a query against multiple tables. The refreshes of the replicated d
ata can be done automatically by the database ( at time intervals you specify )
or manually. What are Triggers ? A DATABASE TRIGGER is a stored procedure associ
ated with a table that ORACLE7 automatically executes on one or more specified e
vents (BEFORE or AFTER an INSERT,UPDATE or DELETE) affecting the table. Triggers
can execute for the table as a whole or for each affected row in the table. Wha
t are Packages ? A PACKAGE is a PL/SQL object that groups PL/SQL types, variable
s, SQL cursors, exceptions,procedures, and functions.Each package has a specific
ation and a body. The specification shows the object you can access when you use
the package. The body fully defines all the objects and can contain additional
objects used only for the internal workings. You can change the body (for exampl
e, by adding procedures to the packages) without invalidating any object that us
es the package. What are Packaged Procedures ? A PACKAGED PROCEDURE is a built-i
n PL/SQL procedure that is available in all forms. Each packaged procedure execu
tes a SQL*FORMS function, such as moving to a field or executing a query. What a
re Restricted Packaged Procedures ? Any PACKAGED PROCEDURE that affects the basi
c functions of SQL*FORMS is a RESRICTED PACKAGED PROCEDURE. You should use restr
icted packaged procedure only in KEY-TRIGGERS, USER-NAMED TRIGGERS that are invo
ked by KEY-TRIGGERS, and ON_NEW_FIELD_INSTANCE triggers. You should not use rest
ricted packaged procedures in any of the following types of triggers. ? On-error
,On-Database-Record,On-delete,On-insert,On-Lock, On-Message,On-New-Record,On-Rem
ove-record,On-Update, On-Validate-Field, and On-validate-Record triggers. ? Post
-Change triggers. ? Pre- and Post- Field, Pre- and Post- Record, Pre- and Post-B
lock, Pre- and Post-Form triggers. ? Pre- and Post-Query triggers. ? Pre- and Po
st-Insert, Pre- and Post-Update, Pre- and Post-Delete, Pre- and Post-Commit trig
gers. ? User-Named triggers that are invoked by any of the above triggers. What
are Unrestricted Packaged Procedures ? Any PACKAGED PROCEDURE that does not inte
rface with the basic functions of SQL*FORMS is an UN- RESRICTED PACKAGED PROCEDU
RE.You can use unrestricted packaged procedures in any type of trigger. The foll
owing list shows the unrestricted packaged procedures: Abort_Query, Anchor_View,
Bell, Break, Call, Call_query, Default_Value, Display_Error, Display_field, Disp
lay_page, Edit_field, Erase, Execute_Trigger, Help, Hide_Page, Host, Lock_Record
, Message, Move_View, Pause, Print, Redisplay, Resize_View, Set_Field, Show_keys
, Show_page, Synchronize. What are Pseudo Columns in ORACLE ? A PSEUDO COLUMN is
a \'13column\'14 that yields a value when selected, but which is not an actual
column of the table. An example is ROWID or SYSDATE. What is a Schema ? A SCHEMA
is a collection of objects. SCHEMA objects are logical structures that directly
refer to the database\'12s data. SCHEMA objects include structures such as tabl
es, views, synonyms, sequences, indexes, clusters, stored procedures and data li
nks. What are the major aspects of the Relational Database Management System ? T
he Relational model has three major aspects: Structures : Structures are well-de
fined objects that store the data of the database. Structures and the data conta
ined within them can be manipulated by operations. Operations : Operations are c
learly defined actions that allow the user to manipulate the data and structure
of the database. The operation on a database must adhere to a pre-defined set of
integrity rules. Integrity rules : Integrity rules are the laws that govern whi
ch operations are allowed on the data and structure of a database. Integrity rul
es protect the data and the structures of a database. What are the benefits of R
elational Database Management System ? RDBMS offers benefits such as : 1] Indepe
ndence of physical data storage and logical database structure. 2] variable and
easy access to all data. 3] Complete flexibility in database design. 4] Reduced
data storage and redundancy. What is a Database Structure ? An ORACLE database s
tructure has both a physical and logical structure. Physical database structure
: An ORACLE database physical structure is determined by the operating system fi
les that constitute the database. Each ORACLE database is comprised of three typ
es of files: one or more data files, two or more redolog files, and one or more
control files. The files of a database provide the actual physical storage of th
e database information. Logical database structure: An ORACLE database\'12s logi
cal structure is determined by ? One or more tablespaces. ? The database\'12s sc
hema objects (e.g. tables, views, indexes, clusters, sequences,and stored proced
ures ) The logical storage structures, including tablespaces, segments, and exte
nts, dictate how the physical space of a database is used. the schema objects an
d the relationships among them form the relational design of the database. What
are the LOGICAL STRUCTURES ? 1. Tablespaces: A database is divided into logical
storage units called tablespaces. A tablespaces used to group related logical st
ructures together. For example , tablespaces commonly group all of an applicatio
ns objects simplify certain administrative operations. 2. Databases,Tablespaces
and Datafiles: ? Each database is logically divided into one or more tablespaces
. ? One or more datafiles are explicitly created for each tablespace to physical
ly store the data of all logical structures in a tablespace ? The combined size
of a tablespace\'12s data files is the total storage capacity of the tablespace
(SYSTEM has 2MB storage capacity while data has 4MB ) ? The combined storage cap
acity of a database\'12s tablespaces is the total storage capacity of the databa
se. ( 6MB ) What is On-line and Off-line tablespaces ? An tablespace can be On-l
ine or Off-line. A tablespace is normally On-line so that users can access the i
nformation within the tablespace. A tablespace can be Off-line to make a portion
of the database unavailable while allowing normal access to the remainder of th
e database. What are Hash clusters ? Hash clusters are also cluster table data i
n a manner similar to normal clusters. However, a row is stored in a hash cluste
r based on the result of applying a hash function to the row\'12s cluster key va
lue. What are Database Links ? A database link is a named object that describes
a path from one database to the other. Database links are implicitly used when a
reference is made to a global object name in a distributed database. What are D
atablocks ? At the finest level of granularity, an ORACLE database data is store
d in datablocks . One datablock corresponds to a specific number of bytes of phy
sical database space on the disk. A datablock size is specified for each ORACLE
database when the database is created. A database uses and allocates free databa
se space in ORACLE datablocks. What are Extents ? The next level of logical data
base space is called an extent. An extent is a specific number of contiguous dat
a blocks, obtained in a single allocation, used to store a specific type of info
rmation. What are Segments ? The level of logical database storage above an exte
nt is called a segment. A segment is a set of extents allocated for a certain lo
gical structure. The different types of segments include : Data segment : Each n
on-clustered table has a data segment.All of the tables data is stored in the ex
tents of its data segment. Each cluster has a data segment. The data of every ta
ble in the cluster is stored in the cluster\'12s data segment. Index segment : E
ach index has an index segment that stores all of its data. Rollback segment : I
n or more rollback segments are created by the database administrator for a data
base to temporarily store \'13undo\'14 information. This information is used to
generate read-consistent database information, during database recovery and to r
ollback uncommitted transactions for users. Temporary segment : Temporary segmen
ts are created by ORACLE when a SQL statement needs a temporary work area to com
plete execution. when the statement finishes ex! ecution the temporary segment\'
12s extents are returned to the system for future use. What is Application Parti
tioning ? PL/SQL is the language used for both client-side Oracle forms applicat
ions and server-side database triggers and stored procedures and there is a PL/S
Ql engine in both Oracle forms Runform and the Oracle7 Server. This means that y
ou can take advantage of application patitioning to execute application code on
either the client or the server. Application partitioning allows you to optimize
performance and resource usage by storing and executing procedures either local
ly or at the server, which makes the most sense for your particular application
and configuration. Explain the Physical structure of the Oracle database ? The p
hysical structure of an ORACLE database includes datafiles, redolog files and co
ntrol files. 1. Datafiles: Every ORACLE database has one or more physical data f
iles. A database\'12s data files contains all the database data. The data of log
ical database structures such as tables and indexes is physically stored in the
data files allocated for a database. The characteristics of data files are : A d
atafile can be associated with only one database, once created, a data file cann
ot change in size and one or more data files form a logical unit of database sto
rage called a tablespace. Note: Modified or new data is not necessarily written
to a data file immediately. To reduce the amount of disk output and increase per
formance, data is pooled in memory and written to the appropriate data file all
at once, as determined by the DBWR backround process of ORACLE. 2. Redo log file
s: Every ORACLE database has a set o! f two or more Redo log files. The set of r
edo log files for a database is collectively known as the Database\'12s redolog.
The primary function of a redo log is to record changes made to data.Should a f
ailure prevent modified data to be written to the data files , the changes can b
e obtained from the redo log and the work is never lost. Thus redo log files are
critical in protecting a database against failures. The process of applying the
redo log during a recovery operation is called Rolling forward. To protect agai
nst failures of the redo log itself, ORACLE allows a mirrored redo log so that t
wo or more copies of the redo log can be maintained on different disks. 3. Contr
ol files: Every ORACLE database has a Control file. A control file records the p
hysical structure of the database. For example, it contains the following inform
ation : Database name, names and locations of a database\'12s data files and red
olog files and the time stamp of database creation. Every time an instance of an
ORACLE is started, its control file is used to identify database and the redo l
og files that must be opened for database operation to proceed. If the physical
makeup of the database is altered ( for example, if a new data file or redo log
file is created ), the database\'12s control file is automatically modified by t
he ORACLE to reflect the change. Note: A database\'12s control file is also used
if database recovery is necessary. Explain the Memory Structures of the Oracle
database ? Oracle creates and uses memeory sructures to complete several jobs. F
or example, memory is used to store program code being executed and data that is
shared among users. Several basic memory structures are associated with Oracle;
the system global area. ( which includes the database and redolog buffers, and
the shared pool ) and the program global areas. a) System global area: The SGA i
s a shared memory region allocated by Oracle that data and information for one O
racle instance. An SGA and the Oracle backround processes constitute an Oracle I
nstance. The SGA is allocated when an instance starts and deallocated when the i
nstance shuts down. Each instance that is started has its own SGA. The data in t
he SGA is shared among the users currently connected to the database. For optima
l performance , the entire SGA should be as large as possible to store as much !
data as possible in memory and minimise disk I/O. The information stored within
the SGA is divided into several types of memory structures, including the datab
ase buffers, redo log buffers and the shared pool. These area have fixed size an
d are created during instance startup. 1. Database Buffer Cache : Database buffe
rs of the SGA store the most recently used blocks of database data; the set of d
atabase buffers in an instance is the database buffer cache. These buffers can c
ontain modified data that has not yet been written to disk. Because the most rec
ently used data is kept in memory, less disk I/O is necessary and performance is
increased. 2. Redo log buffer: The redo log buffer of the SGA stores redo entri
es - a log of changes made to the database. The redo entries stored in the redo
log buffers are written to an online redo log file, which is used if database re
covery is necessary. Its size is static. 3. Shared Pool: The shared pool is a po
rtion of the SGA that contains shared SQL constructs such as shared SQL areas. A
shared SQL area is required to process every unique SQL statement submitted in
a database. A shared SQL area contains information such as the parse tree and ex
ecution plan for the coressponding statement. A single shared SQL area is used b
y multiple application that issue the same statement leaving more control over c
ursors. 4. Cursors: A cursor is a handle ( a name or pointer ) for the memory as
sociated with a specific statement. Although most Oracle Users rely on the autom
atic handling of the Oracle Utilities, the programmatic interfaces offer applica
tion designers more control over ! cursors. b) Program Global Area: The PGA is a
memory buffer that contains data and control information for a server process.
A PGA is created by Oracle when a server process is started. The information in
a PGA depends on the configuration of Oracle. What is a Process ? A Process is a
\'13thread of control\'14 or a mechanism in a operating system that can execute
a series of steps. Some operating system use the term job as task. Explain the
types of Processes used by Oracle ? An Oracle database system has two types of p
rocesses : 1) User Process. 2) Oracle Process. User Process : A user process is
created and maintained to execute the software code of an application program (
such as a Pro*C program ) or an Oracle tool ( such as SQL* DBA ). The user proce
sses also manages the communication with the server processes through the progra
m interface. Oracle Processes: Oracle processes are called by other processes to
perform functions on behalf of the invoking process. The different types of Ora
cle processes and their specific functions are as follows : Server Process: Orac
le creates server processes to handle requests from connected user processes. A
server process is in charge of communicating with the user process and interacti
ng with the Oracle to carry out requests of the associated user process. Oracle
can be configured to vary the number of users processes per server process. In a
dedicate! d server configuration, a server process handles requests for a singl
e user process. A multi- threaded server configuration allows many users process
es to share a small number of server processes and maximizing the utilization of
available system resources. Backround Processes: Oracle creates a set of backro
und processes for each Oracle Instance.They consolidate functions that would oth
erwise be handled by multiple Oracle programs running for each user processes. T
he backround processes asynchronously perform I/O and monitor other Oracle proce
sses to provide increased parallelism for better performance and reliability. An
SGA and the Oracle backround processes constitute an Oracle Instance. Each Orac
le instance may use several backround processes. They are DBWR,LGWR,CKPT,SMON,PM
ON, ARCH,RECO,Dnnn, AND Lckn. What is a Database Writer ? The DBWR writes modifi
ed blocks from the database buffer cache to the datafiles. Because of the way Or
acle performs logging, DBWR does not need to write blocks when a transaction com
mits.Instead, DBWR is optimized to minimize disk writes. In general, DBWR writes
only when more data needs to be read into the SGA and too few database buffers
are free. The least recently used data is written to the datafile first. What is
a Log Writer? The log writer writes redo log entries to disk. Redo log data is
generated in the redo log buffer of the SGA. As transactions commit and the log
buffer fills, LGWR writes redo log entries into an on-line redo log file. What i
s a Checkpoint ? At specific times, all modified database buffers in the SGA are
written to the data files by DBWR; this event is called a Checkpoint. The check
point process is responsible for signaling DBWR at checkpoints and updating all
the data files and control files of the database to indicate the most recent che
ckpoint. CKPT is optional; if CKPT is not present, LGWR assumes the responsibili
ties of CKPT. What is a System Monitor ? The System monitor performs instance re
covery at instance startup. SMON cleans up temporary segments that are no longer
in use and recovers dead transactions skipped during crash and instance recover
y because of file read or off-line errors. These transactions are eventually rec
overed by SMON when the tablespace or file is brought back. SMON also coalesces
free extents within the database, to make free space contiguous and easier to al
locate. What is a Process monitor ? The process monitor performs process recover
y when a user process fails. PMON is responsible for cleaning up the cache and f
reeing resources that the process was using. PMON also checks on the Dispatcher
and server processes and restarts them if they have failed. What is an Archiever
? The Archiever copies the on-line redo log files to archival storage when they
are full. ARCH is active only when a database\'12s redo log is used in ARCHIEVE
LOG mode. What is a Recoverer ? The recoverer is used to resolve distributed tra
nsactions that are pending due to a NETWORK or system failure in a distributed d
atabase. What is a Dispatcher ? Dispatcher are optional backround processes, pre
sent only when a Multi-threaded server configuration is used. Atleast one dispat
cher process is created for every communication protocol in use (D000,...Dnnnn).
Each dispatcher process is responsible for routing requests from connected user
processes to available shared server processes and returning the response back
to the appropriate user processes. What is a LOCK (LCKn)? Upto ten lock processe
s (LCK0..LCK9) are used for inter- instance locking when the Oracle parallel ser
ver is used. NOTE: pl. format it in notepad/wordpad Reports 2.5 Questions & Answ
ers What are the different styles of Reports ? Tabular, Form. Form Letter, Maste
r/Detail, Matrix, Mail Label Name the SYSTEM VARIABLES that are available in Rep
orts 2.5 ? 11 System Parameters. a] Backround, b] Copies, c] Currency d] Decimal
e] Desination Format, f] Destination Name g] Destination type, h] Mode, i] Orie
ntation, j] Print job and k] Thousands. Name the Objects that are created Under
the Data Model Node in Reports 2.5 ? 9 Objects come under Data Model Editor node
. System parameters, User Parameters, Queries, Groups, Database Columns, Formula
Columns, Placeholder Columns, Summary Columns and Data Links. Name the Objects
that are created Under the Layout Editor Node in Reports 2.5 ? 4 Objects come un
der the Layout Editor node. Header, Trailer, Body and Margin. Name the Objects t
hat are created Under the Parameter Form in Reports 2.5 ? 4 Objects come under t
he Parameter Form editor node in reports 2.5. Fields, graphics Boiler Plate, tex
t Boiler Plate and Image boiler Plate. Name the Objects that are created Under t
he Reports trigger Node in Reports 2.5 ? Before Parameter Form, After Parameter
Form, Before Repor Trigger, Between Pages and After Report Trigger. How many gro
ups are required for a MATRIX REPORT ? 4 Groups. What are the steps in creating
a PAGEWISE SUMMMARY COLUMN ? Explain DEFAULT LAYOUT & LAYOUT EDITOR ? What is an
EXTERNAL QUERY ? An External query is an Oracle Report Module that is an ANSI -
standard SQL SELECT statement that can be used in more than one report or Oracl
e Product. Through which object you are establishing LINKS BETWEEN GROUPS ? Data
Link Object - It establishes a relationship between the data of two queries. Wh
at is a a] FORMULA COLUMN, b] PLACEHOLDER COLUMN , c] SUMMARY COLUMN? a] A formu
la is a computation performed on a single record spanning one or more columns. b
] A Place holder is a \'13dummy\'14 column for which you can set the Data type &
value via PL/SQL or a user exit. They are useful when you want to selectively p
opulate a column wih a value. c] A summary is a computation that is performed on
all records of a single column. What is an ANCHOR ? Anchors determine the relat
ive position of objects in the report output by attaching one layout object, cal
led the child, to a second called the parent. What is a PARAMETER ? Different ty
pes of parameter ? Trigger associated wih the Parameter ? Parameters are Report
variables to which users can assign values at runtime. a] Bind Parameter [ : ],
b] Lexical Parameter [ & ]. 1] Before Parameter form 2] After Parameter form Can
we use DDL statements in Reports ? If so how ? Yes. Using SRW.DO_SQL Package. W
hat is a DRILLDOWN Report ? What is the trigger associated with PUSH BUTTON ? Ac
tion Trigger. What are the different types of REPORT TRIGGERS ? List out the seq
uence in which they fire ? BEFORE PARAMETER FORM AFTER PARAMETER FORM BEFORE REP
ORT TRIGGER BETWEEN PAGES AFTER REPORT TRIGGER Can I use DML statements in FORMA
T trigger ? What is the significance of GROUP FILTER trigger ? With this we can
restrict the Rows retrieved from the Database when the query is executed. How to
control the no of records retrieved ? Using the FILTER OPTION. Can we refer to
column values in REPORT triggers ? Yes - Check. In the table I am having a value
for ENAME as \'11ALLEN\'12 But I want it to be printed as \'11XXX\'12 in the pr
eviewer screen, printer. Is it possible ? If so how ? I want 3 records to be dis
played for each page What should I do ? For achieving this you have to set the R
ECORDS DISPLAYED PRE PAGE property to 3. How to integrate REPORTS 2.5 wih FORMS
4.5 ? How to pass parameters from FORMS to REPORTS ? Using RUN_PRODUCT. With the
help of RECORD GROUPS. 1. What is a View ? Why is it required to define a View
? A View is a database object that is a logical representation of a table. It is
derived from a table but has no storage space of its own and often may be used
in the same manner as a table. Advantage: 1. Security 2. Complex query can be re
placed. 2. Can we create a View without a table ? Yes, Using the FORCE option in
the CREATE VIEW syntax. Ex: CREATE FORCE VIEW view_name as SELECT column name,c
olumnname.. FROM table_name; 3. What is the difference between a SYNONYM and a V
IEW ? A SYNONYM is a name assigned to a table or view that may thereafter be use
d to refer it. If you access to another user\'12s table, you may create a synony
m for it and refer to it by the synonym alone, without entering the user\'12s na
me as a qualifier. A View is a database object that is a logical representation
of a table. It is derived from a table but has no storage space of its own and o
ften may be used in the same manner as a table. Difference: A View can be based
on MULTIPLE Tables whereas a SYNONYM is based on a single object only. 4. What i
s SNAPSHOT ? What is a SNAPSHOT LOG ? A SNAPSHOT is a means of creating a local
copy of remote data. A snapshot can be used to replicate all or part of a single
table, or to replicate the result of a query against multiple tables. The refre
shes of the replicated data can be done automatically by the database ( at time
intervals you specify ) or manually.Snapshot Log is the table associated with th
e Master Table of the Snap shot. 5. What is a DATABASE trigger ? What is a DATAB
ASE Procedure ? A DATABASE TRIGGER is a stored procedure associated with a table
that ORACLE7 automatically executes on one or more specified events (BEFORE or
AFTER an INSERT,UPDATE or DELETE) affecting the table. Triggers can execute for
the table as a whole or for each affected row in the table. A PACKAGED PROCEDURE
is a built-in PL/SQL procedure that is available in all forms. Each packaged pr
ocedure executes a SQL*FORMS function, such as moving to a field or executing a
query. 6. How to show MESSAGES in PROCEDURES for debugging purposes ? DBMS_OUTPU
T_PACKAGE allows you to use 3 debugging functions within your package. You must
use \'13SET SERVER OUTPUT ON\'14 before executing the procedure object you will
be debugging. PUT - Puts multiple O/P\'12s on same line. PUT_LINE Puts each O/P
on a separate line. NEW_LINE Used with PUT; Signals the end of current O/P line.
7. What is the difference between DATABASE trigger and DATABASE procedure ? DAT
ABASE triggers are executed automatically in response to specific events. But th
e DATABASE procedures are to be explicitly invoked to execute the code contained
in them. 8. What is a CURSOR ? A work area in memory where ORACLE stores the cu
rrent SQL statement. For a query , the area in memory also includes column headi
ngs and one row retrieved by the SELECT statement. 9. What are the attributes of
IMPLICIT CURSOR ? %ISOPEN, %ROWCOUNT, %FOUND and %NOTFOUND. Attribute DML STATE
MENT RETURNS ROW RETURNS NO ROW %ISOPEN FALSE FALSE %ROWCOUNT TRUE FALSE ( ZERO
) %FOUND TRUE FALSE %NOTFOUND FALSE TRUE 10. Can we pass a PARAMETER to CURSOR ?
What is SQL%ROWCOUNT ? We can pass parameter to CURSOR. Eg: OPEN CUSOR(\'11VASA
N\'12). SQL%ROWCOUNT is used to count the number of rows returned by an SQL DML
statement.It will return zero if the DML statement doesn\'12t return any row. 11
. How to write a SQL statement that should have a best RESPONSE TIME ? Use the _
__________________ in the optimizer hint inorder to obtain a best response time.
Use \'13FIRST_ROW\'14 - Cost based Optimizer Hint. 12. What are OPTIMIZER HINTS
? Specifies a hint string that Oracle Forms passes on to the RDBMS optimizer wh
en constructing queries. Using the optimizer can improve the performance of data
base transactions. 13. What is the difference between %TYPE and %rowtype ? %TYPE
provides the datatype of a varible,constant or column. It is useful when you de
clare a variable that refers to a database column in the table. %ROWTYPE attribu
te is based on a record variable that has the same structure as a row in a table
or view or as a row fetched from a cursor. 14. Can we define structure like obj
ects in PL/SQL ? [ If the structure is what we define in \'11C\'12 then we can c
reate objects of type structure using RECORD variable available in PL/SQL. ] Yes
, Using the PL/SQL tables. PL/SQL tables are temporary array like objects used i
n a PL/SQL block. PL/SQL tables can have one column and a primary key. The colum
n data type can belong to any scalar data type, but the primary key must only be
long to the type binary_integer. Size - UNLIMITED. 15. Can we use a funtion insi
de an INSERT statement ? Yes. Eg: INSERT INTO EMP(COMM ) VALUES ( SAL*0.05 ) WHE
RE DEPTNO = 20; 16. What is TRUNCATE table ? TRUNCATE table is a DDL command use
d to remove all the rows from the specified table or cluster instantly. Eg: TRUN
CATE TABLE table_name; Advantage over DELETING: a] It is a DDL statement and gen
erates NO ROLLBACK information. b] Doesn\'12t fire the tables DELETE TRIGGER. c]
Truncating the master table of a snapshot doesn\'12t record any changes in the
tables snapshot log. d] It\'12s more convinient than dropping and recreating the
table. e] D/R invalidates the table\'12s dependent objects than truncating the
object. f] D/R requires you to REGRANT the privileges on the table while truncat
ing doesn\'12t. g] D/R requires you to RECREATE the INDEXES, INTEGRITY CONSTRAIN
TS, TRIGGERS and STORAGE PARAMETER while truncating doesn\'12t. 17. What is ROWI
D ? What are its components ? ROWID is the logical address of a row, and it is u
nique within the database.The ROWID is broken into three sections: left,middle,,
and right (corresponding to 00001F20,000C, AND 0001, just shown). The numbering
is in hexadecimal notation. The left section is the block in the file, the midd
le is the row sequence number within the block(numbering starts with 0, not 1),
and the right is the file number within the database. Note that the file numbers
are uniquewithin the whole database. The tablespace they are in is not relevant
to the ROWID. ROWID can be selected, or used in a where clause, but cannot be c
hanged by an insert, update, or delete. However it can changeif the table it is
in is exported and imported. 18. What is the differnce between REPLACE and TRASL
ATE ? Syntax : REPLACE(string,if,then) REPLACE replaces a character or character
s in a string with 0 or more characters, if is a character or characters. Everyt
ime it appears in a string, it is by the contents of then. Eg: REPLACE(\'11ADAH\
'12,\'12A\'12,\'12BLAH\'12) - BLAHDBLAHH (Result) Syntax: TRANSLATE(string,if,th
en) TRANSLATE looks at each character in string, and then checks if to see if th
at character is there, if it is, TRANSLATE notes the position in if where it fou
nd the character, and then looks the same position in then. Whatever character i
t finds there it substitutes the character in string Eg: TRANSLATE(\'11RAMESH\'1
2,\'12RAM\'12,\'12SUR\'12) - SURESH(Result) 19. What is a LEVEL ? LEVEL is a pse
udo column, used with CONNECT BY. It is equal to 1 for a root, 2 for a child of
root, 3 for a child of a child of a root and so on. 20. What is anonymous block
in PL/SQL ? The text of an Oracle Forms trigger is an anonymous PL/SQL block. It
consists of three sections : A declaration of variables, constants,cursors and
exceptions which is optional. A section of executable statements. A section of e
xception handlers, which is optional. Syntax: DECLARE --- declarartive statement
s ( optional ) BEGIN --- executable statements ( required ) EXCEPTION --- except
ion handlers ( optional ) END; 21. Name any ORACLE defined EXCEPTION ? CURSOR_AL
READY_OPEN, NO_DATA_FOUND, INVALID_NUMBER. 22. Can we define our OWN EXCEPTION ?
How to raise it ? In the DECLARATION part define a variable of type exception.
In the excecution part call the exception using RAISE exception_name. In the exc
eption part handle the exception using WHEN exception_name. 23. What is a PRAGMA
? It is a directive to the COMPILER, rather than a piece of executable code. Ev
enthough it appears in the program, it is not executable. It gives instructions
to the compiler. 24. Difference between CHAR and VARCHAR2 ? CHAR(size) - It is a
fixed length character data, size characters long. It is padded with BLANKS ON
RIGHT to the full length of size. DEFAULT - 1 bytes, MAXIMUM - 255 bytes. VARCHA
R2(size) - It is a varable length char string having a maximum of size bytes. MA
XIMUM - 2000 bytes. 25. What is a CURSOR FOR LOOP ? The CURSOR FOR LOOP lets you
implicitly OPEN a cursor, FETCH each row returned by the query associated with
the cursor and CLOSE the cursor when all rows have been processed. 26. What are
the possible CONSTRAINTS defined on a TABLE ? NOT NULL, UNIQUE KEY, PRIMARY KEY,
FOREIGN KEY and CHECK constraints. 27. What is APPLICATION PARTITIONING ? PL/SQ
L is the language used for both client-side Oracle forms applications and server
-side database triggers and stored procedures and there is a PL/SQl engine in bo
th Oracle forms Runform and the Oracle7 Server. This means that you can take adv
antage of application patitioning to execute application code on either the clie
nt or the server. Application partitioning allows you to optimize performance an
d resource usage by storing and executing procedures either locally or at the se
rver, which makes the most sense for your particular application and configurati
on. 28. Difference between a STORED PROCEDURE and a STORED FUNCTION ? Unlike pro
cedures, FUNCTIONS returns a VALUE to the caller. This value is returned thro\'1
2 the RETURN command/keyword within the function. Functions don\'12t use the IN,
OUT | IN OUT arguments, which are available for PROCEDURES. 29. How to RUN PROC
EDURES from SQL PROMPT ? Use EXECUTE Procedure_name command. 30. How to TRAP ERR
ORS in procedures ? Use SHOW_ERRORS. this will display all the errors associated
with the most recently created procedural object. This command will check the V
IEW_ERRORS data dictionary for the ERRORS associated with the most recent compil
ation attempt for that procedural object. SHOW_ERRORS will display the LINE and
COLUMN NO. for each error, as well as the text of the error message. Eg: SELECT
LINE, POSITION,TEXT FROM USER_ERRORS WHERE NAME = \'11balance_check\'12 AND TYPE
= PROCEDURE/FUNCTION/PACKAGE ORDER BY SEQUENCE; NOTE: We can use ALL_ERRORS & D
BA_ERRORS to view errors. TRAPPING ERORS: DBMS_OUTPUT package allows you to use
3 debugging functions within your package. You must set \'11SERVER OUTPUT ON\'12
before executing the procedure object you will be debugging. PUT - Puts multipl
e o/p\'12s on same line. PUT_LINE - Puts each o/p on a separate line. NEW_LINE -
Used with PUT; Signals the END of current o/p line. 31. When do we get a MUTATI
NG ERROR ? This happens with TRIGGERS. It occurs because the trigger is trying t
o update a row it is currently using. The usual fix involves either use of VIEWS
or TEMPORARY TABLES so the database is selecting from one while updating the ot
her. 32. How to DISABLE REFERENTIAL INTEGRITY ? Use the DIABLE option in CREATE
TABLE or ALTER TABLE or using DISABLE \{ \{ UNIQUE (column) (column)... PRIMARY
KEY | CONSTRAINT \} [CASCADE] | ALL TRIGGERS; NOTE : For diabling REFERENTIAL IN
TEGRITY we have to include CASCADE option. 33. How to know what all CONSTRAINTS
are present in a table ? Using the USER_CONSTRAINTS view we can get the type of
constaints declared on a table. Use ALL_CONSTRAINTS to list the constraints on a
ll of the tables that the user have access. DBA_CONSTRAINTS lists all of the con
straints in the database. 34. What is MASTER - DETAIL relationship ? Can we writ
e a master-detail relationship programs without using the setings at design time
. If so how ? It is an association between TWO BASE TABLE blocks - a MASTER bloc
k and a DETAIL block. The relationship between the blocks reflects a PRIMARY KEY
- FOREIGN KEY relationship between the tables on which the blocks are based. Ye
s. Using the SET_RELATION property. 35. What does BUFFER RECORDS option and ARRA
Y SIZE parameter ? ARRAY SIZE - Specifies the minimum no. of records that get fe
tched each time forms goes to the database. BUFFER RECORDS - Specifies the minim
um no of records that should be placed in memory when records are fetched from t
he database. Even if you specify a low value of 3, the minimum per form i 318.16
7 204 324 214 309 219 324 5 1 0 1 -1 0 0 0 0.000 1 1 0 346.500 476.115 244 524 3
39 589 449 524 0 0 1.000 4.000 8.000 2 2 0 1 -1 0 0 0 0.000 0 0 0 399 94 399 69
254 69 254 94 399 94 9999 9999 2 2 0 1 -1 0 0 0 0.000 0 0 0 514 84 514 74 399 74
399 84 514 84 9999 9999 2 2 0 1 -1 0 0 0 0.000 0 0 0 254 84 254 74 139 74 139 8
4 254 84 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 0 0 514 49 514 104 9999 9999 2 1 0
1 -1 0 0 0 0.000 -1 0 0 139 59 139 104 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 0 0 1
39 64 124 74 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 0 0 139 74 124 84 9999 9999 2 1
0 1 -1 0 0 0 0.000 -1 0 0 139 84 124 94 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 0 0
139 94 124 104 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 0 0 514 59 529 69 9999 9999
2 1 0 1 -1 0 0 0 0.000 -1 0 0 514 74 529 84 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1
0 0 514 89 529 99 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 0 0 514 99 529 109 9999 99
99 2 1 0 1 -1 0 0 0 0.000 -1 0 0 119 229 224 229 224 324 139 324 9999 9999 2 1 0
1 -1 0 0 0 0.000 -1 0 0 119 199 119 244 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 0 0
119 234 104 244 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 0 0 119 224 104 234 9999 99
99 2 1 0 1 -1 0 0 0 0.000 -1 0 0 119 209 104 219 9999 9999 2 1 0 1 -1 0 0 0 0.00
0 -1 0 0 119 214 104 224 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 0 0 119 199 104 209
9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 0 0 184 229 269 259 224 284 9999 9999 2 1 0
1 -1 0 0 0 0.000 -1 0 0 269 259 289 259 9999 9999 2 2 0 1 -1 0 0 0 0.000 0 0 0
449 464 449 449 244 449 244 464 449 464 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 1 0
0 0 1.000 4.000 8.000 244 464 244 489 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 1 0 0
0 1.000 4.000 8.000 259 464 259 489 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 1 0 0 0
1.000 4.000 8.000 274 464 274 489 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 1 0 0 0 1.
000 4.000 8.000 289 464 289 489 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 1 0 0 0 1.00
0 4.000 8.000 304 464 304 489 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 1 0 0 0 1.000
4.000 8.000 319 464 319 489 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 1 0 0 0 1.000 4.
000 8.000 334 464 334 489 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 1 0 0 0 1.000 4.00
0 8.000 349 464 349 489 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 1 0 0 0 1.000 4.000
8.000 364 464 364 489 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 1 0 0 0 1.000 4.000 8.
000 379 464 379 489 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 1 0 0 0 1.000 4.000 8.00
0 394 464 394 489 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 1 0 0 0 1.000 4.000 8.000
409 464 409 489 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 1 0 0 0 1.000 4.000 8.000 42
4 464 424 489 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 1 0 0 0 1.000 4.000 8.000 439
464 439 489 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 1 0 0 0 1.000 4.000 8.000 449 46
4 449 489 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 1 0 0 0 1.000 4.000 8.000 244 489
244 524 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 1 0 0 0 1.000 4.000 8.000 259 489 25
9 549 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 1 0 0 0 1.000 4.000 8.000 274 489 274
564 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 1 0 0 0 1.000 4.000 8.000 289 489 289 57
4 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 1 0 0 0 1.000 4.000 8.000 304 489 304 584
9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 1 0 0 0 1.000 4.000 8.000 319 484 319 589 99
99 9999 2 1 0 1 -1 0 0 0 0.000 -1 1 0 0 0 1.000 4.000 8.000 334 484 334 589 9999
9999 2 1 0 1 -1 0 0 0 0.000 -1 1 0 0 0 1.000 4.000 8.000 349 484 349 589 9999 9
999 2 1 0 1 -1 0 0 0 0.000 -1 1 0 0 0 1.000 4.000 8.000 36.tra O/P file EXPLAIN
= USR/PWD0 47. what parameter variables to be set to use TKPROF ? SQL PROF 48. H
ow many types of lockings are there ? 5 types of locks. To lock is to temporaril
y restrict other user\'12s access to data. The restriction is placed on such dat
a is called \'13a lock\'14. The modes are SHARE, SHARE UPDATE,EXCLUSIVE,ROW SHAR
E AND ROW EXCLUSIVE. Not all locks can be acquired in all modes. 49. What is a S
HARE LOCK ? A SHARE lock is one that permits other users to query data, but not
to change it. 50. What is a SHARE UPDATE LOCK ? A SHARE UPDATE lock is one that
permits other users to both query and lock data. 51. What is an EXCLUSIVE LOCK ?
An EXCLUSIVE LOCK is one that permits other users to query data, but not to cha
nge it. It differs from the SHARE lock because it does not permit another user t
o place any type of lock on the same data; several users may place SHARE locks o
n the same data at the same time. 52 What is ROWSHARE, SHAREUPDATE and ROW EXCLU
SIVE locks ? With a ROW SHARE or SHARE UPDATE lock, no users can lock the whole
table for exclusive access, allowing concurrent access for all users to the tabl
e. The two types of locks are synonymous, and SHARE UPDATE exists for compatibil
ity with previous versions of ORACLE. ROW EXCLUSIVE locks are similar to ROW SHA
RE but they prohibit shared locking, so only one user user may access the table
at the same time. 53. What is a DEAD LOCK ? A DEAD lock is a rare situation in w
hich two or more user processes of a database cannot complete their tansactions.
This occurs because each process is holding a resource that the other process re
quires (such as a row in a table) in order to complete.Although these situations
occur rarely, ORACLE detects and resolves deadlocks by rolling back the work of
one of the processes. 54. How do you analyse which resources has locked for wha
t ? Use MONITOR SESSION. 55. How to kill a SESSION ? ALTER SESSION KILL ID, NUMB
ER FROM SQLDBA; 56. What are USER_EXITS ? It is an utility in SQL*FORMS for maki
ng use of HOST 3 GL languages for the purpose like ONLINE PRINTING etc. 57. When
will you use the trigger WHEN-NEW-FORM-INSTANCE ? At FORMS STARTUP Oracle navig
ates to the first navigable item in the first navigable block. This trigger fire
s after successful completion of any Navigational trigger (i.e) It will not fire
if the control retuns to the CALLING FORM from the CALLED FORM. Usage: For init
ialization at FORMS STARTUP. 58. What is an INDEX ? Why are indexes used in a ta
ble ? INDEX is a general term for an ORACLE / SQL feature used primarily to spee
d execution an impose UNIQUENESS upon certain data. INDEX provides a faster acce
ss method to one table\'12s data than doing a full table scan. There are several
types of Indexes : UNIQUE INDEX, COMPRESSED INDEX, CONCATENATED INDEX. An Index
has an entry for each value found in the table\'12s Indexed field(s) ( except t
hose with a NULL value ) and pointer(s) to the rows having that value. 59. What
is an UNIQUE INDEX ? An UNIQUE INDEX ia an index that imposes uniqueness on each
value in indexes. The index may be one column or concatenated columns. 60 What
is an COMPRESSED INDEX ? A COMPRESSED INDEX is an index for which only enough in
dex information is stored to identify unique enrties; information that an index
stores with the previous or following key is \'13compressed\'14 (truncated) and
not stored to reduce the storage overhead required by an index. 61. What is an C
ONCATENATED INDEX ? A CONCATENATED INDEX is one that is created on more than one
column of a table. It can be used to guarentee that those columns are unique fo
r every row in the table and to speed access to rows via those columns 62. What
is a UNION, UNION ALL,INTERSECTION and MINUS operator ? The UNION operator retur
ns ALL DISTINCT ROWS selected by either query. The UNION ALL operator returns AL
L ROWS selected by either query including duplicates. The INTERSECTION operator
returns ONLY ROWS that are COMMON to both the queries. The MINUS operator return
s ALL DISTINCT ROWS selected only by the first query and not by the second. 63.
What does \'11GROUP BY\'12 statement do ? GROUP BY statement causes a SELECT sta
tement to produce ONE SUMMARY ROW for all selected rows that have identical valu
es in one or more specified column or expressions. Each expe\\ressionin the SELE
CT clause must be one of the following : 1] A CONSANT 2] A Function without para
meters 3] A GROUP function like SUM , AVG. 4] Matched IDENTICALLY to a expressio
n in the \'11GROUP BY\'12 clause. 64. In 2 SELECT statements SELECT A FROM DUAL;
and SELECT B FROM DUAL; What will be the difference in using \'11UNION\'12 and
\'11UNION ALL\'12 ? UNION returns all distinct rows selected by either of the qu
ery, whereas UNION ALL returns ALL ROWS selected by either query including dupli
cates. 64. Give one example where you will use DATABASE TRIGGERS ? For AUDITING
purposes we use database triggers. 65. Do you have any idea about ROW-CHAINING ?
How will you resolve the issue if there is row- chaining in a table ? When a ro
w NO LONGER FITS WITHIN THE DATABLOCK, it is stored in more than one database bl
ock, and that therefore have several row pieces. Resolving: Use ANALYZE to ident
ify chained rows and also provides statistics on the chained rows. Eg: ANALYZE l
edger LIST CHAINED ROWS INTO CHAINED_ROWS: (CHAINED_ROWS is a user defined table
) For creating chained_rows run the UTLCHAIN.SQL script. 66. What is an OPTIIMIZ
ER ? OPTIMIZER is an utility used to determine how to access data requested in t
he query by the USER or APPLICATION PROGRAM. The output of an optimizer is EXECU
TION PLAN. 67. How OPTIMIZATION is done by the Oracle in case of a query ? 1] RU
LE based, and 2] COST based. 68. What is a] RULE based optimization, b] COST bas
ed optimization ? RULE based optimization USES A FIXED SET OF RULES to determine
how to access the data. COST based optimization USES STASTISTICS STORED IN THE
DATA DICTIONARY WITH CERTAIN RULES to determine how to access the data. Two mode
s - a] ALL_ROWS, B] FIRST_ROW. With the help of ALTER SESSION SET OPTIMIZER_GOAL
= ALL_ROWS / FIRST_ROW, We can alter the modes of cost based optimizer. 69. The
KEYWORD comes into the mind immediately when we talk about security ?????? in O
RACLE 7.0 ? GRANT. Syntax GRANT privileges( SELECT,INSERT,UPDATE,DELETE,ALTER,IN
DEX) ON object TO user WITH GRANT OPTION; 70 What KEWORD is used to withdraw the
PRIVILEGE you have granted to other user ? REVOKE Syntax: REVOKE privileges ON
object FROM users; 71 What is SINGLE INSTANCE ? A single instance can run on a s
ingle machine. 72 What is MULTIPLE INSTANCES ? A SINGLE MACHINE can run more tha
n one instance at a time. Each instance is connected to its own database. 73 Wha
t is DISTRIBUTED PROCESSING ? Different instances on different machines can comm
unicate with each other using DATABASE LINKS and the DISTRIBUTED option. Oracle
supports full two-phase commits which means that inserts, updates and deletes ca
n occur on REMOTE database via a network running SQL*Net. 74 What is PARALLEL PR
OCESSING ? The Oracle parallel server allows muliple instances to share a single
database on a shared disk system. The instance can run on a parallel computer o
r on different computers in a cluster. 75. Difference between SQL and PL/SQL ? S
QL is the ANSI industry standard language, used to manipulate information in a r
elational database. PL/SQL is the procedural language extension to Oracle\'12s S
QL language. SQL PL/SQL 1. It is flexible, Powerful and easy to learn. 2. It is
a non-procedural language. It a] Processes set of records rather than just one a
t a time and b] Provides automatic navigation to the data. 3. It provides comman
ds for avariety of tasks including : a] Querying data b] Creating,Updating and R
eplacing objects and Inserting, Updating and Deleting rows. 4] All RDBMS support
s SQL Thus one can transfer the skills gained with SQL from one RDBMS to another
. Programs written in SQL are portable, they can often be moved from one databas
e to another with little modification. 1. PL/SQL block can contain any no. of SQ
L statements combined with the following : a] Flow of control statements such as
IF..THEN, ELSE, EXIT and GOTO. b] Repetition statements such as FOR .. LOOP and
WHILE .. LOOP. c] Assignment statements such as X := Y + Z 2. PL/SQL allows you
to logically group a set of statements and send them to the RDBMS as a single b
lock. 3! .. Procedural capabilities. 4. Improved performance. 5. Enhanced produc
tivity 6. Portability 7. Integration with the RDBMS. 76. How to fetch descriptio
n of a code in the base table block where code is a base table field and the des
cription is a non-base table field ? Use SELECT with INTO clause to fetch the de
cription value into the NON-BASE table field. 77. What is the purpose of OUTER J
OIN ? An OUTER JOIN returns all the rows returned by simple join as well as thos
e rows from one table that do not match any row from the other table. The symbol
(+) represents the outer join. 78. Difference between EQUI JOIN and OUTER JOIN
? EQUI JOIN returns rows from both the tables provided they both have the same c
olumn_name in the where clause. The symbol (=) represents the EQUI JOIN. For OUT
ER JOIN see previous answer. 79. Define NORMALIZATION ? NORMALIZATION is the pro
cess of putting things right, making them normal. It is a part of analysis neces
sary to understand a business, and build a useful application. The normalization
of data ensures a] Minimization of duplication of data. b] Providing flexibilit
y to support different funtional requirements. c] Enabling the model to be trans
lated to database design. STEPS INVOLVED IN NORMALIZATION 1] Ensure that all the
ENTITIES are uniquely identified by a combination of attributes. 2] Remove repe
ated attributes or group of attributes, to place the entities in the first norma
l form. 3] Remove attributes that are dependent on only part of the identifier.
4] Remove attributes that are dependent on attributes which are not part of the
identifier. 80. Define REFERENTIAL INTEGRITY ? REFERENTIAL INTEGRITY is the prop
erty that guarantees that values from one column depend on values from another c
olumn. This property is enforced through integruty constraints. Referential inte
grity is the automatic enforcement of referential constraints that exists betwee
n a reference table and a referencing table. When referential integrity is enfor
ced , the value of a foreign key exists as a primary key value in the reference
table. 81. Explain OUTER JOIN with example ? SELECT DEPT.DEPTNO,DNAME,JOB,ENAME
FROM DEPT,EMP WHERE DEPT.DEPTNO = EMP.DEPTNO(+) AND DEPTNO IN (30,40) ORDER BY D
EPT.DEPTNO; 82. Explain with example how to use a select statement with GROUP BY
HAVING clause ? (or) Where and when is the HAVING clause used and what does it
have ? The HAVING clause is coded after the GROUP BY clause in the query that is
summarizing results by one or more grouping columns. The HAVING clause behaves
the same as the WHERE clause except that it is used to specify the conditions ea
ch returned group must satisfy. If one row in the group fails the condition of t
he HAVNG clause, the entire group is not returned as part of the result. Ex: SEL
ECT MAX(CUSTID), REPID FROM CUSTOMER GROUP BY REPID HAVING COUNT(*) > 2; 83. How
do you TUNE SQL statements ? Use OPTIMIZER HINTS for tuning Sql statements. 84.
What is the advantage of ENFORCE KEY ? ENFORCE KEY field characterstic indicate
s the source of the value that SQL*FORMS uses to populate the field 85. What is
the Purpose of ERASE command ? ERASE removes an indicated Global variable & rele
ases the memory associated with it NOTE: pl. format it in notepad/wordpad No Ora
cle Questions & Answers 1 What are the different modules of FORMS 4.5 ? Form, Me
nu and Library modules. 2 What are the differences between FORMS 3.0 and FORMS 4
.5 ? FORMS 3.0 FORMS 4.5 1] Mode Character GUI 2] System Variables 20 42 3] Sess
ion Single Multiple 4] Blocks, Canvas 255 No limit 5] Triggers 75 121 6] Items t
ypes - 10 7] Relation Design Time Run Time ( Using S! ET_RELATION_PROPERTY ) 8]
Inheritance Not Available Available 9] Property Class - DO - - DO - 10] Object G
roups - DO - - DO - 11] Library - DO - - DO - 12] Attached Libraries - DO - - DO
- 13] Visual Attributes - DO - - DO - 3 What is the maximum limit for creating
BLOCKS and CANVAS in FORMS 4.5 ? NO LIMIT 4 In a MULTI RECORD BLOCK can we have
an item displayed once ? Yes, By setting the ITEMS DISPLAYED property for the re
spective item in the Properties Window. 5 After creation of the block can we cre
ate a BUTTON PALETTE ? No. 6 What are the different types of triggers that will
be created for MASTER DELETES properties such as a] ISOLATED, b] NON - ISOLATED,
c] CASCADING ? Master Deletes Property Resulting Triggers NON - ISOLATED On-Che
ck-Delete-Master On-Clear-Details On-Populate-Details CASCADING On-Clear-Details
On-Populate-Details Pre-Delete ISOLATED ! On-Clear-Details On-Populate-Details
7 What is the difference between creating a MASTER-DETAIL relationship in NEW BL
OCK window and creating relations after creation of the blocks ? When you create
the relation in the NEW BLOCK window, Oracle forms also alters the properties o
f the FOREIGN KEY items(s) in the DETAIL BLOCK by doing the following: ? Setting
the CANVAS property to NULL to make the item a NULL CANVAS item. ? Setting the
following properties to FALSE DISPLAYED, ENABLED, NAVIGABLE, QUERY ALLOWED AND U
PDATE ALLOWED. ? Sequencing items in the Navigator such that the FOREIGN KEYITEM
S are last in the block\'12s navigation sequence. ? Boiler plate text label for
the FOREIGN KEY ITEM is not created. 8 How to set RELATION properties Dynamicall
y ? Using the following properties: Syntax: SET_RELATION_PROPERTY(relation_id, p
roperty, value); SET_RELATION_PROPERTY(relation_name, property, value); 9 How ma
ny types of ITEMS are there in FORMS 4.5 ? 10 items ( Text Item, Display Item, L
ist Item, Image Item, Chart Item, VBX, OLE, Check Box, Radio Button, Push Button
). 10 What are the different types of LIST ITEMS and the triggers associated wi
th them ? 1] Pop list, 2] Text list, 3] Combo box. Triggers: 1] When-List-Activa
ted 2] When-List-Changed 11 Can we change the color of the PUSH BUTTON ? No. Not
e: When we make the ICONIC property of the PUSH BUTTON as TRUE, then we can chan
ge the Color of the button. But adding text to the button is not possible. 12 Wh
at is the significance of the OTHER VALUES property in CHECK BOX ? You can speci
fy that a CHECK BOX can handle the OTHER VALUES property in one of the following
ways: ? Reject Other Values as NOT ALLOWED. ? Display Other Values as the CHECK
ED STATE ? Display Other Values as UNCHECKED STATE 13 What is a RADIO GROUP ? Is
dummy radio group necessary ? What is the associated trigger ? How to DISABLE a
radio button dynamically ? A RADIO GROUP is an interface control that displays
a fixed number of options that are MUTUALLY EXCLUSIVE. Each option is represente
d by an individual radio button. Yes. When-Radio-Changed Trigger. Use Set_Radio_
Button_Property to DISABLE a radio button. 14 What is the difference between TEX
T ITEM & DISPLAY ITEM ? TEXT ITEM DISPLAY ITEM Navigable TRUE FALSE Memory More
Less 15 What is the differnce between SINGLE LINE TEXT ITEM and MULTILINE TEXT I
TEM ? SINLE LINE TEXT ITEM MULTIILINE TEXT ITEM Scroll Bar NO YES Wrap Style NO
YES Secure YES NO Auto Skip YES NO Format Mask YES NO 16 How to invoke LOV dynam
ically ? Using SHOW_LOV built-in Syntax: SHOW_LOV(lov_id); SHOW_LOV(lov_id, x, y
); SHOW_LOV(lov_name); SHOW_LOV(lov_name, x, y); 17 What does LOV FOR VALIDATION
property do when it is set to TRUE ? When LOV for Validation is True, Oracle Fo
rms compares the current value of the text item to the values in the first colum
n displayed in the LOV whenever the validation event occurs: 7 If the value in t
he text item matches one of the values in the first column of the LOV, validatio
n succeeds, the LOV is not displayed, and processing continues normally. 7 If th
e value in the text item does not match one of the values in the first column of
the LOV, Oracle Forms displays the LOV and uses the text item value as the sear
ch criteria to automatically reduce the list. 18 What is the difference between
LIST_VALUES and SHOW_LOV ? LIST_VALUES: LIST_VALUES displays the list of values
for the current item, as long as the input focus is in a text item that has an a
ttached LOV. The list of values remains displayed until the operator dismisses t
he LOV or selects a value. By default, LIST_VALUES uses the NO_RESTRICT paramete
r. This parameter causes Oracle Forms not to use the automatic search and comple
te feature. If you use the RESTRICT parameter, Oracle Forms uses the automatic s
earch and complete feature. SHOW_LOV: Displays a list of values (LOV) window at
the given coordinates, and returns TRUE if the operator selects a value from the
list, and FALSE if the operator Cancels and dismisses the list. Note: You must
attach a LIST_VALUES built-in to the text item. But it is not necessary to attac
h SHOW_LOV to the text item. 19 What is a RECORD GROUP ? Different types of reco
rd groups ? How to create QUERY RECORD GROUP Dynamically ? A RECORD GROUP is an
Internal Oracle Forms data structure that has a column/row frame work similar to
a database table. TYPES: QUERY, NON-QUERY AND STATIC RECORD GROUP. For creating
QUERY RECORD GROUP dynamically use CREATE_GROUP_FROM_QUERY(recordgroup_name, qu
ery); 20 How many no. of columns that a RECORD GROUP can have ? The total no. of
columns should not exceed 64K. 21 What does POPULATE_GROUP return when query su
ceeds ? NUMBER i.e 0 When it suceeds. 22 How to change an LOV from one record gr
oup to another record group ? Use SET_LOV_PROPERTY. Syntax: SET_LOV_PROPERTY(lov
_id, property, value); SET_LOV_PROPERTY(lov_name, property, value); SET_LOV_PROP
ERTY(lov_id, property, x, y); SET_LOV_PROPERTY(lov_name, property, x, y); Ex : S
et_LOV_Property(lov_id,GROUP_NAME,'NEW_GROUP_NAME'); 23 What are different types
of CANVASES ? 1] CONTENT, 2] STACKED, 3] HORIZONTAL TOOL BAR and 4] VERTICAL TO
OL BAR. 24 Explain RAISE ON ENTRY PROPERTY ? The Raise on Entry property of canv
as-views determines how stacking order is affected by navigation to items on tho
se views: 7 When Raise on Entry is False, Oracle Forms raises the canvas-view on
ly if the target item is hidden behind another canvas-view in that same window.
7 When Raise on Entry is True, Oracle Forms raises the canvas-view to the front
of the window whenever the operator or the application navigates to an item on t
hat view. Be careful about setting Raise on Entry to True for a content canvas-v
iew; Because a content view occupies the entire content area of its window, it w
ill always obscure any stacked canvas-views when it is raised to the front of th
e view stack. 25 What is a CONTENT VIEW ? A CONTENT CANVAS VIEW is the \'13BASE\
'14 view that occupies the entire CONTENT pane of the window on which it is plac
ed. 26 What is the difference between SHOW_VIEW and REPLACE_CONTENT_VIEW ? Use S
HOW_VIEW and REPLACE_CONTENT_VIEW. Syntax: SHOW_VIEW(view_id); SHOW_VIEW(view_na
me); Syntax: REPLACE_CONTENT_VIEW(window_id, view_id); REPLACE_CONTENT_VIEW(wind
ow_name, view_id); REPLACE_CONTENT_VIEW(window_id, view_name); REPLACE_CONTENT_V
IEW(window_name, view_name); SHOW_VIEW displays the view at the specified displa
y co-ordinates, whereas REPLACE_CONTENT_VIEW displays the view at the location o
f the prevoiusly displayed content view. The advantage is REPLACE_CONTENT_VIEW w
ill not obscure any stacked view displayed before calling REPLACE_CONTENT_VIEW.
27 What are the different types of WINDOWS ? 1] DOCUMENT WINDOW, 2] DIALOG WINDO
W 28 How to display a WINDOW programmatically ? Use SHOW_WINDOW, SET_WINDOW_PROP
ERTY to display window programmatically. Syntax: SHOW_WINDOW(window_id); SHOW_WI
NDOW(window_id, x, y); SHOW_WINDOW(window_name); SHOW_WINDOW(window_name, x, y);
Syntax: SET_WINDOW_PROPERTY(window_id, property, value); SET_WINDOW_PROPERTY(wi
ndow_id, property, x); SET_WINDOW_PROPERTY(window_id, property, x, y); SET_WINDO
W_PROPERTY(window_name, property, value); SET_WINDOW_PROPERTY(window_name, prope
rty, x); SET_WINDOW_PROPERTY(window_name, property, x, y); 29 To which type of w
indow REMOVE ON EXIT property is meaningful ? DOCUMENT WINDOW ( Modeless Window)
30 To which type of window SCROLL BAR doesn\'12t apply ? DIALOG WINDOW ( Modal
Window ) 31 How to SCROLL a window dynamically ? Use SCROLL_VIEW, SET_VIEW_PROPE
RTY built-in\'12s. Syntax: SCROLL_VIEW(view_id, x, y); SCROLL_VIEW(view_name, x,
y); Syntax: SET_VIEW_PROPERTY(view_id, property, value); SET_VIEW_PROPERTY(view
_id, property, x, y); SET_VIEW_PROPERTY(view_name, property, value); SET_VIEW_PR
OPERTY(view_name, property, x, y); 32 How to RESIZE a Window ? Use RESIZE_WINDOW
, SET_WINDOW_PROPERTY Built-in Syntax RESIZE_WINDOW(window_id, width, height);
RESIZE_WINDOW(window_name, width, height); Syntax: SET_VIEW_PROPERTY(view_id, pr
operty, value); SET_VIEW_PROPERTY(view_id, property, x, y); SET_VIEW_PROPERTY(vi
ew_name, property, value); SET_VIEW_PROPERTY(view_name, property, x, y); 33 How
to increase the SIZE of the window dynamically ? Use SET_WINDOW_PROPERTY. Syntax
: SET_WINDOW_PROPERTY(window_id, property, value); SET_WINDOW_PROPERTY(window_id
, property, x); SET_WINDOW_PROPERTY(window_id, property, x, y); SET_WINDOW_PROPE
RTY(window_name, property, value); SET_WINDOW_PROPERTY(window_name, property, x)
; SET_WINDOW_PROPERTY(window_name, property, x, y); 34 What are the window event
triggers ? WHEN-WINDOW-ACTIVATED WHEN-WINDOW-DEACTIVATED WHEN-WINDOW-CLOSED WHE
N-WINDOW-RESIZED 35 What is a CONSOL WINDOW ? On what window it will be displaye
d ? Can we change the consol window at run time ? A CONSOL WINDOW includes the S
TATUS LINE and MESSAGE LINE and is displayed at the bottom of the window to whic
h it is attached. On MS-WINDOWS the CONSOL WINDOW is always displayed on the MDI
application window and cannot be displayed on individual document or dialog win
dows in the form. NO. 36 Define a] PROPERTY CLASS , b] VISUAL ATTRIBUTES ? What
are the differences between property class and visual attributes ? A PROPERTY CL
ASS is a named object that contains a list of properties and their settings. A V
ISUAL ATTRIBUTE is a separate object that defines a set of visual attribute sett
ings. Property classes are similar to named visual attributes, but there are imp
ortant differences you should be aware of: 7 Named visual attributes define only
font, color, and pattern attributes; property classes can contain these and any
other properties. 7 You can change the appearance of objects at runtime by chan
ging the named visual attribute programmatically; property class assignment cann
ot be changed programmatically. 7 When an object is inheriting from both a prope
rty class and a named visual attribute, the named visual attribute settings take
precedence, and any visual attribute properties in the class are ignored. 37 Ho
w to change a VISUAL ATTRIBUTE dynamically ? Use 7 GET_ITEM_PROPERTY 7 GET_RADIO
_BUTTON_PROPERTY 7 SET_CANVAS_PROPERTY 7 SET_ITEM_PROPERTY 7 SET_RADIO_BUTTON_PR
OPERTY 38 If I change a property settings of a field which is attached to a visu
al attribute what will happen ? The VISUAL ATTRIBUTE name in the properties wind
ow for that item will become CUSTOM. 39 What is a LIBRARY ? A library is a colle
ction of subprograms, including user-named procedures, functions and packages. L
ibraries provide a convenient means of storing client-side program units and sha
ring them among multiple applications. Once you create a library, you can attach
it to any other form, menu, or library module. Then, you can call library progr
am units from triggers, menu item commands, and user-named routines you write in
the modules to which you have attached the library. The same library can be att
ached to multiple forms and menus. Conversely, a single form or menu can have mo
re than one attached library. Libraries can also be attached to other libraries.
When a library attaches another library, program units in the first library can
reference program units in the attached library. Libraries support dynamic load
ing --that is, a library's program units are loaded into an application only whe
n needed. This can significantly reduce the runtime memor! y requirements of an
application. 40 What is the difference between PROGRAM UNITS and ATTACHED LIBRAR
IES ? PROGRAM UNITS A User-named subprogram is a named PL/SQL function or proced
ure that you write in a form , menu or library module. - A user -named subprogra
m defined in a form module can be called only from triggers and other user-named
subprograms in the same module. - A user-named subprogram defined in the menu m
odule can be called only from menu item commands and startup code in that menu m
odule. - A user-named subprogram defined in a library module can be called from
any trigger or menu item command, provided that the library is attached to the f
orm or menu module. ATTACHED LIBRARIES REFER TO PREVIOUS ANSWER. 41 What type of
references can I use in ATTACHED LIBRARIES ? Use NAME_IN sub program to refer t
o the values of bind variables and use COPY sub program procedure to set values
for the bind variables. Ex: NAME_IN(\'11block_name.item_name\'12), NAME_IN(\'11G
LOBAL.variablel_name\'12), NAME_IN(\'11SYSTEM. variable _name). COPY(\'11\'12288
76\'12,\'12block_name.item.name\'12), COPY(\'11standard\'12,\'12GLOBAL.variable_
name\'12) COPY(\'11\'12FALSE\'12,\'14SYSTEM.variable_name\'12) 42 What are the d
ifferent types of MENU ? PULL_DOWN, FULL SCREEN and BAR MENUS. 43 How to attach
a menu to a form ? In the forms set the MENU MODULE PROPERTY to the respective m
enu file name. 44 How to replace MENU\'12s DYNAMICALLY ? Use REPLACE_MENU. Synta
x: REPLACE_MENU; REPLACE_MENU(menu_module_name); REPLACE_MENU(menu_module_name,
menu_type); REPLACE_MENU(menu_module_name, menu_type, starting_menu_name ); REPL
ACE_MENU(menu_module_name, menu_type, starting_menu, group_name); REPLACE_MENU(m
enu_module_name, menu_type, starting_menu, group_name, use_file); 45 What are al
l the different types of MENU ITEMS ? PLAIN, CHECK, RADIO,SEPERATOR and MAGIC IT
EMS. 46 In which platform BACKROUND MENU is supported ? CHARACTER MODE. 47 What
are the different types of codes that we write in MENUS ? NULL, MENU, PL/SQL, PL
US, CURRENT FORM and MACRO. 48 What are the way of referencing you will be using
while writing the codes in menus ? Use NAME_IN and COPY for referencing objects
in menu commands. 49 What is an ALERT ? How to change an alert message dynamica
lly ? What type of an window is an alert ? What are the maximum no. of character
s that an alert have ? An ALERT is a MODAL WINDOW that displays a message notify
ing the operator of some application condition. Use SET_ALERT_PROPERTY to change
the alert message. Syntax: SET_ALERT_PROPERTY(alert_id/name,ALERT_MESSAGE_TEXT,
\'12Good choice\'12). ALERT is a MODAL WINDOW. Maximum no. of characters allowed
in alert is 200. 50 What is FREEZE / UNFREEZE ? Toggles properties window synch
ronization On and Off. When FREEZE is Off ( the Default ), the property list is
updated to display the properties of objects you select in the Navigator and Win
dows. When FREEZE is On, the property list is pinned and does not get update, al
lowing you to compare it to other property lists. 51 What do you mean by COPYING
and REFERENCING ? COPYING creates a new and separate instance of the object in
the target module. REFERENCING creates a new object that maintains a link to the
source object 52 When you COPY a REFERENCED object what will be the resultant o
bject ? COPYING a REFERENCED object creates a new and separate instance of the r
eferenced OBJECT. The resultant is a REFERNCED object. 53 How to reuse the PL/SQ
L codes ? For reusing PL/SQL codes we have to either REFERENCE or COPY the PL/SQ
L codes defined in the SOURCE object. Go for Program Units ( Procedures & Functi
ons ) - Right Answer. ( Libraries ) 54 How to use DDL statements in the FORMS 4.
5 ? Use FORMS_DDL( Statemnt) Statement Any string expression up to 32K: 7 a lite
ral 7 an expression or a variable representing the text of a block of dynamicall
y created PL/SQL code. 7 a DML statement or 7 a DDL statement 55 How many SYSTEM
VARIABLES are there in FORMS 4.5 ? 42 System Variables. 56 What does the SYSTEM
_MOUSE_BUTTON_PRESSED variable do ? SYSTEM.MOUSE_BUTTON_PRESSED indicates the nu
mber of the button that was clicked. Mouse button support is limited to buttons
1 and 2 (left or middle) on a three button mouse. The value is always a characte
r string. 57 What is the SYSTEM VARIABLE that is used to determine the CURRENT M
ODE ? SYSTEM.MODE indicates whether the form is in Normal, Enter Query, or Fetch
Processing mode. The value is always a character string. 58 What are the variou
s categories of triggers ? Explain each in detail ? 1] Block-processing-triggers
, 2] Interface-event-triggers, 3] Master-detail-triggers,4] Message-handling-tri
ggers,5] Navigational-triggers,6] Query-time-triggers,7] Transactional-triggers,
8] Validational-triggers. 59 What are different types of EDITORS ? DEFAULT, USER
-NAMED and SYSTEM editors. 60 What is the difference between EDIT_TEXTITEM and S
HOW_EDITOR ? Description: Invokes the Runform item editor for the current text i
tem and puts the form in Edit mode. Syntax: EDIT_TEXTITEM; EDIT_TEXTITEM(x, y);
EDIT_TEXTITEM(x, y, width, height); Restrictions: 7 The input focus must be in a
text item. 7 The Width must be at least wide enough to display the buttons at t
he bottom of the editor window. Description: Displays USER-NAMED editor at the s
pecified display co-ordinates. Syntax: SHOW_EDITOR(editor_id, message_in, messag
e_out, result); SHOW_EDITOR(editor_id, message_in, x, y, message_out, result); S
HOW_EDITOR(editor_name, message_in, message_out, result); SHOW_EDITOR(editor_nam
e, message_in, x, y, message_out, result); The result parameter is a BOOLEAN IN
OUT parameter. If the operator accepts the editor, SHOW_EDITOR sets result to TR
UE, and sets message_out to the current text string. If the operator cancels the
editor, SHOW_EDITOR sets the resu! lt to FALSE and set the message_out to NULL.
NOTE: When an editor is displayed at run time, Oracle forms is in EDIT MODE, an
d no triggers fire until the operator returns to the Normal mode by dismising th
e editor. 61 What are the triggers that are valid in ENTER_QUERY mode ? The foll
owing triggers are valid in enter_query mode. 1] Key-* 2] On-error 3] On-message
4] When-triggers except When-New-form-Instance When-New-Block-Instance When-Dat
abase-Record When-Create-Record When-Validate_Record When-Remove_Record When-Val
idate-Item When-Image-Activated 62 What does the property called SECURE ? What w
ill happen when it is set to true ? Used to hide the value stored in a single-li
ne text item by designating the item as secure. For example, a password text ite
m can be made secure so that operator input does not echo to the screen. 63 What
do you mean by OWNERSHIP view and VISUAL view ? Ownership View In the ownership
view, all form objects are visible, and the display hierarchy corresponds to th
e Oracle Forms object ownership hierarchy: form--block--item. Items and relation
s are owned by blocks; blocks are owned by forms; triggers can be owned by forms
, blocks, or items; all other form objects (windows, editors, record groups, etc
.) are owned by forms. Visual View In the Visual view, only windows, canvas-view
s, and items are displayed. The Visual view hierarchy corresponds to the hierarc
hy of objects in a form window: window--canvas-view--item. Items are assigned to
canvas-views; canvas-views are assigned to windows. Each window can have multip
le canvas-views, and there can be multiple items on a single canvas-view. 64 How
to change the DEFAULT_WHERE clause and ORDER BY clause dynamically ? Use DEFAUL
T_WHERE and ORDER_BY propery SET_BLOCK_PROPERTY(block_id, property, value); SET_
BLOCK_PROPERTY(block_name, property, value); 65 How to modify the default NAVIGA
TION sequence ? Use NEXT_NAVIGATION_BLOCK and PREVIOUS_NAVIGATION_BLOCK property
. SET_BLOCK_PROPERTY(block_id, property, value); SET_BLOCK_PROPERTY(block_name,
property, value); 66 If I have a PRIMARY and FOREIGN KEY in the table and If I O
n the CONSTRAINT option what trigger will be created ? 67 If it is a COMPOSITE K
EY what type of trigger that will be created ? 1] KEY-DELREC [ Block Level ] 2]
WHEN-VALIDATE-RECORD [ Record Level ] 68 If I have a PRIMARY KEY in the table an
d while creating a block and If I On the constraint property what trigger will b
e created ? 1] KEY-DELREC [ Block Level ] 2] WHEN-VALIDATE-ITEM [ Item Level - D
ept No ] 69 If you are using PROCEDURES that are created in a] LIBRARY, b] DATAB
ASE, c] FORM level, Which will be advantageous ? Library. 70 What are the proper
ties of the ITEMS that you can validate without writting triggers ? Datatype, Re
quired, Fixed Legth, Maximum Length, Range Low Value / High Value. 71 Explain in
detail about DEBUGGER ? 72 What are the objects that I cannot create in the obj
ect navigator ? Boiler Plate Graphics Objects - Text, Line, Square, Oval, Freefo
rm etc., 73 Give a live example where you can use non-query record group ? a] Wh
en you want to dynamically sent the data from Forms to Reports. b] When you want
to validate a column to maintain Integrity Constraint at Form level. ( i.e befo
re commit.) 74 What are the values that a WHERE clause can reference in LOV ? a]
Item Names, b] parameter, c] Global Variables. 75 What are the types of items t
hat are always CONTROL items ? Text Item, List Item, Image Item, Check Box, Push
Button. 76 What are the different types of CUSTOM ITEMS and the Triggers associ
ated with them ? 77 What are the differences between FORMS 3.0 & FORMS 4.5 which
regards to MASTER - DETAIL relationship: Explain all the properties of MASTER -
DETAIL in detail ? 78 79 80 SQL*PLUS QUESTIONS Fill in the blanks : 1. No of Us
er variables in sql*plus is 1024. 2. User can have 100 many number of variables
per sql command. 3. User can have 500 many number of lines (assuming 80 characte
rs per line) per sql command. 4. The size of PL/SQL buffer in Oracle 7 is 2k and
in Oracle6 is 512k 5. Start command is used to run the contents of the specifie
d command file. 6. The intersect operator is used to get only those rows that re
turned by both the query. 7. The Grand command is used to set the System privile
ges, Object privileges. 8. The Savepoint command is used to identify the point i
n a transaction to which you can later Rollback. 9. To perform one of these oper
ations on your current transaction: * Establish your current transaction as eith
er a read only or a read-write transaction * Assign your current transaction to
a specified rollback segment The Set Transaction command is used. 10. The to-cha
r function is used to convert the number datatype to a value of varchar2 datatyp
e. 11. The Truncate command is used to remove all rows in a Table or Cluster ins
tantly. Note : We can not truncate rows from a table which is part of a cluster.
We cannot truncate rows from a table which has a referenced integrity constrain
t. The rows truncated can not be rollback where as deleted can. 12. The Cluster
is a schema object that contains one or more tables that have one or more column
s in common. 13. The Create Role command is used to set a set of privileges that
can be granted to users or to other roles. 14. To perform one of these function
s on an index,table, or cluster: * To collect statistics about the object used b
y the optimizer and store them in the data dictionary. * To delete statistics ab
out the object from the data dictionary. * To validate the structure of the obje
ct. * To identify migrated and chained rows of the table or cluster. The Analyze
Command is used. Select the Correct Answer: 1. An index can have as many as Col
umns. a] 255 b] 21 c] 16 d] None fo the above Ans: 16 2. A number of columns in
a table ranges from 1 to ---____ a] 255 b] 254 c] 030 d] None of the above Ans:
254 3. The maximum number of components in the Decode expression , including sea
rches, results and default is a] No limitation b] 255 Ans: 255 4. ___________ is
an alternative name for a table, view, sequence, procedure, stored function, pa
ckage, snapshot or another synonym. a] Synonym b] Data block c] View d] None of
the above Ans: Synonym 5. The _________ operator is used in character string com
parisons with pattern matching a] Between.. And b] Equal operator c] Set operato
r d] Like Ans: Like 6. __________ returns only one copy of each set of duplicate
rows selected. a] Unique b] Distinct c] Group By d] None of the above Ans: Uniq
ue - ( I think the answer is distinct. ) 7. _____________ is used to lock the se
lected rows a] Lock table b] For update of c] Object privileges d] Row share Ans
: For update of 8. _____________ Clause restricts the groups of rows returned to
those groups for the specified condition id True a] Where clause b] Having Clau
se c] Distinct d] Exists Ans: Having 9. The ________ option is used to return ro
ws in a hierarchial order a] Connect by start with b] Order by Ans: Connect by s
tart with 10. The ________ function is used to return the number of bytes in the
internal representation of expression a] Length b] Vsize c] LengthLB d] None of
the above Ans: Vsize ORACLE * FORMS TEST PAPER 1. The _______ built-in is used
to Exits the current form and enter the indicated form Ans: NEW_FORM 2. The ____
_______canvas_view can be used to display items or boilerplate graphics that ope
rators need to see only in certain situations Ans: Stacked 3. The --________ pac
kage contains constructs that provides ways to write and read information to and
from files Ans: Text_IO 4. On MS-Windows the lookup path for icon files is defi
ned by the _______ environment variable in the ORACLE.INI file Ans: TK21_ICONS 5
. If user receive an error in the ORA-3100 to ORA-3199 range when you try to log
on to Developer/2000 product, there may not be enough real-mode memory to estab
lish a Communication buffer with an Oracle server.______________ solves this pro
blem by reserving memory for server communications. Ans: NETINIT7.EXE 7. The ___
_________ property is used When queried records have been marked for inserts , u
pdates, specifies that only columns whose values were actually changed which sho
uld be included in the SQL UPDATE statement that is sent to the database during
a COMMIT. Ans: Update Changed Columns. 8. The _________ property specifies wheth
er Oracle Forms should validate the value of the text item against the values in
the attached LOV. Ans: LOV for Validation 9. A _____________ is an internal Ora
cle Forms data structure that has the column/row frame work similar to a databas
e. Ans: Record Group. 10. There a three types of Record Group they are__________
_________________. Ans: Static, Query record group, Non_query record group. 11.T
he ______ built-in is used to write data in the Forms to the Database, but does
not perform a database Commit. Ans: Post. 12. Two types of Windows are _________
________________ Ans: Document Window and Dialog Window. 13. The _____________ b
uilt-in is used to copy the values of each item in the record with the next lowe
r sequence number to the corresponding item in the current record. Ans: Duplicat
e record. 14. An _______ is a container for a group of objects that can be used
to copy or reference them in another module. Ans: Object Group. 15. Form the Fir
ing hierarcial for the Given triggers a] When-New-Item-Instance b] When-validate
-Item c] Key-Next-Item d] Post-change e] Post-Text-Item f] Pre-Text-Item Ans: F,
A,C,D,B,E. 16. Form the hierarchial for the Given Triggers a] When-New-Record-In
stance b] Pre-Record c] Post-Record d] When-Validate-Item e] When-Create-record
Ans: E,B,A,D,C. 17. Use an _________ Trigger for the following purposes: a] To t
rap and respond to an informative message. b] To replace a standard informative
message with a custom message. c] To exclude an in appropriate message. Ans: On_
Message. 18. Oracle Forms performs the following steps when the ______ trigger f
ails a] Sets the error location b] Rolls back to the recently issued Savepoint A
ns: On_Update or On_Insert or Pre_Insert or Pre_update or Post_Insert or Post_Up
date. 19. The _____ command is used to Execute the indicated Operating System Co
mmand. Ans: Host. 20. The maximum Number of Procedures and Functions in a Packag
e is _____. Ans: 255. 21. Oracle uses work areas called ______ to execute SQL St
atement and store processing Information. Ans: Private SQL Area. 22. Two Types o
f Cursors are ______________________. Ans: 1] Implicit Cursor, 2] Explicit Curso
r. 23. The variables declared in a subprogram specification and referenced in th
e subprogram body are____ parameters. Ans: Formal. 24. The __________ and ______
_____ are called Assignment Statements. Ans: 1] Select .. into .. 2] Fetch .. in
to .. 3] := ORACLE QUESTIONS & ANSWERS Questions Answers What is a Database ? A
Database can be one of the two definitions: ? A set of dictionary tables and use
r tables that are treated as a unit. ? One or more operating system files in whi
ch ORACLE stores the tables,views,and other objects:also, the set of database ob
jects used by a given application. ? A database is a collection of interrelated
data that are to be stored in a single location. It enables sharing of data amon
g various users as and when required. What is a Database system ? A Database sys
tem is a combination of an Instance and a Database. If the instance is started a
nd connected to an open database, then the database is available for access by t
he users. A DBMS is a software system with capabilities to organise, manipulate
and manage the data. Note:- A DBMS must be able to reliably manage a large amoun
t of data in a multi-user environment so that many users can concurrently access
the same data. A DBMS must also be secure from unauthorised access and provides
eficient solutions for failure recovery. What is an RDBMS ? A relational databa
se Mangement System (RDBMS) is a computer program for general purpose data stora
ge and retrieval that organizes data into tables consisting of one or more units
of information (rows), each containing the same set of data items (columns). OR
ACLE is a relational database management system. What are the differnt Database
models ? ? Hierarchial. ? Networking. ? Relational. What is SQL ? ? S.Q.L - Stru
ctured Query Language.SQL is the ANSI industry standard language, used to manipu
late information in a relational database and used in ORACLE and IBM DB2 relatio
nal database management systems. SQL is formally pronounced \'13sequel\'14, alth
ough common usage also pronounces it \'13S.Q.L.\'14 ? SQL is a set of commands t
hat all programmers must use to access data within the tables of Database. What
are the benefits of SQL ? 1. It is flexible, Powerful and easy to learn. 2. It i
s a non-procedural language. It a] Processes set of records rather than just one
at a time and b] Provides automatic navigation to the data. 3. It provides comm
ands for a variety of tasks including : a] Querying data b] Creating,Updating an
d Replacing objects and Inserting, Updating and Deleting rows. 4. All RDBMS supp
orts SQL Thus one can transfer the skills gained with SQL from one RDBMS to anot
her. 5. Programs written in SQL are portable, they can often be moved from one d
atabase to another with little modification. What is SQL*PLUS ? SQL*PLUS is the
ORACLE database language which includes ANSI standard SQL commands plus addition
al commands for accessing data in ORACLE database. SQL*PLUS is a Structured Quer
y Language supported by Oracle. Through this only, we store, retrieve, edit, ent
er & run SQL commands and PL/SQL blocks. We can perform calculations , list colu
mn definitions, format query reults in the form of a query. What is PL/SQL ? It
is a Procedural Language extension of SQL. It can contain any no of SQL statemen
ts integrated with flow of control statements. Thus it combine the Data Manipula
ting power of SQL with data processing power of Procedural language. What are th
e different types of SQL commands ? DDL ( Data definition language ) DML ( Data
manipulation language ) TCL ( Transact control language) Session Control Stateme
nts. ( ALTER SESSION, ROLE ) System Control Statements. ( ALTER SYSTEM ) What is
A DDL statements? DDL statements are one catagory of SQL statements. DDL statem
ents define (create) or delete (drop) database objects.Examples are ceate view,
create table, create index,drop table and rename tabl. The other catagories are
DML statements and DCL statements. What is a DML statements ? DML statements are
one catagory of SQL statements. DML statements, such as select, insert, delete
and update, query and update the actual data. The other catagories are DDL state
ments and DCL statements. What are DCL statements ? DML statements are one catag
ory of SQL statements. DCLstatments such as, connect, grant select,grant update
and revoke dba, control access to the data and to the database. The other catago
ries are DDL and DML statements. What is a Transaction ? ? It can be defined as
a logical unit of work. ? A transaction is a sequence of SQL statements that ORA
CLE treats as a single unit. The set of statements is made permanent with the CO
MMIT statement. Part or all of a transaction can de undone with the ROLLBACK sta
tement. ? All changes to the database between successive COMMITS and / or ROLLBA
CK operations are called a transaction. What is a Commit ? ? COMMIT commits any
changes made to the database since the last COMMIT was executed implicitly or ex
plicitly. WORK is optional and has no effect on usage. ? To COMMIT means to make
changes to data (inserts,updates and deletes) permanent. before changes are sto
red both the old and new data exists so that changes can be made, or so that the
data can be restored to its prior state.(\'13rollback\'14). When a user enters
the ORACLE SQL Command COMMIT, all changes from that transaction are made perman
ent. ? To end a transaction and make permanent all changes performed in the tran
saction. This command also erases all Savepoints in the transaction and release
the transaction locks What is a Rollback ? ? A ROLLBACK discards part or all of
the work you have done in the current transaction, since the last COMMIT or SAVE
POINT. ? To undo work done in current tranaction. What is locking ? To lock is t
o temporarily restrict other user\'12s access to data. The restriction is placed
on such data is called \'13a lock\'14. The modes are SHARE, SHARE UPDATE,EXCLUS
IVE,ROW SHARE AND ROW EXCLUSIVE. Not all locks can be acquired in all modes. EXC
LUSIVE locks permit users to query the locked table but not to do anything else.
No other user may lock the table. SHARED locks permit concurrent queries but no
updates to the locked table. With a ROW SHARE or SHARE UPDATE lock, no users ca
n lock the whole table for exclusive access, allowing concurrent access for all
users to the table. The two types of locks are synonymous, and SHARE UPDATE exis
ts for compatibility with previous vrsions of ORACLE. ROW EXCLUSIVE locks are si
milar to ROW SHARE but they prohibit shared locking, so only one user user may a
ccess the table at the same time. What is a Savepoint ? The Savepoint is used to
identify the point in a transaction to which you can later Rollback. What is SH
ARE LOCK ? A SHARE lock is one that permits other users to query data, but not t
o change it. What is SHARE UPDATE LOCK ? A SHARE UPDATE lock is one that permits
other users to both query and lock data. What is EXCLUSIVE LOCK ? An EXCLUSIVE
LOCK is one that permits other users to query data, but not to change it. It dif
fers from the SHARE lock because it does not permit another user to place any ty
pe of lock on the same data; several users may place SHARE locks on the same dat
a at the same time. What is a ROW SHARE LOCK ? With a ROW SHARE or SHARE UPDATE
lock, no users can lock the whole table for exclusive access, allowing concurren
t access for all users to the table. What is a ROW EXCLUSIVE LOCK ? ROW EXCLUSIV
E locks are similar to ROW SHARE but they prohibit shared locking, so only one u
ser may access the table at the same time. What is a DEAD LOCK ? A DEAD lock is
a rare situation in which two or more user processes of a database cannot comple
te theirtransactions.This occurs because each process is holding a resource that
the other process requires (such as a row in a table) in order to complete.Alth
ough these situations occur rarely, ORACLE detects and resolves deadlocks by rol
ling back the work of one of the processes. \par
\par
}


Vous aimerez peut-être aussi