Advanced Database Management System - Tutorials and Notes: Database Management Systems MCQ with answers explained set B

Monday, 13 April 2020

Database Management Systems MCQ with answers explained set B

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. Database views

An index is a special case of virtual view.
a) TRUE
b) FALSE
Answer: (b)

An index is a special case of materialized view, not virtual view.


2. Normalization

Consider the table below:
A
B
C
a1
b1
c1
a1
b2
c2
a2
b3
c1
a2
b3
c1

For each of the functional dependencies listed below, indicate whether it holds or not.
a) C → A, AB → C
b) C → B, AB → C, B → C
c) B → A, BC → A, AC → B
d) All of the above
Answer: (c)
C → A fails due to the tuples 1, 3, and 4. Hence, option (a) is wrong.
C → B fails due to the tuples 1, 3 and 4. Hence, option (b) is wrong.
B → A holds in the given relation because B uniquely determines A.
Likewise BC → A and C → A are also holding in the relation. Hence, option (c) is correct.

3. Structured Query Language

Consider the following database schemas and the SQL query;
User (handle, name, home_city, bio)
Friend (handle1, handle2)
Message (handle, text, from_city)
Query: SELECT handle, bio, min(home_city) FROM User NATURAL JOIN Message GROUP BY handle, from_city;
What is wrong with the query?
a) handle
b) bio
c) min(home_city)
d) NATURAL JOIN
Answer: (b)
The given query performs grouping of records. While using group by function, the SELECT clause can have either the grouping function or the grouping attributes. In this query, bio is not one of the grouping attributes. Hence, bio cannot appear in the SELECT clause of the query.

4. Relation Algebra

Let us suppose that there two relations R and S. R has 26 rows and 5 columns and S has 30 records and 3 columns. If Cartesian product operation was carried out on relations R and S, what would be the degree of the new relation T where T = R X S?
a) 56
b) 15
c) 8
d) 16
Answer: (c)

In relational algebra, the degree of a relation is the number of attributes (columns) that the relation contains.

T contains 5 columns + 3 columns = 8 columns after Cartesian product operation.

5. Relational Algebra

Use the data from previous question to answer this question. If Cartesian product operation was carried out on relations R and S, what would be the cardinality of the new relation T where T = R X S?
a) 8
b) 15
c) 56
d) 780
Answer: (d)

In relational algebra, the cardinality of a relation is the number of tuples (records/rows) that the relation contains.

We arrived at T after Cartesian product on R and S. Hence, T contains 26 X 30 = 780 rows after Cartesian product operation.




**********


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

interview questions in relational algebra

top 5 interview topics and questions in RDBMS


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