DDA EC3 Regular
DDA EC3 Regular
DDA EC3 Regular
Please answer this question only by typing your answers in the typing space available for
this question.
Total marks: 10
Q2
Please answer this question only by typing your answers in the typing space available for
this question.
a). Consider the transactions t1, t2 and t3 and a schedule S given below.
S : read1(A); read2 (B); write1(C); read3(B); read3(C); write2 (B); write3(A) Where the
subscript denotes the transaction number. Assume that the time stamp of t1<t2<t3.
Using time-stamp ordering scheme for concurrency control find out if the schedule will go
through. If there is to be a rollback, which transaction(s) will be rolled back?
(3marks)
b). The following represents the sequence of events in a schedule involving transactions T1,T2,
T3, T4 and T5. A,B, C, D, E, F are items in the database. Draw a wait-for-graph for the data above
and find whether the transactions are in a deadlock or not? (3 marks)
c). Consider the following code:
Q3
Please answer this question only by typing your answers in the typing space available for
this question.
T1:
Begin Transaction
B1: update cust set amt= 13.5 *amt where name = 'Bob'
B2: update cust set amt = 13.5 * amt where name = 'Bob'
Commit
T2:
Begin Transaction
C1: update cust set amt = amt * 0.5 where name = 'Bob'
C2: update cust set amt = amt * 1.2 where name = 'Bob'
Commit
Assume that the individual statements B1, B2, C1, and C2 always execute atomically. Bob's amt
is 2000 before either transaction begins
execution.
(i) Suppose both transactions T1 and T2 execute to completion with isolation level Serializable.
What are the possible values for Bob's final amt? (2 marks)
(ii) Suppose both transactions T1 and T2 execute to completion with isolation level Read-
Committed. What are the possible values for Bob's final amt? (2 marks)
(iii) Suppose transaction T1 executes with isolation level Read-Committed, transaction T2
executes with isolation level Read-Uncommitted, and both transactions execute to completion.
What are the possible values for Bob's final amt? (2marks)
(Start, T0)
(Write, T0, Interest, 6,8)
--------------------x1 crashed
(Commit, T0)
(Start, T1)
(Write, T1, Principle, 200, 400)
(Write, T1, Amount, 500, 600)
(Commit, T1)
(Start , T2)
(Write, T2, Interest, 6, 9)
--------------------x2 crashed
(commit, T2)
(Start , T3)
(Write, T3, Interest, 6, 11)
(Abort, T3)
Total marks:10
Q4:
Please answer this question only by typing your answers in the typing space available for
this question.
DataShare are designing backend for an Customer systems at JK ISP company which has huge
client base and they cater to broadband, mobile phone connections .
They have to maintain customer records, different packages for each service , Bill reminders,
technical issues and complaints and generate monthly bill. There are some people who would
use the DB and they are manager, senior tech, supervisor and customer service person of JK.
You should implement these:
What all database objects are required like SP, Triggers, forms and others.
i). Design the access matrix. (5 marks)
ii). Implement the access matrix. (5 marks)
Total marks: 10 marks.