Home »
MCQs »
DBMS MCQs
DBMS Nested-Loop Join Algorithm MCQs
DBMS Nested-Loop Join Algorithm MCQs: This section contains multiple-choice questions and answers on Nested-Loop Join Algorithm in DBMS.
Submitted by Anushree Goswami, on May 15, 2022
1. Nested loop joins are joins in which there are two nested ___ loops.
- Of
- For
- Nor
- Xor
Answer: B) For
Explanation:
Nested loop joins are joins in which there are two nested for loops.
Discuss this Question
2. An algorithm known as the ___ is used to perform the nested loop join, e.g. θ on two relations r and s.
- Loop Join Algorithm
- Nested Loop Join Algorithm
- Join Algorithm
- None of the above
Answer: B) Nested Loop Join Algorithm
Explanation:
An algorithm known as the Nested loop join algorithm is used to perform the nested loop join, e.g. θ on two relations r and s.
Discuss this Question
3. Computations are carried out by r ⋈ θ s where r represents the ___ relation and s represents the ___ relation.
- Outer, Inner
- Inner, Outer
- Inner
- Outer
Answer: A) Outer, Inner
Explanation:
Computations are carried out by r ⋈ θ s where r represents the outer relation and s represents the inner relation.
Discuss this Question
4. Unlike linear file scans, nested-loop joins don't require any ____ to access the data.
- Setting
- Indexing
- Pointing
- None
Answer: B) Indexing
Explanation:
Unlike linear file scans, nested-loop joins don't require any indexing to access the data.
Discuss this Question
5. Nesting-loop joins are very ____ due to the fact that each pair of tuples in the two given relations must be computed and examined separately.
- Cheap
- Expensive
- Few
- None
Answer: B) Expensive
Explanation:
Nesting-loop joins are very expensive due to the fact that each pair of tuples in the two given relations must be computed and examined separately.
Discuss this Question
6. In the event that any of the relationships given is completely compatible with the memory, it is essential to use that relationship as the ___ relation.
- Inner
- Outer
- Both a and b
- None of the above
Answer: A) Inner
Explanation:
In the event that any of the relationships given is completely compatible with the memory, it is essential to use that relationship as the inner relation.
Discuss this Question
7. A nested-loop join with blocks of the inner relation paired with blocks of the outer relation is known as a ____ nested-loop join.
- Inner
- Outer
- Block
- Nested
Answer: C) Block
Explanation:
A nested-loop join with blocks of the inner relation paired with blocks of the outer relation is known as a block nested-loop join.
Discuss this Question
8. In a situation where the buffer size is small enough to store the entire relationship in memory, the ____ nested-loop join saves the need for major ____ accesses.
- Block
- Inner
- Outer
- None
Answer: A) Block
Explanation:
In a situation where the buffer size is small enough to store the entire relationship in memory, the block nested-loop join saves the need for major block accesses.
Discuss this Question
9. Every tuple from one block is paired with every tuple from the other block in the ___ to produce all pairs of tuples.
- Block nested-loop
- Nested-loop
- Join-loop
- None
Answer: A) Block nested-loop
Explanation:
Every tuple from one block is paired with every tuple from the other block in the block nested-loop to produce all pairs of tuples.
Discuss this Question
10. Block Nested-Loop ___ algorithm is the algorithm used to perform nested-loop block joins.
- Join
- Block
- Inner
- Outer
Answer: B) Block
Explanation:
Block Nested-Loop Join algorithm is the algorithm used to perform nested-loop block joins.
Discuss this Question
11. A block nested-loop join is worst case when blocks in the inner relation s are read ____ for each block in the outer relation r.
- Once
- Twice
- Thrice
- Multiple times
Answer: A) Once
Explanation:
A block nested-loop join is worst case when blocks in the inner relation s are read once for each block in the outer relation r.
Discuss this Question
12. For each tuple in the inner relationship s, the ____-loop join reads it once for each tuple in the outer relationship r.
- Join
- Nested
- Block
- None
Answer: B) Nested
Explanation:
For each tuple in the inner relationship s, the nested-loop join reads it once for each tuple in the outer relationship r.
Discuss this Question
13. It is efficient to use the inner relation s as the outer relation if neither of the given relations r or s completely fit into the ____.
- Block
- Size
- Memory
- Storage
Answer: C) Memory
Explanation:
It is efficient to use the inner relation s as the outer relation if neither of the given relations r or s completely fit into the memory.
Discuss this Question
14. As soon as the first match is found for each outer relation tuple in a/an _____, the inner loop terminates.
- Equijoin
- Natural join
- Both A and B
- None of the above
Answer: C) Both A and B
Explanation:
As soon as the first match is found for each outer relation tuple in an equijoin or natural join, the inner loop terminates.
Discuss this Question
15. Rather than relying on disk blocks for the block nested-loop join algorithm, we can use the ____ size that will fit into memory while allowing enough room for buffers of the inner relations.
- Smallest
- Tiny
- Largest
- None
Answer: C) Largest
Explanation:
Rather than relying on disk blocks for the block nested-loop join algorithm, we can use the largest size that will fit into memory while allowing enough room for buffers of the inner relations.
Discuss this Question
16. A scanning of the inner loop can be performed alternately in _____ directions.
- Forward
- Reverse
- Both A and B
- None of the above
Answer: C) Both A and B
Explanation:
A scanning of the inner loop can be performed alternately in forward and reverse directions.
Discuss this Question
17. Additionally, the order of the request allows for ____ of the data left over from the previous scan.
- Misuse
- Use
- Reuse
- None
Answer: C) Reuse
Explanation:
Additionally, the order of the request allows for reuse of the data left over from the previous scan.
Discuss this Question
18. We can replace the file scans with highly efficient index lookups if an index is present on the ___ attribute of the inner loop.
- Log
- Join
- Array
- Stack
Answer: B) Join
Explanation:
We can replace the file scans with highly efficient index lookups if an index is present on the join attribute of the inner loop.
Discuss this Question
19. A nested-loop indexed join can be performed using ____ created during the evaluation of the join.
- Existing indexes
- Temporary indexes
- Both A and B
- None of the above
Answer: C) Both A and B
Explanation:
A nested-loop indexed join can be performed using either existing indexes or temporary indexes created during the evaluation of the join.
Discuss this Question
20. Nested-loop joins optimized with indexed nested loops are ____ than traditional loop joins.
- Slower
- Faster
- Comparatively Slower
- None
Answer: B) Faster
Explanation:
Nested-loop joins optimized with indexed nested loops are faster than traditional loop joins.
Discuss this Question