1. We can use the following three rules to find logically implied functional dependencies. This collection of rules is calleda) Axiomsb) Armstrong’s axiomsc) Armstrongd) Closure
Answer: bExplanation: By applying these rules repeatedly, we can find all of F+, given F.2. Which of the following is not a Armstrong’s Axiom ?a) Reflexivity ruleb) Transitivity rulec) Pseudotransitivity ruled) Augmentation rule
Answer: cExplanation: It is possible to use Armstrong’s axioms to prove that Pseudotransitivity rule is sound.3. The relation employee(ID,name,street,Credit,street,city,salary) is decomposed into
employee1 (ID, name)employee2 (name, street, city, salary)This type of decomposition is calleda) Lossless decompositionb) Lossless-join decompositionc) Both a and bd) None of the mentioned
Answer: dExplanation: Lossy-join decomposition is the decomposition used here .4. Inst_dept (ID, name, salary, dept name, building, budget) is decomposed into
instructor (ID, name, dept name, salary)department (dept name, building, budget)This comes undera) Lossy-join decompositionb) Lossy decompositionc) Lossless-join decompositiond) Both a and b
Answer: dExplanation: Lossy-join decomposition is the decomposition used here .5. There are two functional dependencies with the same set of attributes on the left side of the arrow:A->BCA->BThis can be combined asa) A->BCb) A->Bc) B->Cd) None of the mentioned
Answer: aExplanation: This can be computed as the canonical cover .6. Consider a relation R(A,B,C,D,E) with the following functional dependencies:
ABC -> DE andD -> ABThe number of superkeys of R is:a) 2b) 7c) 10d) 12
Answer: cExplanation: A superkey is a combination of columns that uniquely identifies any row within a relational database management system (RDBMS) table.7. Suppose we wish to find the ID’s of the employees that are managed by people who are managed by the employee with ID 123. Here are two possible queries:
I.SELECT ee.empID FROM Emps ee, Emps ff WHERE ee.mgrID = ff.empID AND ff.mgrID = 123;II.SELECT empID FROM Emps WHERE mgrID IN (SELECT empID FROM Emps WHERE mgrID = 123);Which, if any, of the two queries above will correctly (in SQL2) get the desired set of employee ID’s?a) Both I and IIb) I onlyc) II onlyd) Neither I nor I
Answer: aExplanation: The query can be satisfied by any of the two options.8. Suppose relation R(A,B) currently has tuples {(1,2), (1,3), (3,4)} and relation S(B,C) currently has {(2,5), (4,6), (7,8)}. Then the number of tuples in the result of the SQL query:
<i>SELECT * FROM R NATURAL OUTER JOIN S; </i>IS:a) 2b) 4c) 6d) None of the mentioned
Answer: aExplanation: The SQL NATURAL JOIN is a type of EQUI JOIN and is structured in such a way that, columns with same name of associate tables will appear once only.9. Suppose now that R(A,B) and S(A,B) are two relations with r and s tuples, respectively (again, not necessarily distinct). If m is the number of (not necessarily distinct) tuples in the result of the SQL query:
R intersect S;
Then which of the following is the most restrictive, correct condition on the value of m?
(a) m = min(r,s)(b) 0 <= m <= r + s(c) min(r,s) <= m <= max(r,s)(d) 0 <= m <= min(r,s)
Answer: dExplanation: The value of m must lie between the min value of r and s and 0.10. Suppose relation R(A,B,C,D,E) has the following functional dependencies:
A -> BB -> CBC -> AA -> DE -> AD -> EWhich of the following is not a key?a) Ab) Ec) B,Cd) D
Answer: cExplanation: Here the keys are not formed by B and C.
0 comments:
Post a Comment