PLSQL Questions
PLSQL Questions
(PL/SQL)
2. What is an Index?(PL/SQL)
Unique Index.
This indexing does not allow the field to have duplicate values if the column is
unique indexed.
Unique index can be applied automatically when primary key is defined.
Clustered Index.
This type of index reorders the physical order of the table and search based on the
key values.
Each table can have only one clustered index.
NonClustered Index.
NonClustered Index does not alter the physical order of the table and maintains
logical order of data.
Each table can have 999 nonclustered indexes.
4. What is a Cursor?(PL/SQL)
A database Cursor is a control which enables traversal over the rows or records in
the table.
This can be viewed as a pointer to one row in a set of rows.
Cursor is very much useful for traversing such as retrieval, addition and removal
of database records.
6. What is a trigger?(PL/SQL)
A nonclustered index does not alter the way it was stored but creates a complete
separate object within the table.
It point back to the original table rows after searching.
Stored procedure can be used as a modular programming � means create once, store
and call for several times whenever required.
This supports faster execution instead of executing multiple queries.
This reduces network traffic and provides better security to the data.
Disadvantage is that it can be executed only in the Database and utilizes more
memory in the database server.