Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

How many techniques are available to control concurrency on B+ trees?(a) One(b) Three(c) Four(d) None of the mentionedI got this question during an interview.The above asked question is from Concurrency in Index Structures in chapter Concurrency Control of Database Management

Answer»

The CORRECT choice is (d) None of the mentioned

Easiest EXPLANATION - Two TECHNIQUES are PRESENT.

2.

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 lockI had been asked this question during an online interview.The query is from Snapshot Isolation topic in chapter Concurrency Control of Database Management

Answer»

Correct CHOICE is (c) WRITE lock

Easiest EXPLANATION - Reads are unaffected by this, SINCE they do not obtain locks.

3.

The file organization which allows us to read records that would satisfy the join condition by using one block read is(a) Heap file organization(b) Sequential file organization(c) Clustering file organization(d) Hash files organizationThe question was posed to me during an interview.Origin of the question is Multiversion Schemes topic in portion Concurrency Control of Database Management

Answer»

The correct answer is (c) Clustering file ORGANIZATION

To explain: Clustering file organization allows US to READ records that WOULD satisfy the join condition by using one BLOCK read.

4.

Which of the following are introduced to reduce the overheads caused by the log-based recovery?(a) Checkpoints(b) Indices(c) Deadlocks(d) LocksThe question was asked in homework.This is a very interesting question from Lock-Based Protocols topic in portion Concurrency Control of Database Management

Answer»

The CORRECT CHOICE is (a) CHECKPOINTS

Easiest explanation - Checkpoints are introduced to reduce overheads CAUSED by the log-based recovery.

5.

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 transactionI got this question by my school teacher while I was bunking the class.I want to ask this question from Snapshot Isolation topic in section Concurrency Control of Database Management

Answer»

Correct answer is (d) TRANSACTION a snapshot of the database and Database a snapshot of COMMITTED values in the transaction

Best explanation: The data values in the snapshot CONSIST only of values written by committed transactions.

6.

Which of the following protocols ensures conflict serializability and safety from deadlocks?(a) Two-phase locking protocol(b) Time-stamp ordering protocol(c) Graph based protocol(d) None of the mentionedI got this question by my school principal while I was bunking the class.This intriguing question originated from Lock-Based Protocols topic in portion Concurrency Control of Database Management

Answer»

The correct answer is (B) Time-stamp ordering protocol

To explain: Time-stamp ordering protocol ensures conflict SERIALIZABILITY and SAFETY from DEADLOCKS.

7.

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 mentionedThe question was posed to me by my school principal while I was bunking the class.My doubt is from Concurrency in Index Structures topic in division Concurrency Control of Database Management

Answer»

The CORRECT CHOICE is (c) To maintain accuracy of index

Easy explanation - Indices do not have to be treated LIKE other DATABASE STRUCTURES.

8.

In crabbing protocol, the lock obtained on the root node is in _________ mode.(a) Shared(b) Exclusive(c) Read only(d) None of the mentionedI got this question during an online interview.This interesting question is from Concurrency in Index Structures in portion Concurrency Control of Database Management

Answer»

Right choice is (a) Shared

The BEST explanation: Crabbing PROTOCOL moves in a CRAB LIKE manner down the index tree.

9.

Under first updater wins the system uses a __________ mechanism that applies only to updates.(a) Close(b) Read(c) Locking(d) BeatThe question was asked during an internship interview.This is a very interesting question from Snapshot Isolation in chapter Concurrency Control of Database Management

Answer»

Right choice is (C) Locking

Easy EXPLANATION - Reads are UNAFFECTED by this, SINCE they do not obtain LOCKS.

10.

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 lockI got this question during an interview.This interesting question is from Multiversion Schemes in section Concurrency Control of Database Management

Answer» RIGHT answer is (a) Database-level lock

To explain: Data base-level lock prevents the USE of any tables in the data base from one TRANSACTION while another transaction is being PROCESSED.
11.

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) INThis question was addressed to me in an international level competition.Asked question is from Multiversion Schemes topic in chapter Concurrency Control of Database Management

Answer»

Right OPTION is (B) IS NULL

