Home »
MCQs »
DBMS MCQs
DBMS External Sort-Merge Algorithm MCQs
DBMS External Sort-Merge Algorithm MCQs: This section contains multiple-choice questions and answers on External Sort-Merge Algorithm in DBMS.
Submitted by Anushree Goswami, on May 14, 2022
1. A sort key must be built on any relation to be able to sort it. Then the sorted relation can be read using the index.
- Sort
- Primary
- Index
- Composite
Answer: A) Sort
Explanation:
A sort key must be built on any relation to be able to sort it. Then the sorted relation can be read using the index.
Discuss this Question
2. In which case sorting is performed?
- A relationship that has a small or medium size in comparison to the main memory.
- There is a size difference between relations and memory.
- Both A and B
- None of the above
Answer: C) Both A and B
Explanation:
Sorting is performed in the case when -
- A relationship that has a small or medium size in comparison to the main memory.
- There is a size difference between relations and memory.
Discuss this Question
3. Organizing relationships whose sizes are larger than the memory because they do not fit is known as -
- Internal Sorting
- External Sorting
- Organization Sorting
- Memory Sorting
Answer: B) External Sorting
Explanation:
Organizing relationships whose sizes are larger than the memory because they do not fit.
Discuss this Question
4. When sorting externally, the ___ merge is the most appropriate method to use.
- Internal-sort
- External-sort
- Merge-sort
- None
Answer: B) External-sort
Explanation:
When sorting externally, the external-sort merge is the most appropriate method to use.
Discuss this Question
5. The number M indicates how many disk blocks are available in the ___ memory buffer so that sorting may occur.
- Primary
- Main
- Secondary
- Tertiary
Answer: B) Main
Explanation:
The number M indicates how many disk blocks are available in the main memory buffer so that sorting may occur.
Discuss this Question
6. External-sort merge algorithm is called an ___ because it merges N runs.
- One-way
- Two-way
- N-way
- Null-way
Answer: C) N-way
Explanation:
External-sort merge algorithm is called an N-way merge because it merges N runs.
Discuss this Question
7. There will either be M or more runs generated depending on the size of the ___.
- Relation
- Memory
- Both A and B
- None of the above
Answer: C) Both A and B
Explanation:
There will either be M or more runs generated depending on the size of the relation and memory.
Discuss this Question
8. Since a single block cannot be allocated for each run of the processing, the merge operation will be performed ___ time(s).
- Once
- Twice
- Thrice
- Multiple
Answer: D) Multiple
Explanation:
Since a single block cannot be allocated for each run of the processing, the merge operation will be performed multiple times.
Discuss this Question
9. The input buffer blocks of M-1 are large enough for each merge to hold ___ runs.
- M
- M-2
- M-3
- M-1
Answer: D) M-1
Explanation:
The input buffer blocks of M-1 are large enough for each merge to hold M-1 runs.
Discuss this Question
10. What is TRUE about initial phase work in this algorithm?
- A single run is obtained by merging the first M-1 runs.
- The next run of M-1 is also merged.
- Until all initial runs are processed, this step continues.
- All of the above
Answer: D) All of the above
Explanation:
In case of the initial phase work in this algorithm -
- A single run is obtained by merging the first M-1 runs.
- The next run of M-1 is also merged.
- Until all initial runs are processed, this step continues.
Discuss this Question
11. With ___ exception(s), every block in the relation is read and written only once during each pass.
- 1
- 2
- 3
- 4
Answer: B) 2
Explanation:
With two exceptions, every block in the relation is read and written only once during each pass.
Discuss this Question
12. What is/are the two exception(s), every block in the relation is read and written only once during each pass?
- It is possible to produce a sorted result without writing the result to the disk on the final pass
- The pass may not be able to read out or write some runs.
- Both A and B
- None of the above
Answer: C) Both A and B
Explanation:
The two exception(s), every block in the relation is read and written only once during each pass are -
- It is possible to produce a sorted result without writing the result to the disk on the final pass
- The pass may not be able to read out or write some runs.
Discuss this Question