This document contains instructions for a comprehensive examination for a database systems course. It includes 7 questions testing concepts like functional dependencies, normalization, transaction processing, recovery, indexing, and extendible hashing. Students are given 3 hours to complete the exam, which is open book. They are warned that use of unfair means will result in disciplinary action.
This document contains instructions for a comprehensive examination for a database systems course. It includes 7 questions testing concepts like functional dependencies, normalization, transaction processing, recovery, indexing, and extendible hashing. Students are given 3 hours to complete the exam, which is open book. They are warned that use of unfair means will result in disciplinary action.
This document contains instructions for a comprehensive examination for a database systems course. It includes 7 questions testing concepts like functional dependencies, normalization, transaction processing, recovery, indexing, and extendible hashing. Students are given 3 hours to complete the exam, which is open book. They are warned that use of unfair means will result in disciplinary action.
Course No. : IS ZC332 Course Title : DATABASE SYSTEMS & APPLICATIONS Nature of Exam : Open Book Weightage : 60% Duration : 3 Hours Date of Exam : 29/09/2007 (AN) Note: 1. Please follow all the Instructions to Candidates given on the cover page of the answer book. 2. All parts of a question should be answered consecutively. Each answer should start from a fresh page. 3. Mobile phones and computers of any kind should not be brought inside the examination hall. 4. Use of any unfair means will result in severe disciplinary action.
Q.1 Consider the following two sets of functional dependencies F= {A ->C, AC ->D, E ->AD, E ->H} and G = {A ->CD, E ->AH}. Check whether or not they are equivalent. [6]
Q.2 Consider the universal relation R = {A, B, C, D, E, F, G, H, I} and the set of functional dependencies F = { {A, B} -> {C}, {A} -> {D, E}, {B} -> {F}, {F} ->{G, H}, {D} -> {I, J} }. What is the key for R? Decompose R into 2NF, then 3NF relations. [10]
Q.3 Which of the following schedules is (conflict) serializable? For each serializable schedule, determine the equivalent serial schedules. [3 X 4 = 12] a. R1(X);R3(X);W(X);R2(X);W3(X); b. R1(X);R3(X);W3(X);W1(X);R2(X); c. R3(X);R2(X);W3(X);R1(X);W1(X); d. R3(X);R2(X);R1(X);W3(X);W1(X);
Q.4 Consider the case of deferred database modifications and assume that, after a crash, the log contains the following records: [3 X 2 = 6] <T1 starts> <T1, A, 500> op1 <T2 starts> <T1, B, 400> op2 <T2, A, 200> op3 <T1 commits> <T3 starts> <T3, A, 800> op4 <T4 starts> <T4, B, 900> op5 <T3 commits> (a) Which transactions (T1 - T4) will be redone during recovery? (b) For each operation (op1 - op5) state whether that operation will be redone, undone, or neither, during recovery. (c) What will be the value of data item 'A' after the recovery algorithm has finished?
Page 1 of 2 No. of Pages = 2 No. of Questions = 7 IS ZC332 (EC-2 REGULAR) FIRST SEMESTER 2007-2008 PAGE 2
Q.5 Consider the case of immediate database modifications and assume that, after a crash, the log contains the following records: [3 X 2 = 6] <T1 starts> <T1, A, 400, 500> op1 <T1, B, 300, 400> op2 <T1 commits> <T2 starts> <T2, C, 100, 200> op3 <T3 starts> <T3, D, 700, 800> op4 <T3 commits> <T4 starts> <T4, E, 800, 900> op5 (a) Which transactions (T1 - T4) will be redone during recovery? (b) For each operation (op1 - op5) state whether that operation will be redone, undone, or neither, during recovery. (c) What will be the value of data item 'A' and 'E' after the recovery algorithm has finished?
Q.6 Consider a disk with block size B = 512 bytes Block pointer P = 6 bytes Record pointer PR=7 bytes File has r = 30,000 EMPLOYEE records, fixed length Name (30 bytes), SSN (9 bytes), DepartmentCode (9 bytes), MinorDeptCode (4 bytes), Address (40 bytes), phone (9 bytes), Birthdate (8 bytes), Sex (1 byte), JobCode (4 bytes), Salary (4 bytes, real) 1 additional byte for deletion marker
(a) Calculate record size R in bytes (b) Calculate the blocking factor bfr and the number of file blocks b, assuming an unspanned organization (c) Suppose the file is ordered by the key field SSN and want to construct a sparse primary index on SSN.
(i) Calculate the index blocking factor bfri (ii) Calculate the number of first-level index entries and the number of first-level index blocks (iii) Total number of levels needed if we make it into a multi-level index (iv) Total number of blocks required by the multi-level index (v) Number of block accesses needed to search for and retrieve record from file (using index)? [2 + 2 + 10 = 14]
Q.7 Suppose that we are using extendible hashing on a file that contains records with following search- key values: 2, 3, 5, 11, 17, 19, 23, 29, 31. Show the final extendible hash table for this file if the initial hash function is h(x) = x mod 2 and each bucket can hold 3 records. Make sure you show the global and local depths.
Show the hash structure changes as a result of each of the following steps: (i) Delete 11 (ii) Insert 1 [3 + 3 = 6] *******