You are on page 1of 1
as Page 2 ‘Second Semest SS ZGS18 (EC-3 Regular) __— d Q2(b) Assume a situation where we have 3,60,000 ret sd oe " fength is 110 Bytes and the block size i 512 Bytes. The 7 Bytes, and the key field of the file is of 5 Bytes length. Now do the following. ina file. The record f a disk block needs e¢ it) to (i) If no indexing is done, give the number of block eri ve Sd : retrieve a record with given key value from the above file. Also &) data blocks needed to store the data. Gi) Now, Design a multilevel index (with root block) for the above a baa tl attribute. Give how many index blocks are needed at each level, an ® fom number of block accesses needed to retrieve @ record with given key value from the file using multilevel indexing structure. (31 Note: Assume unspanned record organization, Q3(@) For the following SQL query, give the optimized query tree after applying a series of standard optimization heuristics on it. SELECT S.sid, S.age, C.cname, C.credits, SC.grade FROM ‘Student as S, Course as C, ‘Student_Course as SC WHERE S.sid=SC.sid and C.cid=SC.cid and C.credits>3 and S.age=17; [ 1] Q3(b) Gi Ima certain concurrent schedule, we have four transactions T1, T2, T3 and T4 ‘These transactions operate on data items A, B; and C.. The interleaving of operations of these transactions is given in the below. Schedule: {r3(A); oC); w2(C); 11(B); w3(A)s 2(A)s n(C); tA); H(A); 13(B)} Note: Here, r(A); - means that the transaction-2 reads data item A wo(C); ~ means that the transaction-2 updates data item C Now, Determine whether the above schedule is conflict serializable, by drawing precedence graph. . (i Brief on the actions that are performed when a transaction moves from partially commit state to commit state. Give bulleted points. B+2=5] Q4(@) Assume that we use Linear hashing technique in some situation and we use the has! n h Functions- h0, hl, h2, ... as (K mod 2), (K mod 4), (K mod 8) and so on. ‘Assume that a bucket (one block) can accommodate 2 records. Now i a s ‘ i o records with following keys in same order and show the dynamic ease hashing scheme after cach insertion. Note that a split occurs whenever the File Load Factor (f) exceeds 0.70. Do not consider overflow buckets for calculating f . Keys to be inserted are: 18, 31, 24, 17, 95, 36, 86. (Note: use the conventions taught in the class; complete working is to be given.) [5] Second Semester 2014-2015 Page 2 of 3

You might also like