RDBMS Questions and Answers – Join and Other Operations

This set of RDBMS Multiple Choice Questions & Answers (MCQs) focuses on “Join and Other Operations”.

1. A join of the form r ⨝r.A=s.B s is called as
a) Equi join
b) Left outer join
c) Right outer join
d) Full outer join
View Answer

Answer: a
Explanation: A join of the form r ⨝r.A=s.B s is called as equi-join where A and B are sets of attributes of r and s respectively.

2. for each tuple tr in r do begin

FOR each tuple ts IN s do BEGIN
test pair (tr , ts ) TO see IF they satisfy the JOIN condition _
IF they do, ADD tr • ts TO the RESULT;
END
END

What type of join is this?
a) Equi join
b) Hash join
c) Nested loop join
d) Block nested loop join
View Answer

Answer: c
Explanation: The given algorithm is called as a nested loop join because it basically consists of two nested for loops in it i.e. one for loop is inside another for loop.
advertisement
advertisement

3. If nested loop join is done on a per block basis rather than on a per tuple basis, it is called as
a) Equi join
b) Hash join
c) Nested loop join
d) Block nested loop join
View Answer

Answer: d
Explanation: If nested loop join is done on a per block basis rather than on a per tuple basis, it is called as Block nested loop join. Within each pair of blocks, every tuple in one block is paired with every tuple in the other block to generate all possible combinations.

4. The merge join can be used to compute
a) Natural joins
b) Equi joins
c) Both the mentioned
d) None of the mentioned
View Answer

Answer: c
Explanation: The merge join can be used to compute both equijoins and natural joins. This is also called as the sort-merge-join algorithm.

5. The ___________ merges the sorted relation with leaf entries of the secondary B+ tree index.
a) Merge join algorithm
b) Hybrid merge join algorithm
c) Hash join algorithm
d) Hybrid Hash join algorithm
View Answer

Answer: b
Explanation: The Hybrid merge join algorithm merges the sorted relation with leaf entries of the secondary B+ tree index. The result contains tuples from the sorted relation and addresses for tuples from the unsorted relation.
advertisement

6. The splitting of input until each partition of the build input fits the memory is called as ______
a) Temporary partitioning
b) Block partitioning
c) Recursive partitioning
d) Byte partitioning
View Answer

Answer: c
Explanation: The splitting of input until each partition of the build input fits the memory is called as recursive partitioning.

7. Overflow resolution is performed when,
a) A hash index overflow is detected
b) Extra hash indices are to be added
c) When the number of partitions are to be increased
d) None of the mentioned
View Answer

Answer: a
Explanation: Hash table overflows can be handled by either overflow resolution or overflow avoidance. Overflow resolution is performed when a hash index overflow is detected.
advertisement

8. Which of the following is not a set operation
a) Union
b) Intersection
c) And operation
d) Set difference
View Answer

Answer: c
Explanation: The AND operation is not a set operation, it is a logical bit operation.

9. Which of the following joins preserves the tuples of the relation on the left side of the operator?
a) Left outer join
b) Natural join
c) Right outer join
d) None of the mentioned
View Answer

Answer: a
Explanation: Left outer join and full outer join both preserve the tuples on the left side of the operator.

10. State true or false: The aggregation functions can be implemented in the same way as that of duplicate elimination.
a) True
b) False
View Answer

Answer: a
Explanation: The aggregation functions can be implemented in the same way as that of duplicate elimination.

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.