ADVERTISEMENT
ADVERTISEMENT

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.

  1. Of
  2. For
  3. Nor
  4. 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.

  1. Loop Join Algorithm
  2. Nested Loop Join Algorithm
  3. Join Algorithm
  4. 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.

  1. Outer, Inner
  2. Inner, Outer
  3. Inner
  4. 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.

  1. Setting
  2. Indexing
  3. Pointing
  4. 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.

  1. Cheap
  2. Expensive
  3. Few
  4. 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.

  1. Inner
  2. Outer
  3. Both a and b
  4. 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.

  1. Inner
  2. Outer
  3. Block
  4. 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.

  1. Block
  2. Inner
  3. Outer
  4. 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.

  1. Block nested-loop
  2. Nested-loop
  3. Join-loop
  4. 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.

  1. Join
  2. Block
  3. Inner
  4. 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.

  1. Once
  2. Twice
  3. Thrice
  4. 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.

  1. Join
  2. Nested
  3. Block
  4. 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 ____.

  1. Block
  2. Size
  3. Memory
  4. 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.

  1. Equijoin
  2. Natural join
  3. Both A and B
  4. 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.

  1. Smallest
  2. Tiny
  3. Largest
  4. 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.

  1. Forward
  2. Reverse
  3. Both A and B
  4. 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.

  1. Misuse
  2. Use
  3. Reuse
  4. 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.

  1. Log
  2. Join
  3. Array
  4. 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.

  1. Existing indexes
  2. Temporary indexes
  3. Both A and B
  4. 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.

  1. Slower
  2. Faster
  3. Comparatively Slower
  4. None

Answer: B) Faster

Explanation:

Nested-loop joins optimized with indexed nested loops are faster than traditional loop joins.

Discuss this Question



ADVERTISEMENT
ADVERTISEMENT


Comments and Discussions!



ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT

Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates

© https://www.includehelp.com some rights reserved.