Professional Documents
Culture Documents
Q.1. Construct a B-tree using the given keys below of order=3. Shows all intermediate steps.
g, c, n, j, e, a, r, t, w. [5M]
Q.2.a) Draw an "Extendible hashing" diagram for the following information with their global
depth=3 and the bucket size=3. [10M]
30, 23, 7, 2, 11, 10, 15, 18, 5, 21.
Q.2.b) Write the drawback of static hashing and an advantage of extendible hashing. [3M]
teach
sectio es
n of pid
pnam
professor e
section
dep
Page 2 of 3
1. Give an example of an attribute (or set of attributes) that you can deduce is not a candidate
key, based on this instance being legal. [2M]
2. Is there any example of an attribute (or set of attributes) that you can deduce is a candidate
key, based on this instance being legal? Justify your answer. [3M]
Q.4. For the relations R and S given below: [4M]
(i) A,CR
(ii) (ii) B2 S
(iii) natural join
(iv) (iv) outer join
Q.4.b. Write deferred & immediate logs for the following. [6M]
Let T1 and T2 be two transactions in a serial schedule
Assume initial values A = 150 and B = 200
T1 T2
Lock-S(B); Lock-S(A);
Read(B); Read(A);
Unlock(B); Unlock(A);
Lock-X(A); Lock_X(B);
Read(A); Read(B);
A := A+ B; B := A + B;
Write(A); Write(B);
Unlock(A); Unlock(B);
Q.5.a. Answer the following questions: [1+2+2M]
1. What is the minimum space utilization for a B+ tree index?
2. What is the minimum space utilization for an ISAM index?
3. If your database system supported both a static and a dynamic tree index (say, ISAM and B+
trees), would you ever consider using the static index in preference to the dynamic index?
Page 3 of 3
Q.5.b.
Suppose that a DBMS recognizes increment, which increments an integer-valued object
by 1, and decrement as actions, in addition to reads and writes. A transaction that increments an
object need not know the value of the object; increment and decrement are versions of blind
writes. In addition to shared and exclusive locks, two special locks are supported: An object must
be locked in I mode before incrementing it and locked in D mode before decrementing it. An I
lock is compatible with another I or D lock on the same object, but not with S and X locks.
1. Illustrate how the use of I and D locks can increase concurrency. (Show a schedule allowed by
Strict 2PL that only uses S and X locks. Explain how the use of I and D locks can allow more
actions to be interleaved, while continuing to follow Strict 2PL.) [2M]
2. Informally explain how Strict 2PL guarantees serializability even in the presence of I and D
locks. (Identify which pairs of actions conflict, in the sense that their relative order can affect the
result, and show that the use of S, X, I, and D locks according to Strict 2PL orders all conflicting
pairs of actions to be the same as the order in some serial schedule.) [3M]
XXXXXXXX