The BEST I can EXPLAIN: EXISTS is used to check whether an attribute value is null or not in conjunction with the where clause.

12.

In a database the fileis contained in ________(a) Entire database(b) Two area(c) One area(d) more than one areaI had been asked this question in exam.My doubt stems from Multiple Granularity in portion Concurrency Control of Database Management

Answer» CORRECT ANSWER is (C) One area

The best explanation: This LEVEL is below the ROOT of the tree.
13.

If transaction Ti gets an explicit lock on the file Fc in exclusive mode, then it has an ­­­­­­__________ on all the records belonging to that file.(a) Explicit lock in exclusive mode(b) Implicit lock in shared mode(c) Explicit lock in shared mode(d) Implicit lock in exclusive modeI have been asked this question by my college professor while I was bunking the class.I need to ask this question from Lock-Based Protocols topic in section Concurrency Control of Database Management

Answer»

Right answer is (d) Implicit lock in exclusive MODE

Best explanation: If transaction TI GETS an explicit lock on the file Fc in exclusive mode, then it has an implicit lock in exclusive mode on all the RECORDS BELONGING to that file.

14.

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 mentionedI had been asked this question during an online interview.Question is from Insertion Deletion Predicate Reads topic in section Concurrency Control of Database Management

Answer» CORRECT answer is (d) All of the mentioned

Best EXPLANATION: Indexes are USED to access the DATA EFFICIENTLY.
15.

An application developer can guard against certain snapshot anomalies by appending a ______ clause to the SQL select query.(a) For update(b) For read(c) For write(d) None of the mentionedThe question was asked in an international level competition.My doubt stems from Snapshot Isolation topic in section Concurrency Control of Database Management

Answer»

The correct OPTION is (a) For update

The explanation is: Adding the for update CLAUSE causes the system to treat DATA that are read as if they had been updated for purposes of concurrency CONTROL.

16.

_______ 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 stampingI got this question by my school teacher while I was bunking the class.My question is taken from Multiversion Schemes topic in section Concurrency Control of Database Management

Answer» CORRECT choice is (c) ISOLATION

Explanation: Isolation means that data USED during the execution of a transaction can’t be used by a SECOND transaction until the first one is completed.
17.

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 mentionedI had been asked this question during an online interview.This interesting question is from Concurrency in Index Structures topic in section Concurrency Control of Database Management

Answer»

Correct answer is (b) Exclusive

The best I can explain: CRABBING PROTOCOL moves in a CRAB like manner down the INDEX TREE.

18.

The method of access that uses key transformation is called as(a) Direct(b) Hash(c) Random(d) SequentialThe question was asked by my college director while I was bunking the class.My doubt is from Concurrency in Index Structures in division Concurrency Control of Database Management

Answer»

The correct option is (B) Hash

Best EXPLANATION: Hash technique USES PARTICULAR hash KEY value.

19.

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 outer queryThis question was addressed to me during an interview.My query is from Insertion Deletion Predicate Reads topic in division Concurrency Control of Database Management

Answer»

Correct ANSWER is (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 outer query

To explain: A noncorrelated subquery is subquery that is independent of the outer query and it can EXECUTED on its own without RELYING on main outer query.

20.

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 mentionedThis question was addressed to me in examination.My question is from Snapshot Isolation topic in chapter Concurrency Control of Database Management

Answer» CORRECT choice is (a) Second update overwrites the first

The best I can EXPLAIN: Lost update PROBLEM has to be RESOLVED.
21.

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) DeadlockThis question was addressed to me by my school teacher while I was bunking the class.This interesting question is from Multiversion Schemes in chapter Concurrency Control of Database Management

Answer»

Right answer is (d) Deadlock

Easy explanation - Deadlock OCCURS when two TRANSACTIONS WAIT for each other to unlock data.

22.

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 protocolThis question was addressed to me in semester exam.Question is taken from Multiple Granularity topic in section Concurrency Control of Database Management

Answer»

The correct ANSWER is (a) Validation protocol

The BEST explanation: A concurrency-control scheme imposes the overhead of code execution and possible delay of transactions. It may be BETTER to use an ALTERNATIVE scheme that imposes LESS overhead.

23.

