Database Fundamentals: Keys, Cursors, and PL/SQL
Quiz covering database concepts including primary keys, transactions, cursors, indexes, PL/SQL programming, triggers, and constraints in DB2 and Oracle.
Questions
Cascade option is used
- disable dependent integrity constraint
- deactivate an integrity constraint
- both of above
- none of above
To View all constraint definition and name table used is
- sys_constraints
- user_constraints
- tab_constraints
- col_constraints
View column associated with the constraint names view used is
- user_tab_columns
- user_cons_columns
- user_sys_columns
- all of above
can we insert a record in dual?
- True
- False
Can a primary key contain more than one columns?
- True
- False
Which one among the following is more faster?
- IN
- EXISTS
- LIKE
- EXIST
Can we use a scalar data type as return type for CURSOR?
- True
- False
Can cursor variables be stored in PL/SQL tables?
- True
- False
Can a function take OUT parameters.?
- True
- False
Can the default values be assigned to actual parameters?
- True
- False
Can you use a commit statement within a database trigger?
- True
- False
Can we call a procedure from Anonymous PL/SQL block?
- True
- False
can we have more than one column of BLOB(data type to store images) in a table?
- True
- False
Which of the following can duplicate the structure and related objects of a database table?
- Copy table
- Alter table
- Export table
- Generate DDL
DB2 Cursor Stablity i) Cursor Stablity Leads to Higher concurency ii) Repeatable Read Leads to Higher consistency
- Both are True
- i) Is Only True
- ii) is only True
- Neither is True
DB2 Indexes i ) Unique Index can be created only on Primary Key. ii) Query will execute faster if predicates are applied on Indexed column.
- Both are True
- i) Is Only True
- ii) is only True
- Neither is True
DB2 Index Storate Format Indexes is Stored in
- B - Tree format
- Hash Table
- AVL Tree
- Red Black Tree
When do you open cursor before Fetching i) Cursor should always be Opened before Fetching ii) Fetch Operation cursor retrieves Only ONE row for every execution.
- Both are True
- i) Is Only True
- ii) is only True
- Neither is True
Two or more transactions in a simultaneous wait state, each waiting for other to release before it can proceed, is called
- Lost Update
- uncommitted dependency
- infinite loop
- Deadlock
- With hold
Which of the following is TRUE about Primary Key?
- Same value of Primary Key can appear in more than one row in the table
- A Primary key defined column can be of type LONG
- A column that is defined as Primary Key cannot contain NULL value.
- Both A. and B.