Professional Documents
Culture Documents
Q.1 (a) Why do we create index on the database and what are its advantages? To every
advantage we need to pay some price. What is the price we need to pay when we
create an index?
Q.1 (b) Create a B tree and B+ tree of order 3 when the following elements are inserted in the
given sequence
5, 10, 12, 13, 14, 1, 2, 3, 4
Q.1 (c) a B+ tree is created with the following conditions. The block size is 1K bytes, data
record pointer is 7 bytes long, the value field is 9 bytes long and a block pointer is 6
bytes long. What can be the maximum order of the leaf node? [3 + 4 + 3 = 10]
Q.2 Given three schedules. Determine whether they are conflict serializable or not and show
your calculations. Justify with reasoning whether they are recoverable and have cascading
rollback. Based on your above logic, what can you say about view serializability?
Sl: rl (X); r2 (Z); rl (Z); r3 (X); r3 (Y); wl (X); cl ; w3 (Y); c3; r2 (Y); w2 (Z); w2 (Y); c2;
S2: rl (X); r2 (Z); rl (Z); r3 (X); r3 (Y); wl (X); w3 (Y); r2 (Y); w2 (Z); w2 (Y); cl; c2; c3;
S3: rl (X); r2 (Z); r3 (X); rl (Z); r2 (Y); r3 (Y); wl (X); cl; w2 (Z); w3 (Y); w2 (Y); c3; c2;
[6 + 3 + 1 = 10]
Q.3 Consider the following state of transactions
Which of the transactions need to be redone, undone and ignored and why? [3]
Q.4 (a) What is the usage of Relation Algebra when we can’t use it to program directly? What
is the motivation for studying Relation Algebra
The following relational schema contains three tables (relations) named EMPLOYEE,
WORKS, and COMPANY as detailed below:
EMPLOYEE(e_no Number(5), e_name Character(35), e_address Character(150), city
Character(35), mgr_cd Number(5))
Primary key (e_no), Foreign Key (mgr_cd) references EMPLOYEE(e_no) e_name Unique
Q.6 (a) One of your friends says that any relation schema with two single valued attributes is
always in 3NF. You claim and prove that such relation is always in BCNF. Take all
the scenarios and prove your valid argument.
Q.6 (b) Discuss the scenarios which compel us to normalize a relation. Upon normalization,
there are pitfalls which we need to be careful of. Elaborate these pitfalls.
[5 + 2 = 7]
*********