In order to maintain transactional integrity and database consistency, what technology does a DBMS deploy?(a) Triggers(b) Pointers(c) Locks(d) CursorsThe question was posed to me in an interview for job.I would like to ask this question from Lock-Based Protocols in division Concurrency Control of Database Management

Answer»

Right choice is (c) Locks

For explanation: Locks are USED to maintain DATABASE CONSISTENCY.

24.

If a node is locked in ______________ the subtree rooted by that node is locked explicitly in shared mode, and that explicit locking is being done at a lower level with exclusive-mode locks.(a) Intention lock modes(b) shared and intention-exclusive (SIX) mode(c) Intention-exclusive (IX) mode(d) Intention-shared (IS) modeThe question was posed to me in an internship interview.Question is from Multiple Granularity topic in division Concurrency Control of Database Management

Answer»

The CORRECT OPTION is (b) shared and intention-EXCLUSIVE (SIX) mode

To explain: There is an intention mode ASSOCIATED with shared mode, and there is one with an exclusive mode.

25.

A lock that allows concurrent transactions to access different rows of the same table is known as a(a) Database-level lock(b) Table-level lock(c) Page-level lock(d) Row-level lockThe question was asked in an online quiz.The doubt is from Lock-Based Protocols topic in section Concurrency Control of Database Management

Answer» CORRECT answer is (d) Row-level lock

To explain: LOCKS are USED to MAINTAIN database CONSISTENCY.
26.

If needed to split a node or coalesce it with its siblings, or redistribute key values between siblings, the crabbing protocol locks the parent of the node in ____________ mode.(a) Shared(b) Exclusive(c) Read only(d) None of the mentionedThis question was addressed to me by my college professor while I was bunking the class.This interesting question is from Concurrency in Index Structures topic in division Concurrency Control of Database Management

Answer»

The correct option is (b) Exclusive

The best explanation: Crabbing PROTOCOL MOVES in a crab LIKE MANNER down the INDEX tree.

27.

Snapshot isolation is a particular type of ______________ scheme.(a) Concurrency-control(b) Concurrency-allowance(c) Redirection(d) Repetition-allowanceThe question was asked in an interview for job.This interesting question is from Snapshot Isolation in section Concurrency Control of Database Management

Answer» CORRECT option is (a) Concurrency-control

Best explanation: It has gained WIDE acceptance in commercial and open-source SYSTEMS, including Oracle, PostgreSQL, and SQL Server.
28.

If a node is locked in an intention mode, explicit locking is done at a lower level of the tree. This is called(a) Intention lock modes(b) Explicit lock(c) Implicit lock(d) Exclusive lockThe question was asked during an internship interview.This interesting question is from Multiple Granularity topic in chapter Concurrency Control of Database Management

Answer» RIGHT option is (a) Intention lock modes

For explanation: There is an intention mode associated with SHARED mode, and there is ONE with an exclusive mode.
29.

The situation where the lock waits only for a specified amount of time for another lock to be released is(a) Lock timeout(b) Wait-wound(c) Timeout(d) WaitThis question was posed to me in unit test.This key question is from Deadlocks in section Concurrency Control of Database Management

Answer»

Correct option is (a) Lock timeout

To EXPLAIN: The timeout scheme is particularly EASY to implement, and works well if TRANSACTIONS are SHORT and if longwaits are likely to be due to deadlocks.

30.

The deadlock state can be changed back to stable state by using _____________ statement.(a) Commit(b) Rollback(c) Savepoint(d) DeadlockThe question was asked at a job interview.This interesting question is from Deadlocks in division Concurrency Control of Database Management

Answer»

The correct option is (B) Rollback

The best I can explain: Rollback is USED to rollback to the POINT before lock is obtained.

31.

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 controlI got this question in my homework.This is a very interesting question from Multiversion Schemes topic in portion Concurrency Control of Database Management

Answer»

Correct choice is (b) Granularity

The explanation is: The extent of the data base RESOURCE that is INCLUDED with each LOCK is CALLED the level of Granularity.

32.

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 releasesI had been asked this question in final exam.My enquiry is from Concurrency in Index Structures in division Concurrency Control of Database Management

