0% found this document useful (0 votes)
6 views2 pages

HW 4

Homework

Uploaded by

ibrahim.channa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views2 pages

HW 4

Homework

Uploaded by

ibrahim.channa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Purdue University

Computer Science Department


CS44800 Homework 4
Fall 2019

Due: November 11, 2019, 11:59PM


Reference:
• Fundamentals of Database Systems by Elmasri & Navathe, 7th Edition
Total Points: 3 points
Submit via Blackboard

Provide concise but to the point explanation to support your answers. If possible, use bullets to
organize the ideas in your answer.
Question 1. (0.5 points)
Consider the universal relation R = {A, B, C, D, E, F, G, H, I, J} and the set of functional
dependencies F.
F = {{A, B}→{C, D},
{D}→{E, F, G},
{F, G}→{H},
{A}→{I},
{A, B}→{E, G},
{A, I} → {I, J}}

(a) What is the closure of the set {A, D}?


(b) What is the key for R?
(c) What is the minimum cover for the set of functional dependencies F?
(d) Decompose R into 2NF.
(e) Decompose R into 3NF.

Question 2. (0.75 points)


(a) What are the possible sources of the information that defines the functional dependencies
that hold among the attributes of a relation schema? Discuss two possible sources.
Explain your answer.
(b) What is meant by the closure of a set of functional dependencies? Illustrate with an
example.
(c) What is the lossless (or nonadditive) join property of a decomposition? Why is it
important?
Question 3. (0.75 points)
(a) Discuss the four levels of isolation in SQL.
(b) Discuss the types of violation that isolation levels prevent. Give an example for each
violation.
(c) Discuss the concept of snapshot isolation and its effect on the phantom read problem.

Question 4. (0.50 points)


Consider the following four schedules for transactions T1, T2 and T3:
a. r1(X); r3(X); w1(X); r2(X); w3(X); w2(X)
b. r1(Y); r3(Y); w3(X); w1(X); r2(X); w2(Y)
c. w2(X); r1(Y); w2(Y); r2(X); w2(Y); r3(Y)
d. r3(X); r2(X); w3(X); r1(Y); w1(X); r2(Y)
e. r3(X); r2(X); r1(X); w3(X); w1(X); w2(X)
(a) For each schedule, specify whether or not the schedule is conflict serializable and why.
To determine if a schedule is conflict serializable you can either use the precedence graph
or swap conflicting operations.
(b) Then, for each serializable schedule, give the equivalent serial schedule.

Question 5. (0.50 points)


Consider the following actions taken by transaction T1 on a database with objects X and Y:
R1(X), W1(X), R1(Y), W1(Y)
Without altering the order of operations of T1, give example schedules with an additional
Transactions T2 (with 4 operations accessing both database objects X and Y) that fulfill the
following conditions:
(a) Give an example schedule using two transactions (T1 and T2) which is conflict
serializable.
(b) Give an example schedule using two transactions (T1 and T2) which is not conflict
serializable. Explain why the schedule is not conflict serializable.

You might also like