CS462 Final Exam: Spring 2003

advertisement
CS462 Final Exam: Spring 2003
Full legal name:
Email:
Pledge:
This is a 4 hour closed book test. Be concise and always print. Also, note that this test has
5 questions in 2 pages. Ensure that you answer all questions.
1. Definitions and concepts: answer precisely and concisely. [60 points]
a. Define physical data independence.
b. Define the super key and candidate key. Clearly describe their difference.
c. One of the most popular buffer management policies is LRU (Least
Recently Used). Why is LRU effective in general? What is the worst case
problem of LRU?
d. Can you define sparse index on a non-key attribute? Why or why not?
e. Among ordered indexing, hashing, and B+ tree, which one can achieve the
best performance in range searches? Why?
f. An ideal hash function should be uniform and random. Define the
meaning of uniformity and randomness of hash functions.
g. Describe ACID properties and explain how a DBMS supports them.
h. Define recoverable and cascadeless schedules. If a schedule is recoverable,
is it cascadeless as well?
i. What does strict 2PL do to be cascadeless?
j. Pessimistic and optimistic concurrency control policies can show different
performance depending on workloads. Describe under what circumstances
pessimistic/optimistic one is better.
k. What is Thomas’ Write Rule? What can you improve by applying it to
Time Stamp Ordering?
l. Define “steal” and “force”. Why do they make recovery hard in terms of
atomicity and durability support?
2. View serializability can support more concurrency than conflict serializability.
Show an example of a concurrent transaction execution schedule that is view
serializable but not conflict serializable. [10 points] Using the polynomial time
algorithm to test the conflict serializability, show that the given schedule is not
conflict serializable. [5 points]
3. You are given a relation schema R = (A, B, C, D, E) with the following functional
dependencies:
A -> BC, CD -> E, B -> D, E ->A
Is R in 3NF? Why or why not? [10 points] Is R in BCNF? Why or why not? [5
points]
4. Consider the relations r1(A, B, C), r2(C, D, E), and r3(E, F) with primary keys A,
C, and E, respectively. Assume that r1 has 1000 tuples, r2 has 1500 tuples, and r3
has 750 tuples. Answer the following questions. [15points]
a. What is the maximum possible number of tuples that can be found in r1 |X|
r2? (Assume that |X| is a natural join operator.)
b. What is the maximum possible number of tuples that can be found in (r1
|X| r2) |X| r3?
c. What kind of indexes on r2 and r3, if built respectively, can most
efficiently process the query (r1 |X| r2) |X| r3? Justify your answer.
5. Given a B+ tree as shown in Figure 1, do the following. [15 points]
a. Insert a record with key value 5.
b. Insert a record with key value 36.
c. Delete a record with key value 25.
(Note: One node in the B+ tree can store up to two key values and three
pointers.)
Figure 1.
~ The End ~
“I have no particular talent. I am merely inquisitive.”
“It's not that I'm so smart, it's just that I stay with problems longer."
Albert Einstein
Thanks for your hard work. Have a nice summer! 
KD
Download