Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Suppose you have 2 relations, R(A,B) and S(B,C), with the following characteristics: The size of one disk block is 1000 bytes. Attributes A, B are
Suppose you have 2 relations, R(A,B) and S(B,C), with the following characteristics: The size of one disk block is 1000 bytes. Attributes A, B are of length 10 bytes. Attribute C is of length 180 bytes. The tuples are not spanned across disk blocks R = 5,000 (number of tuples of R) S = 500 (number of tuples of S) We have 30 blocks of memory buffer We use one disk block for one B+tree node Each pointer in a B+tree index (both a record pointer and a node pointer) uses 10 bytes. 2 Assume the numbers computed in the previous problems. Assume that each node in the B+tree contains the minimum number of keys and pointers (as long as it is allowed in our parameter setting). (a) (4 points) How many nodes does the constructed B+tree have? (b) (4 points) How many disk IOs would be incurred during the construction of the B+tree on S.B? Assume that you use the main memory buffer in the most effi- cient way to minimize the number of disk IOs. In your answer, please include the cost of reading the tuples from S and writing the constructed B+tree to the disk. Suppose you have 2 relations, R(A,B) and S(B,C), with the following characteristics: The size of one disk block is 1000 bytes. Attributes A, B are of length 10 bytes. Attribute C is of length 180 bytes. The tuples are not spanned across disk blocks R = 5,000 (number of tuples of R) S = 500 (number of tuples of S) We have 30 blocks of memory buffer We use one disk block for one B+tree node Each pointer in a B+tree index (both a record pointer and a node pointer) uses 10 bytes. 2 Assume the numbers computed in the previous problems. Assume that each node in the B+tree contains the minimum number of keys and pointers (as long as it is allowed in our parameter setting). (a) (4 points) How many nodes does the constructed B+tree have? (b) (4 points) How many disk IOs would be incurred during the construction of the B+tree on S.B? Assume that you use the main memory buffer in the most effi- cient way to minimize the number of disk IOs. In your answer, please include the cost of reading the tuples from S and writing the constructed B+tree to the disk
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started