{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

2006-fall-cs4604-final

2006-fall-cs4604-final - CS4604 Final Examination Please...

This preview shows pages 1–4. Sign up to view the full content.

CS4604 Final Examination December 11, 2006 Please enter the following information: Name: ID: GOOD LUCK! Please do not write below this line. Question Maximum Score Score 1 30 2 7 3 11 4 12 5 20 6 20 7 * 20 Total 100 * Extra credit 1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
1. (3 × 10 = 30 points) (a) If relation R has n tuples and relation S has m tuples, what is the maximum number of tuples that R S can contain? Assume set-theoretic semantics. (b) An E/R diagram has three entity sets A , B , and C . It also contains three relationships: R between A and B ; S between B and C ; and T between C and A . The relationships do not contain any attributes. Which of the relationships is redundant, i.e., the tuples contained in it can be inferred from the tuples in the other two relationships? (c) The scenario is the same as in the previous question. In addition, you know that each relationship is one-one. Which relationships are redundant? (d) How many non-trivial multi-valued dependencies are possible in a two attribute relation? (e) What is the difference between “ DROP R; ” and “ DELETE FROM R; ”? (f) When is an attribute-based CHECK constraint checked by an RDBMS? (g) Rewrite σ C ( R × S ) as another expression in relational algebra. (h) A relation R has attributes A , B , and C . Fill in the blank so that the query returns each tuple in R exactly once. SELECT * FROM R ; (i) Circle true or false . The result of the query (SELECT ProfessorPID FROM Teach) EXCEPT (SELECT PID FROM Professors) ; can contain the same tuple more than once. (j) Who lives in a pineapple under the sea? 2
2. (3 + 4 = 7 points) Suppose a relation R has attributes A 1 , A 2 , . . . , A n . As a function of n , how many superkeys does R have if (a) R has exactly one key made up of two attributes { A 1 , A 2 } .

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}