Engineering Questions with Answers - Multiple Choice Questions

Database MCQ – Functional-Dependency Theory

1 - Question

We can use the following three rules to find logically implied functional dependencies. This collection of rules is called
a) Axioms
b) Armstrong’s axioms
c) Armstrong
d) Closure

View Answer

Answer: b
Explanation: By applying these rules repeatedly, we can find all of F+, given F.




2 - Question

Which of the following is not Armstrong’s Axiom?
a) Reflexivity rule
b) Transitivity rule
c) Pseudotransitivity rule
d) Augmentation rule

View Answer

Answer: c
Explanation: It is possible to use Armstrong’s axioms to prove that Pseudotransitivity rule is sound.




3 - Question

The relation employee(IDemployee1 (ID, name)
employee2 (name, street, city, salary)
This type of decomposition is called
a) Lossless decomposition
b) Lossless-join decomposition
c) All of the mentioned
d) None of the mentioned,name,street,Credit,street,city,salary) is decomposed into

View Answer

Answer: d
Explanation: Lossy-join decomposition is the decomposition used here .




4 - Question

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 under
a) Lossy-join decomposition
b) Lossy decomposition
c) Lossless-join decomposition
d) Both Lossy and Lossy-join decomposition

View Answer

Answer: d
Explanation: Lossy-join decomposition is the decomposition used here .




5 - Question

There are two functional dependencies with the same set of attributes on the left side of the arrow:
A->BC
A->B
This can be combined as
a) A->BC
b) A->B
c) B->C
d) None of the mentioned

View Answer

Answer: a
Explanation: This can be computed as the canonical cover.




6 - Question

Consider a relation R(A,B,C,D,E) with the following functional dependencies:

ABC -> DE and
D -> AB
The number of superkeys of R is:
a) 2
b) 7
c) 10
d) 12

View Answer

Answer: c
Explanation: A superkey is a combination of columns that uniquely identifies any row within a relational database management system (RDBMS) table.




7 - Question

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 II
b) I only
c) II only
d) Neither I nor I

View Answer

Answer: a
Explanation: The query can be satisfied by any of the two options.




8 - Question

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:

SELECT *
FROM R NATURAL OUTER JOIN S;
IS:
a) 2
b) 4
c) 6
d) None of the mentioned

View Answer

Answer: a
Explanation: 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 - Question

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)

View Answer

Answer: d
Explanation: The value of m must lie between the min value of r and s and 0.




10 - Question

Suppose relation R(A,B,C,D,E) has the following functional dependencies:

A -> B
B -> C
BC -> A
A -> D
E -> A
D -> E
Which of the following is not a key?
a) A
b) E
c) B, C
d) D

View Answer

Answer: c
Explanation: Here the keys are not formed by B and C.

Get weekly updates about new MCQs and other posts by joining 18000+ community of active learners