QUESTION (2)
QUESTION (2)
Note: There are 6 (SIX) questions. Answer ALL of them. The Mark of each question is mentioned at the right
margin.
1. Consider the following relation ‘Work’ that stores information about projects in a large business. [24]
a) Determine the primary key of the Work relation and justify your answer. (4 marks)
b) How does delete anomaly can occur in the Work relation? Explain with an example. (4 marks)
c) Normalize the Work relation up to 3NF level. Explain your process at each step in detail. (12
marks)
d) Show the decomposed relations that you have obtained finally with the available data. (4
marks)
Page 1 of 3
14 September 2021
Suppose, you have been asked to decompose the given relation into two smaller relations such as
EmpRole (empName, role) and RoleProject (role, projName).
Determine what type of decomposition this is. Justify your answer in the context of the given
relation.
3. Let T1, T2 and T3 be transactions that operate on the same database items A, B, and C. Let r1(A) [24]
mean that T1 reads A, w1(A) mean that T1 writes A, and so on for T2 and T3.
If the last digit of your id is odd you will answer the following questions for S0 and S1. Otherwise,
you will answer the following questions for S0 and S2 (even).
a) Determine whether the given schedules are serializable or not. If a schedule is serializable,
give an equivalent serial schedule. (16 marks)
b) Rewrite the two schedules by putting commit statements appropriately so that both are
recoverable and cascadeless schedules. The instruction commit1 indicates that transaction T1 has
committed. (8 marks)
Transaction T1 Transaction T2
1. read(a) 1. read(a)
2. a = a + 10 2. a = a × 2
3. write(a) 3. write(a)
4. read(b)
5. b = b × 5
6. write(b)
a) If the initial value of a is (last digit of your student id + 1) and the initial value of b is (last digit
of your student id + 1) × 2. What are their final values if we perform the transactions serially using
the order T1 and then T2? (6 marks)
Page 2 of 3
14 September 2021
b) Write a concurrent schedule for transactions T1 and T2 as mentioned above that illustrates the
lost update problem. (6 marks)
5. Determine which of the trees are valid B+ Trees. Justify your answer. [10]
a)
b)
c)
The following keys will be inserted one after another into the B+ Tree.
Page 3 of 3