Exercise 1 (9 Points) : Information Systems June 12, 2014 Master of Science in Computer Engineering
Exercise 1 (9 Points) : Information Systems June 12, 2014 Master of Science in Computer Engineering
Exercise 1 (9 Points) : Information Systems June 12, 2014 Master of Science in Computer Engineering
Exercise 1 (9 points)
Primary keys are underlined in the relations. Moreover, Empl in CONTRACTS is foreign key of
EMPLOYEE and Depart in CONTRACTS is foreign key of DEPARTMENT.
An employee can have one or more contracts with different departments in a year.
Assume that:
nEMPLOYEE =10.000 V(Depart, CONTRACTS) = 50
nDEPARTMENT= 50 V(Empl, CONTRACTS) = 10.000
nCONTRACTS = 1.000.000 V(Area, DEPARTMENT) = 10
V(Year, CONTRACTS) = 20
Exercise 2 (6 points)
Consider the following schedule of concurrent transactions:
1) Show if it is conflict serializable (CSR) or view serializable (VSR). Explain why. If serializable, show
equivalent serial schedules.
2) Apply the rigorous two-phase locking protocol to the schedule. Is the schedule accepted?
3) Apply the timestamp-ordering protocol to the schedule, assuming that aborted transactions are
immediately restarted. Is the schedule accepted?
Exercise 3 (6 points)
Consider an empty B+-tree with m= 5.
1) Show the B+-tree after the insertion of the following values of the search key:
16 21 8 5 13 30 19 50 40 12
2) Show the form of the B+-tree after each operation of the sequence:
Delete 5; Delete 13
Exercise 4 (9 points)
1. Show the number of blocks of a B+-tree index on search-key A, assuming that each block
contains 70% of the records that can fit in a block.
2. Outline the steps in answering the following queries, showing the best strategy and the cost in
terms of number of block transfers from disk: