RDBMS Questions and Answers – The Relational Algebra

This set of RDBMS Multiple Choice Questions & Answers (MCQs) focuses on “Relational Algebra”.

1. Which of the following is not a relational algebra function?
a) Select
b) Project
c) Manipulate
d) Union
View Answer

Answer: c
Explanation: There does not exist any operation named as manipulate operation in relational algebra. The union gives the union of two sets. Project is similar to select in SQL and select is similar to where in SQL.

2. The select operation’s function in relational algebra is identical to the _______ clause in SQL
a) where
b) from
c) select
d) none of the mentioned
View Answer

Answer: a
Explanation: The select operation’s function in relational algebra is identical to the where clause in SQL standard. It is therefore used to check for a particular condition.

3. The project operation’s function in relational algebra is identical to the _______ clause in SQL
a) where
b) from
c) select
d) none of the mentioned
View Answer

Answer: c
Explanation: The project operation’s function in relational algebra is identical to the select clause in SQL standard. It is used to list the attributes that are to be displayed.
advertisement
advertisement

4. What does the following relational operation perform?
ρx(A1,A2,A3…) (E)
a) It returns the result of expression E with the previous attribute names
b) It returns the result of expression E renaming the attributes as A1, A2, …
c) It returns the result of the relation E but saves the old attributes
d) None of the mentioned
View Answer

Answer: b
Explanation: If a relational-algebra expression E has arity n, then the above expression returns the result of expression E under the name X, and with the attributes renamed to A1 , A2 , …., An.

5. What does the following relational algebra expression do?
σamount > 1200 (loan)
a) Finds all the tuples in loan
b) Finds the tuples in loan where the amount is greater than 12000
c) Finds all the tuples in loan where the amount is greater than 1200
d) Finds all the amounts in loan where the number of values is greater than 1200
View Answer

Answer: c
Explanation: The above expression finds all the tuples in loan wherever the amount is greater than 1200. Because the condition specifies that the amount should be greater than 1200.

6. How is the left outer join symbol represented in relational algebra?
a) ⟕
b) ⟖
c) ⟗
d) ⋈
View Answer

Answer: a
Explanation: The symbol of the left outer join is similar to the symbol of the natural join but it has two dashes on the top and bottom left side.

7. How is the right outer join symbol represented in relational algebra?
a) ⟕
b) ⟖
c) ⟗
d) ⋈
View Answer

Answer: b
Explanation: The symbol of the right outer join is similar to the symbol of the natural join but it has two dashes on the top and bottom right side.
advertisement

8. Πcustomer_name, loan_number, amount (borrower ⋈loan)
What does the above expression perform?
a) It finds the customer_name, loan_number and amount from borrower
b) It finds the customer_name, loan_number and amount from loan
c) It finds the customer_name, loan_number and amount from the full outer join of borrower and loan
d) It finds the customer_name, loan_number and amount from the natural join of borrower and loan
View Answer

Answer: d
Explanation: The above relational algebra expression finds the customer_name, loan_number and amount from the natural join of borrower and loan as the attributes are written next to the project symbol and the relation to be extracted from is mentioned in the parentheses which is the natural join of borrower and loan.

9. Updating, Deleting and Inserting in relational algebra is done using the ________ operator
a) Assignment
b) Modification
c) Alteration
d) Inclusion
View Answer

Answer: a
Explanation: Updating, Deleting and Inserting in relational algebra is done using the assignment operator.
advertisement

10. State true or false: There exists a division operator in Relational Algebra
a) True
b) False
View Answer

Answer: a
Explanation: The division is a binary operation that is labeled as R ÷ S. The result consists of the restrictions of tuples in R to the attributes unique to R, i.e., in the relation R but not in the relation S.

11. The collections on which aggregate functions can operate are called as __________
a) Multisets
b) Multivalues
c) Multicollections
d) Multivariables
View Answer

Answer: a
Explanation: The collections on which aggregate functions can operate are called as multisets. Sets are a special case of multisets.

Sanfoundry Global Education & Learning Series – RDBMS.

To practice all areas of RDBMS, 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.