Sunday, April 26, 2020

Multiple choice questions in DBMS

MCQ Practice questions in DBMS with answers explained, important questions in database management systems for exams


MCQ Quiz Questions and Answers in DBMS



1. What property of decompositions is guaranteed by both BCNF and 3NF?
a) Lossless join decomposition
b) Lossy join decomposition
c) Dependency preserving decomposition
d) All of the above
View Answer

Answer: (a) Lossless join decomposition
BCNF and 3NF decompositions can guarantee only the lossless join decomposition.
3NF decompositions alone can be both lossless join and dependency preserving decomposition. But for BCNF it is lossless join decomposition but not necessarily (not always) a dependency preserving.

2. Which of the following are active database elements?
a) Functions
b) Constraints
c) Triggers
d) Views
View Answer

Answer: (b) Constraints and (c) Triggers
Constraints are considered as active database elements because you cannot violate them at any point in time. For example, if you have designated an attribute as primary key in a table, you cannot enter a duplicate value for that attribute ever.
Triggers are the mechanisms to make sure the steps to be taken if an conditions are met in a table during data manipulation in general.

3. Consider a relation R(A, B, C, D, E) with FD set S = {A → BC, CD → E, B → D, E → A}. If R is decomposed into two relations, which of the following is a lossless join decomposition?
a) (ABC), (CDE)
b) (ABD), (BCE)
c) (ABC), (ADE)
d) None of the above
View Answer

Answer: (c) (ABC), (ADE)
A decomposition of R into R1 and R2 is a lossless-join decomposition if any one of the following functional dependency holds:
                        R1 ∩ R2 → R1
                        R1 ∩ R2 → R2
Let us check for these functional dependencies for the answer.
(ABC) ∩ (ADE) = A
Is it true that A → ABC? YES. Using the FD A → BC, this is true.
Is it true that A → ADE? NO.
But to decide the lossless join decomposition property, only one condition can be true.

4. Which of the following views are updatable?
a) Views created from single relation
b) Views created from joining of two tables
c) Views that included aggregate functions
d) All of the above
View Answer

Answer: (a) Views created from single relation
Views created from single relation can be updateable, that too with certain conditions.
We can’t update the other views.

5. Assume that we have a relation R(A, B, C, D, E) with a multi-valued dependency A →→ BC (A multi-determines BC). Which of the following statements are correct?
a) For a given A, the values of BC and DE are dependent of each other.
b) For a given A, the values of BC and DE are independent of each other
c) The values of BC can determine that of DE
d) The values of DE can determine that of BC
View Answer

Answer: (b) For a given A, the values of BC and DE are independent of each other
The definition of multi-valued dependencies:
Let R be a relation schema and let X and Y be subsets of the attributes of R. Intuitively, the multi-valued dependency X →→ Y is said to hold over R if in every legal instance r of R, each X value is associated with a set of Y values and this set is independent of the values in the other attributes.
Example:
Let us assume a relation R(X, Y, Z) with tuples as follows;
X
Y
Z
x1
y1
z1
x1
y2
z1
x1
y1
z2
x1
y2
z2

In this example X →→ Y because each X value (x1) is associated with a set of Y values (y1, y2) and this set is independent of the values of Z.

**************
Related posts:




Quiz questions with answers on DBMS normalization

Sample quiz questions on normalization process of database management systems

MCQ with answers on normalization process of DBMS

Normalization solved exercises in MCQs.

No comments:

Post a Comment

Featured Content

Multiple choice questions in Natural Language Processing Home

MCQ in Natural Language Processing, Quiz questions with answers in NLP, Top interview questions in NLP with answers Multiple Choice Que...

All time most popular contents

data recovery