Monday, April 13, 2020

Database Management Systems MCQ with answers explained

Database Management Systems MCQ with answers explained, Multiple choice questions in DBMS with answers, solved interview questions in RDBMS


DBMS Multiple Choice Questions - with Answers



1. Entity Relationship model

What type of relationship does the phrase “Teacher works in the school” express?
a) One-to-one
b) One-to-many
c) Many-to-one
d) Many-to-many
Answer: (a)
If we consider Teacher as one entity and school as another entity with works as the relationship, then with the assumption that a teacher can work at only one school at a time, the relationship set works is a one-to-one relationship.

2. Database models

In a Hierarchical database model, records are organized as _____ structure.
a) Graph.
b) List .
c) Links.
d) Tree.
Answer: (d)
A hierarchical database model is a data model in which the data are organized into a tree-like structure. The data are stored as records which are connected to one another through links.

3. Normalization
For a relation R(A, B, C, D, E) with set of functional dependencies F = {AB → E, D → C}, which of the following is a candidate key?
a) ABCD
b) ABD
c) BCD
d) ACD
Answer: (b)

A candidate key is a minimal super key. That is, it is a super key for which no proper subset can be a key.


We can identify the candidate keys by finding the closure (A+) of set of one or more attributes.
In options (c) and (d), the only attributes on the LHS of given FD are BD and AD respectively. But, neither {BD}+ nor {AD}+ forms a key, because {BD}+ and {AD}+ are not equals to R.
In options (a) and (b), all attributes of LHS of F are present. Hence, both {ABCD}+ and {ABD}+ equals to R. So, both are super key.
As per the definition of candidate key (a super key is a candidate key if its subset does not constitute a key), ABCD is not a super key because the subset ABD is a key too. Hence, ABD is the candidate key.

4. Levels of abstraction

Which of the following database abstraction levels is closest to the users?
a) Physical level
b) Conceptual level
c) Internal level
d) External level
Answer: (d)
External level (view level) describes the user views and it is the closes database abstraction level.

5. Normalization

Consider a relation R(A, B, C, D, E) that satisfies the following set of functional dependencies F = {ABC → D, D → E, E → B, AD → C}. What is the highest normal form this table is currently in?

a) Boyce-Codd Normal Form

b) Second Normal Form

c) Third Normal Form

d) None of the above
Answer: (d)

BCNF – Left side of any FD should be a candidate key.

D is a determiner in the FD D → E. But D+ ≠ R. Hence, D is not a candidate key and the table is not in BCNF.

3NF – No non-key dependency or no transitive dependencies permitted.

E is an attribute that depends on a non-key attribute D. This is a transitive dependency. Hence, table not in 3NF.

2NF – No partial key dependencies permitted.

ABC is the key for R because {ABC}+ = R. Also, there exists no partial key dependencies. That is, no portion of the composite key alone determines another attribute in the given set F. Hence, the given table is in 2NF.

Compare between third normal form and Boyce codd normal form



***********


Go to General Mixed Quiz in all topics of DBMS page

Go to Advanced DBMS Concepts page




multiple choice questions in relational model of DBMS

MCQs in relational model

MCQ about super key, candidate key and primary key

relational data model in database

solved quiz questions with answer in relational model, super key, candidate key

top 5 interview topics and questions in RDBMS




1 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