Database Management System MCQs
749+ questions with answers
The __________ requires that each transaction Ti executes in two or three different phases in its lifetime, depending on whether it is a read-only or an update transaction.
This validation scheme is called the _________ scheme since transactions execute optimistically, assuming they will be able to finish execution and validate at the end.
The most recent version of standard SQL prescribed by the American National Standards Institute is
ANSI-standard SQL allows the use of special operators in conjunction with the WHERE clause. A special operator used to check whether an attribute value is null is
A lock that prevents the use of any tables in the database from one transaction while another transaction is being processed is called a
A condition that occurs when two transactions wait for each other to unlock data is known as a(n)
_______ means that data used during the execution of a transaction cannot be used by a second transaction until the first one is completed.
A unit of storage that can store one or more records in a hash file organization is denoted as
Which of the following is not true about B+ trees?
The extent of the database resource that is included with each lock is called the level of
DBMS periodically suspends all processing and synchronizes its files and journals through the use of
Snapshot isolation is a particular type of ______________ scheme.
Snapshot isolation is used to give
Lost update problem is
Under first updater wins the system uses a __________ mechanism that applies only to updates.
When a transaction Ti attempts to update a data item, it requests a _________ on that data item.
Each of a pair of transactions has read data that is written by the other, but there is no data written by both transactions, is referred to as
Evaluate the CREATE TABLE statement: CREATE TABLE products (product_id NUMBER(6) CONSTRAINT prod_id_pk PRIMARY KEY, product_name VARCHAR2(15));
Evaluate the following CREATE SEQUENCE statement: CREATE SEQUENCE seq1 START WITH 100 INCREMENT BY 10 MAXVALUE 200 CYCLE NOCACHE;
In which scenario would you use the ROLLUP operator for expression or columns within a GROUP BY clause?
Which statements are correct regarding indexes?
You executed the following SQL statements in the given order: CREATE TABLE orders (order_id NUMBER(3) PRIMARY KEY, order_date DATE, customer_idnumber(3)); INSERT INTO orders VALUES (100,'10-mar-2007,,222); ALTER TABLE orders MODIFY order_date NOT NULL; UPDATE orders SET customer_id=333; DELETE FROM order;
Evaluate the following statements: CREATE TABLE digits (id NUMBER(2), description VARCHAR2(15)); INSERT INTO digits VALUES (1,'ONE); UPDATE digits SET description ='TWO'WHERE id=1; INSERT INTO digits VALUES (2 ,'TWO'); COMMIT; DELETE FROM digits; SELECT description FROM digits VERSIONS BETWEEN TIMESTAMP MINVALUE AND MAXVALUE;
A non-correlated subquery can be defined as________
SCOTT is a user in the database. Evaluate the commands issued BY the DBA: 1 - CREATE ROLE mgr; 2 - GRANT CREATE TABLE, SELECT ON oe. orders TO mgr; 3 - GRANT mgr, CREATE TABLE TO SCOTT;
OE and SCOTT are the users in the database. The ORDERS table is owned by OE. Evaluate the statements issued by the DBA in the following sequence: CREATE ROLE r1; GRANT SELECT, INSERT ON oe. orders TO r1; GRANT r1 TO scott; GRANT SELECT ON oe. orders TO scott; REVOKE SELECT ON oe.orders FROM scott;
Given below are the SQL statements executed in a user session: CREATE TABLE product (pcode NUMBER(2), pnameVARCHAR2(10)); INSERT INTO product VALUES(1, 'pen'); INSERT INTO product VALUES (2,'penci'); SAVEPOINT a; UPDATE product SET pcode = 10 WHERE pcode = 1; SAVEPOINT b; DELETE FROM product WHERE pcode = 2; COMMIT; DELETE FROM product WHERE pcode=10; ROLLBACK TO SAVEPOINT a;
The method of access that uses key transformation is called as
Why do we need concurrency control on B+ trees ?
How many techniques are available to control concurrency on B+ trees?
In crabbing protocol locking
The deadlock can be handled by
In crabbing protocol, the lock obtained on the root node is in _________ mode.
In crabbing protocol to inset or delete a key value the leaf node has to be locked in ___________ mode.
B-link tree requires a pointer to its __________ sibling.
Instead of locking index leaf nodes in a two-phase manner, some index concurrency-control schemes use ___________ on individual key values, allowing other key values to be inserted or deleted from the same leaf.
The recovery scheme must also provide
Which one of the following is a failure to a system
Which of the following belongs to transaction failure
The system has entered an undesirable state (for example, deadlock), as a result of which a transaction cannot continue with its normal execution. This is
The transaction can no longer continue with its normal execution because of some internal condition, such as bad input, data not found, overflow, or resource limit exceeded. This is
The assumption that hardware errors and bugs in the software bring the system to a halt, but do not corrupt the nonvolatile storage contents, is known as the
The failure occurred sufficiently early during the transfer that the destination block remains intact.
The database is partitioned into fixed-length storage units called
Which of the following causes system to crash
The log is a sequence of _________ recording all the update activities in the database.
In the ___________ scheme, a transaction that wants to update the database first creates a complete copy of the database.
The ____________ scheme uses a page table containing pointers to all pages; the page table itself and all updated pages are copied to a new location.
The current copy of the database is identified by a pointer, called ____________ which is stored on disk.
If a transaction does not modify the database until it has committed, it is said to use the ___________ technique.