πŸ—„οΈ

Database Management System MCQs

749+ questions with answers

651

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.

a Validation protocol
b Validation-based protocol
c Timestamp protocol
d Timestamp-ordering protocol
Medium
View Details β†’
652

This validation scheme is called the _________ scheme since transactions execute optimistically, assuming they will be able to finish execution and validate at the end.

a Validation protocol
b Validation-based protocol
c Timestamp protocol
d Optimistic concurrency-control
Medium
View Details β†’
653

The most recent version of standard SQL prescribed by the American National Standards Institute is

a SQL 2016
b SQL 2002
c SQL – 4
d SQL2
Medium
View Details β†’
654

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 BETWEEN
b IS NULL
c LIKE
d IN
Medium
View Details β†’
655

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 Database-level lock
b Table-level lock
c Page-level lock
d Row-level lock
Medium
View Details β†’
656

A condition that occurs when two transactions wait for each other to unlock data is known as a(n)

a Shared lock
b Exclusive lock
c Binary lock
d Deadlock
Medium
View Details β†’
657

_______ means that data used during the execution of a transaction cannot be used by a second transaction until the first one is completed.

a Serializability
b Atomicity
c Isolation
d Time stamping
Medium
View Details β†’
658

A unit of storage that can store one or more records in a hash file organization is denoted as

a Buckets
b Disk pages
c Blocks
d Nodes
Medium
View Details β†’
659

Which of the following is not true about B+ trees?

a B+ tree index takes the form of balanced tree
b Performance of B+ tree degrades as the file grows
c Look-up in B+ tree is straightforward and efficient
d Insertion and deletion in B+ tree is complicated but efficient
Medium
View Details β†’
660

The extent of the database resource that is included with each lock is called the level of

a Impact
b Granularity
c Management
d DBMS control
Medium
View Details β†’
661

DBMS periodically suspends all processing and synchronizes its files and journals through the use of

a Checkpoint facility
b Backup facility
c Recovery manager
d Database change log
Medium
View Details β†’
662

Snapshot isolation is a particular type of ______________ scheme.

a Concurrency-control
b Concurrency-allowance
c Redirection
d Repetition-allowance
Medium
View Details β†’
663

Snapshot isolation is used to give

a Transaction a snapshot of the database
b Database a snapshot of the transaction
c Database a snapshot of committed values in the transaction
d Transaction a snapshot of the database and Database a snapshot of committed values in the transaction
Medium
View Details β†’
664

Lost update problem is

a Second update overwrites the first
b First update overwrites the second
c The updates are lost due to conflicting problem
d None of the mentioned
Medium
View Details β†’
665

Under first updater wins the system uses a __________ mechanism that applies only to updates.

a Close
b Read
c Locking
d Beat
Medium
View Details β†’
666

When a transaction Ti attempts to update a data item, it requests a _________ on that data item.

a Read lock
b Update lock
c Write lock
d Chain lock
Medium
View Details β†’
667

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

a Read skew
b Update skew
c Write lock
d None of the mentioned
Medium
View Details β†’
668

Evaluate the CREATE TABLE statement: CREATE TABLE products (product_id NUMBER(6) CONSTRAINT prod_id_pk PRIMARY KEY, product_name VARCHAR2(15));

a It would be created only if a unique index is manually created first
b It would be created and would use an automatically created unique index
c It would be created and would use an automatically created no unique index
d It would be created and remains in a disabled state because no index is specified in the command
Medium
View Details β†’
669

Evaluate the following CREATE SEQUENCE statement: CREATE SEQUENCE seq1 START WITH 100 INCREMENT BY 10 MAXVALUE 200 CYCLE NOCACHE;

a 1
b 10
c 100
d an error
Medium
View Details β†’
670

In which scenario would you use the ROLLUP operator for expression or columns within a GROUP BY clause?

a To find the groups forming the subtotal in a row
b To create group-wise grand totals for the groups specified within a GROUP BY clause
c To create a grouping for expressions or columns specified within a GROUP BY clause in one direction, from right to left for calculating the subtotals
d To create a grouping for expressions or columns specified within a GROUP BY clause in all possible directions, which is cross-tabular report for calculating the subtotals
Medium
View Details β†’
671

Which statements are correct regarding indexes?

a When a table is dropped, the corresponding indexes are automatically dropped
b For each DML operation performed, the corresponding indexes are automatically updated
c A non-deferrable PRIMARY KEY or UNIQUE KEY constraint in a table automatically creates a unique index
d All of the mentioned
Medium
View Details β†’
672

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;

a All the statements before the DELETE statement would be rolled back
b All the statements before the DELETE statement would be implicitly committed within the session
c All the statements up to the ALTER TABLE statement would be committed and the outcome of UPDATE statement would be r
d All the statements up to the ALTER TABLE statement would be committed and the outcome of the UPDATE statement is r
Medium
View Details β†’
673

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 It would not display any values
b It would display the value TWO once
c It would display the value TWO twice
d It would display the values ONE, TWO, and TWO
Medium
View Details β†’
674

