# RDBMS Questions and Answers – Transformation of Relational Expressions

This set of RDBMS online test focuses on “Transformation of Relational Expressions”.

1. If on every legal database instant, the two expressions generate the same set of tuples, the expressions are called as
a) Equal
b) Equivalent
c) Similar
d) Identical

Explanation: If on every legal database instant, the two expressions generate the same set of tuples, the expressions are called as Equivalent relational algebra expressions. The order of the tuples is completely irrelevant for equivalency.

2. State true or false: Selection operations are commutative
a) True
b) False

Explanation: Selection operations are commutative i.e. selection1(selection2(R)) = selection2(selection1(R)).

3. Which of the following operations are associative
a) Natural joins
b) Theta joins
c) Both the mentioned
d) None of the mentioned

Explanation: Both natural join operation and theta join operation are associative. The commutativity and associativity of the join operations are important for join reordering in query optimization.

4. Which of the following set operations is not commutative?
a) Union
b) Intersection
c) Set difference
d) None of the mentioned

Explanation: The set difference operation is not commutative. As the position of the set difference operator affects the result of the operation.

5. State true or false: The projection operation does not distribute over the union operation
a) True
b) False

Explanation: The projection operation distributes over the union operation.
Note: Join free Sanfoundry classes at Telegram or Youtube

6. If no rule can be derived from any combination of others then the set of rules is said to be ________
a) Primitive
b) Axiomatic
c) Minimal
d) Atomic

Explanation: A set of equivalence rules is said to be minimal if no rule can be derived from any combination of others. Query optimizers use minimal sets of equivalence rules.

7. Theta join operations are
a) Commutative
b) Associative
c) Distributive under projection
d) All of the mentioned

Explanation: The theta join operations are commutative, associative and are distributive under projection.

8. Which of the following operations is associative
a) Set union
b) Set intersection
c) Set difference
d) Theta join

Explanation: The theta join operation is associative within a certain set of conditions whereas the rest of the operations are non-associative in each and every condition.

9. Which of the following set operations does the selection operation distribute over?
a) Union
b) Intersection
c) Difference
d) All of the mentioned

Explanation: The selection operation distributes over Set union, intersection, set difference.

10. State true or false: Multiple equivalence rules can be used one after the other on a query
a) True
b) False

Explanation: Multiple equivalence rules can be used one after the other on a query or on parts of the query. This can be used to simplify the query greatly thus reducing its time complexity.

Sanfoundry Global Education & Learning Series – RDBMS.

To practice all areas of RDBMS for online tests, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]