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
View Answer

Answer: b
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
View Answer

Answer: a
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
View Answer

Answer: c
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.
advertisement
advertisement

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

Answer: c
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
View Answer

Answer: b
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
View Answer

Answer: c
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
View Answer

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

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

Answer: d
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
View Answer

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

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

Answer: a
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]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.