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
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
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.
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
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
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
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.
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
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
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.
8. Which of the following is not a set operation
a) Union
b) Intersection
c) And operation
d) Set difference
View Answer
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
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
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.
- Practice Computer Science MCQs
- Check Computer Science Books
- Check RDBMS Books
- Apply for Computer Science Internship