Answer»

Right choice is (a) GOES down the tree and BACK up

The explanation is: It moves in a CRAB LIKE manner.

33.

If a node is locked in __________ explicit locking is being done at a lower level of the tree, but with only shared-mode locks.(a) Intention lock modes(b) Intention-shared-exclusive mode(c) Intention-exclusive (IX) mode(d) Intention-shared (IS) modeI had been asked this question at a job interview.Enquiry is from Multiple Granularity topic in section Concurrency Control of Database Management

Answer» RIGHT answer is (a) INTENTION lock modes

Easiest EXPLANATION - There is an intention mode associated with shared mode, and there is one with an exclusive mode.
34.

All lock information is managed by a __________ which is responsible for assigning and policing the locks used by the transactions.(a) Scheduler(b) DBMS(c) Lock manager(d) Locking agentThe question was asked in semester exam.My question is taken from Lock-Based Protocols in chapter Concurrency Control of Database Management

Answer»

Correct option is (c) Lock manager

Easiest explanation - A distributed lock manager (DLM) PROVIDES distributed software APPLICATIONS with a means to SYNCHRONIZE their accesses to shared resources.

35.

What are the ways of dealing with deadlock?(a) Deadlock prevention(b) Deadlock recovery(c) Deadlock detection(d) All of the mentionedThis question was addressed to me in homework.Query is from Deadlocks topic in division Concurrency Control of Database Management

Answer» CORRECT option is (d) All of the mentioned

For explanation: Deadlock prevention is also called as deadlock recovery. Prevention is COMMONLY used if the probability that the system would ENTER a deadlock state is relatively high; otherwise, detection and recovery are more efficient.
36.

When transaction Ti requests a data item currently held by Tj, Ti is allowed to wait only if it has a timestamp larger than that of Tj (that is, Ti is younger than Tj ). Otherwise, Tj is rolled back (Tj is wounded by Ti). This is(a) Wait-die(b) Wait-wound(c) Wound-wait(d) WaitThe question was asked in examination.My query is from Deadlocks in portion Concurrency Control of Database Management

Answer»

Correct ANSWER is (C) Wound-wait

The EXPLANATION is: The wound–wait scheme is a PREEMPTIVE technique. It is a COUNTERPART to the wait–die scheme.

37.

The deadlock in a set of a transaction can be determined by(a) Read-only graph(b) Wait graph(c) Wait-for graph(d) All of the mentionedThis question was addressed to me by my college director while I was bunking the class.I would like to ask this question from Deadlocks topic in chapter Concurrency Control of Database Management

Answer»

The CORRECT ANSWER is (a) Read-only graph

For explanation: Each TRANSACTION INVOLVED in the cycle is SAID to be deadlocked.

38.

When transaction Ti requests a data item currently held by Tj, Ti is allowed to wait only if it has a timestamp smaller than that of Tj (that is, Ti is older than Tj). Otherwise, Ti is rolled back (dies). This is(a) Wait-die(b) Wait-wound(c) Wound-wait(d) WaitThis question was addressed to me in an interview for job.This question is from Deadlocks topic in section Concurrency Control of Database Management

Answer» CORRECT ANSWER is (a) Wait-die

Best EXPLANATION: The wait–die SCHEME is a non-preemptive TECHNIQUE.
39.

The ____ lock allows concurrent transactions to access the same row as long as they require the use of different fields within that row.(a) Table-level(b) Page-level(c) Row-level(d) Field-levelI have been asked this question in semester exam.Enquiry is from Lock-Based Protocols topic in chapter Concurrency Control of Database Management

Answer»

The CORRECT answer is (d) Field-level

Best EXPLANATION: Lock is LIMITED to the ATTRIBUTES of the RELATION.

40.

B-link tree requires a pointer to its __________ sibling.(a) Upper(b) Lower(c) Right(d) LeftThis question was posed to me in a job interview.This question is from Concurrency in Index Structures in section Concurrency Control of Database Management

Answer» RIGHT CHOICE is (C) Right

