2005-fall-cs4604-final

# 2005-fall-cs4604-final - CS4604 Final Examination Please...

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

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

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

View Full Document
(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) Convert the relational algebra expression R S into SQL, with the constraint that the RDMBS you are using does not support the SQL commands INTERSECT and EXCEPT . You may use commands such as IN , EXISTS , and NOT , if you need to. (c) If you are converting an E/R diagram to ODL, what must you ﬁrst do to multiway relationships? (d) How many non-trivial multi-valued dependencies are possible in a three attribute relation? (e) Circle all the sentences that are true: (i) 4NF implies BCNF. (ii) 4NF implies 3NF. (iii) 3NF implies 4NF. (f) What is the diﬀerence between the natural join R ./ S and the theta-join R ./ C S , where C is the condition that R±A = S±A for each attribute A that appears in the schemas of both R and S ? (g) List three policies for maintaining referential integrity in a database. (h) Circle the correct answer. An RDBMS stores and manipulates relations using set/bag semantics. (i) Circle True or False . The relation IsParent(Child, Parent) stores child-parent pairs. Since we have not yet invented time-travel, let us assume that this relation cannot contain cycles, i.e., there is no sequence of two or more tuples such that the parent in the ﬁrst tuple is the child in the second tuple, the parent in the second tuple is the child in the third tuple, and so on, and the parent in the last tuple is the child in the ﬁrst tuple. Based on what we learnt in class, we can write a single SQL query, which may include sub-queries, to check if IsParent contains cycles. (j) Name any movie, book, or comic strip, or TV series alluded to in this exam. 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 10

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

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online