Page 1 of 1

1. A relation, a collection of tuples, is physically stored in a file, a sequence of blocks, on the disk. To execute "or

Posted: Tue May 24, 2022 8:21 am
by answerhappygod
1 A Relation A Collection Of Tuples Is Physically Stored In A File A Sequence Of Blocks On The Disk To Execute Or 1
1 A Relation A Collection Of Tuples Is Physically Stored In A File A Sequence Of Blocks On The Disk To Execute Or 1 (46.47 KiB) Viewed 166 times
1. A relation, a collection of tuples, is physically stored in a file, a sequence of blocks, on the disk. To execute "order by StudentID" on a relation Student with 33 student records, the database engages external memory sorting algorithm. Originally, all tuples of Student are stored on the disk with their StudentID values sequentially 48, 84, 23, 74, 46, 82, 49, 8, 39, 103, 75, 118, 7, 115, 113, 114, 107, 33, 102, 98, 21, 85, 34, 80, 93, 78, 19, 117, 86, 109, 116, 61, 65, and each block (except for the last one) accommodates 2 tuples. The system has allocated a buffer pool of 4 frames to carry out the sorting. Please answer the following questions (Hint: you may write your python code to save time in manual sorting). (a) Show the resulting runs of every pass of the sorting, including pass 0. [7 marks] (b) Compute the number of I/Os consumed by the above external memory sorting. [3 marks]