250+ TOP MCQs on Introduction to the Relational Model and Answers

RDBMS Multiple Choice Questions on “Introduction to the Relational Model”.

1. Choose the correct statement regarding superkeys
a) A superkey is an attribute or a group of multiple attributes that can uniquely identify a tuple
b) A superkey is a tuple or a set of multiple tuples that can uniquely identify an attribute
c) Every superkey is a candidate key
d) A superkey is an attribute or a set of attributes that distinguish the relation from other relations

Answer: a
Clarification: A superkey is an attribute or a set of multiple attributes that can uniquely identify a tuple. It is used to differentiate between tuples.

2. What is an Instance of a Database?
a) The logical design of the database system
b) The entire set of attributes of the Database put together in a single relation
c) The state of the database system at any given point of time
d) The initial values inserted into the Database immediately after its creation

Answer: c
Clarification: The state of the database system at any given point of time is called as an Instance of the database.

3. What is a foreign key?
a) A foreign key is a primary key of a relation which is an attribute in another relation
b) A foreign key is a superkey of a relation which is an attribute in more than one other relations
c) A foreign key is an attribute of a relation that is a primary key of another relation
d) A foreign key is the primary key of a relation that does not occur anywhere else in the schema

Answer: c
Clarification: A foreign key is an attribute of a relation that is initially a primary key of another relation. A foreign key usage preserves referential integrity.

4. What action does ⋈ operator perform in relational algebra
a) Output specified attributes from all rows of the input relation and remove duplicate tuples from the output
b) Outputs pairs of rows from the two input relations that have the same value on all attributes that have the same name
c) Output all pairs of rows from the two input relations (regardless of whether or not they have the same values on common attributes)
d) Return rows of the input relation that satisfy the predicate

Answer: a
Clarification: ⋈ Outputs specified attributes from all rows of the input relation. Remove duplicate tuples from the output. The operation is called the join operation.

5. What does the “x” operator do in relational algebra?
a) Output specified attributes from all rows of the input relation. Remove duplicate tuples from the output
b) Output pairs of rows from the two input relations that have the same value on all attributes that have the same name
c) Output all pairs of rows from the two input relations (regardless of whether or not they have the same values on common attributes)
d) Returns the rows of the input relation that satisfy the predicate

Answer: c
Clarification: The “x” operator outputs all pairs of rows from the two input relations (regardless of whether or not they have the same values on common attributes). This operation is called as the Cartesian product operation and is similar to the Cartesian product of sets.

6. An attribute is a __________ in a relation.
a) Row
b) Column
c) Value
d) Tuple

Answer: b
Clarification: An attribute is a column in a relation. A tuple is a row in a relation.

7. What is the method of specifying a primary key in a schema description?
a) By writing it in bold letters
b) By underlining it using a dashed line
c) By writing it in capital letters
d) By underlining it using a bold line

Answer: d
Clarification: We can specify a primary key in schema description by underlining the respective attribute with a bold line.

8. Statement 1: A tuple is a row in a relation
Statement 2: Existence of multiple foreign keys in a same relation is possible
a) Both the statements are true
b) Statement 1 is correct but Statement 2 is false
c) Statement 1 is false but Statement 2 is correct
d) Both the statements are false

Answer: a
Clarification: A tuple is a row is a relation. There can exist multiple foreign keys in the same relation because there can exist multiple attributes in the relation that are primary keys in two or more other relations.

9. Choose the option that correctly explains in words, the function of the following relational algebra expression
σyear≥2009 (book ⋈ borrow)
a) Selects all tuples from the Cartesian product of book and borrow
b) Selects all the tuples from the natural join of book and borrow wherever the year is lesser than 2009
c) Selects all the tuples from the natural join of book and student wherever the year is greater than or equal to 2009
d) Selects all tuples from the Cartesian product of book and borrow wherever the year is greater than or equal to 2009

Answer: b
Clarification: The condition under the select statement represents the condition that must be satisfied by the tuples and the symbol ⋈ represents natural join between the two relations on either side of the operator.

10. State true or false: If a relation consists of a foreign key, then it is called a referenced relation of the foreign key dependency.
a) True
b) False

Answer: b
Clarification: If a relation has a foreign key, then it is called a referencing relation of the foreign key dependency.

Leave a Reply

Your email address will not be published. Required fields are marked *