A non-correlated subquery can be defined as________

a A set of sequential queries, all of which must always return a single value
b A set of sequential queries, all of which must return values from the same table
c A SELECT statement that can be embedded in a clause of another SELECT statement only
d A set of one or more sequential queries in which generally the result of the inner query is used as the search value in the o
Medium
View Details β†’
675

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;

a Statement 1 would not execute because the WITH GRANT option is missing
b Statement 1 would not execute because the IDENTIFIED BY clause is missing
c Statement 3 would not execute because role and system privileges cannot be granted together in a single GRANT statement
d Statement 2 would not execute because system privileges and object privileges cannot be granted together in a single GR
Medium
View Details β†’
676

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;

a SCOTT would be able to query the OE.ORDERS table
b SCOTT would not be able to query the OE.ORDERS table
c The REVOKE statement would remove the SELECT privilege from SCOTT as well as from the role R1
d The REVOKE statement would give an error because the SELECT privilege has been granted to the role R1
Medium
View Details β†’
677

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;

a No SQL statement would be rolled back
b Both the DELETE statements would be rolled back
c Only the second DELETE statement would be rolled back
d Both the DELETE statements and the UPDATE statement would be rolled back
Medium
View Details β†’
678

The method of access that uses key transformation is called as

a Direct
b Hash
c Random
d Sequential
Medium
View Details β†’
679

Why do we need concurrency control on B+ trees ?

a To remove the unwanted data
b To easily add the index elements
c To maintain accuracy of index
d All of the mentioned
Medium
View Details β†’
680

How many techniques are available to control concurrency on B+ trees?

a One
b Three
c Four
d None of the mentioned
Medium
View Details β†’
681

In crabbing protocol locking

a Goes down the tree and back up
b Goes up the tree and back down
c Goes down the tree and releases
d Goes up the tree and releases
Medium
View Details β†’
682

The deadlock can be handled by

a Removing the nodes that are deadlocked
b Restarting the search after releasing the lock
c Restarting the search without releasing the lock
d Resuming the search
Medium
View Details β†’
683

In crabbing protocol, the lock obtained on the root node is in _________ mode.

a Shared
b Exclusive
c Read only
d None of the mentioned
Medium
View Details β†’
684

In crabbing protocol to inset or delete a key value the leaf node has to be locked in ___________ mode.

a Shared
b Exclusive
c Read only
d None of the mentioned
Medium
View Details β†’
685

B-link tree requires a pointer to its __________ sibling.

a Upper
b Lower
c Right
d Left
Medium
View Details β†’
686

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.

a B+ tree locking
b Link level locking
c Key-value locking
d Next value locking
Medium
View Details β†’
687

The recovery scheme must also provide

a High availability
b Low availability
c High reliability
d High durability
Medium
View Details β†’
688

Which one of the following is a failure to a system

a Boot crash
b Read failure
c Transaction failure
d All of the mentioned
Medium
View Details β†’
689

Which of the following belongs to transaction failure

a Read error
b Boot error
c Logical error
d All of the mentioned
Medium
View Details β†’
690

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

a Read error
b Boot error
c Logical error
d System error
Medium
View Details β†’
691

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

a Read error
b Boot error
c Logical error
d System error
Medium
View Details β†’
692

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

a Stop assumption
b Fail assumption
c Halt assumption
d Fail-stop assumption
Medium
View Details β†’
693

The failure occurred sufficiently early during the transfer that the destination block remains intact.

a Partial Failure
b Total failure
c Successful completion
d Data transfer failure
Medium
View Details β†’
694

The database is partitioned into fixed-length storage units called

a Parts
b Blocks
c Reads
d Build
Medium
View Details β†’
695

Which of the following causes system to crash

a Bug in software
b Loss of volatile data
c Hardware malfunction
d All of the mentioned
Medium
View Details β†’
696

The log is a sequence of _________ recording all the update activities in the database.

a Log records
b Records
c Entries
d Redo
Medium
View Details β†’
697

In the ___________ scheme, a transaction that wants to update the database first creates a complete copy of the database.

a Shadow copy
b Shadow Paging
c Update log records
d All of the mentioned
Medium
View Details β†’
698

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.

a Shadow copy
b Shadow Paging
c Update log records
d All of the mentioned
Medium
View Details β†’
699

The current copy of the database is identified by a pointer, called ____________ which is stored on disk.

a Db-pointer
b Update log
c Update log records
d All of the mentioned
Medium
View Details β†’
700

If a transaction does not modify the database until it has committed, it is said to use the ___________ technique.

a Deferred-modification
b Late-modification
c Immediate-modification
d Undo
Medium
View Details β†’