Best EXPLANATION: This POINTER is required because a lookup that occurs while a node is being split may have to search not only that node but also that node’s right sibling.
41.

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 mentionedThis question was addressed to me in an interview for internship.I want to ask this question from Snapshot Isolation topic in division Concurrency Control of Database Management

Answer»

The correct CHOICE is (d) NONE of the mentioned

To EXPLAIN: Write skew is the ISSUE addressed here.

42.

The _____________ ensures that any conflicting read and write operations are executed in timestamp order.(a) Timestamp-ordering protocol(b) Timestamp protocol(c) W-timestamp(d) R-timestampThe question was asked in an online interview.Question is taken from Multiple Granularity in chapter Concurrency Control of Database Management

Answer» RIGHT ANSWER is (a) Timestamp-ordering protocol

For EXPLANATION: The most COMMON method for doing ordering transaction is to use a timestamp-ordering scheme.
43.

____________ denotes the largest timestamp of any transaction that executed write(Q) successfully.(a) W-timestamp(Q)(b) R-timestamp(Q)(c) RW-timestamp(Q)(d) WR-timestamp(Q)I had been asked this question during an interview.This interesting question is from Multiple Granularity in division Concurrency Control of Database Management

Answer»

Correct answer is (a) W-timestamp(Q)

EASY explanation - The most common method for doing ORDERING TRANSACTION is to use a timestamp-ordering scheme.

44.

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) SQL2The question was posed to me during an interview.The question is from Multiversion Schemes topic in portion Concurrency Control of Database Management

Answer»

The correct answer is (a) SQL 2016

Best EXPLANATION: SQL-2016 is the most RECENT VERSION of standard SQL prescribed by the ANSI.

45.

If a node is locked in ____________ then explicit locking is being done at a lower level, with exclusive-mode or shared-mode locks.(a) Intention lock modes(b) Intention-shared-exclusive mode(c) Intention-exclusive (IX) mode(d) Intention-shared (IS) modeThe question was posed to me in exam.The above asked question is from Multiple Granularity in portion Concurrency Control of Database Management

Answer» RIGHT answer is (C) Intention-exclusive (IX) mode

Easiest EXPLANATION - There is an intention mode ASSOCIATED with SHARED mode, and there is one with an exclusive mode.
46.

A system is in a ______ state if there exists a set of transactions such that every transaction in the set is waiting for another transaction in the set.(a) Idle(b) Waiting(c) Deadlock(d) ReadyI got this question by my school teacher while I was bunking the class.This intriguing question originated from Deadlocks topic in portion Concurrency Control of Database Management

Answer»

The correct ANSWER is (c) Deadlock

For EXPLANATION: When ONE data ITEM is waiting for another data item in a transaction then SYSTEM is in deadlock.

47.

Which of the following is the block that is not permitted to be written back to the disk?(a) Dead code(b) Read only(c) Pinned(d) ZappedThe question was posed to me in an online interview.The query is from Lock-Based Protocols in division Concurrency Control of Database Management

Answer»

The correct answer is (c) Pinned

The best EXPLANATION: A block that is not PERMITTED to be written back to the DISK is called pinned.

48.

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 searchI have been asked this question in quiz.Asked question is from Concurrency in Index Structures in chapter Concurrency Control of Database Management

Answer» CORRECT answer is (b) RESTARTING the search after releasing the lock

Easiest EXPLANATION - Crabbing protocol moves in a CRAB like manner.
49.

Selecting the victim to be rollbacked to the previous state is determined by the minimum cost. The factors determining cost of rollback is(a) How long the transaction has computed, and how much longer the transaction will compute before it completes its designated task(b) How many data items the transaction has used(c) How many more data items the transaction needs for it to complete(d) All of the mentionedI got this question by my school teacher while I was bunking the class.I would like to ask this question from Deadlocks topic in portion Concurrency Control of Database Management

Answer»

The CORRECT choice is (d) All of the mentioned

For explanation: We should roll back those transactions that will INCUR the minimum COST.

50.

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) NodesI have been asked this question in my homework.My enquiry is from Multiversion Schemes in section Concurrency Control of Database Management

Answer»

Correct option is (a) Buckets

Best explanation: Buckets are used to STORE one or more RECORDS in a HASH file organization.