Q16.Marks: +2.0UGC NET Paper 2: Computer Science17th June 2023
The total cost of retrieving records in sorted order using an unclustered B+ tree is
(P-Average number of records per data page
N-Data pages
F-Ratio of the size of a data entry to the size of a data record)
1.(F*N) + P
2.(F + P) * N✓ Correct
3.F*N*P
4.F + P/N
Solution
The correct answer is (F + P) * N
Key PointsWhen using an un-clustered B+ tree to retrieve records in sorted order, the total cost varies depending on the parameters you've provided: the average number of records per page (P), the number of data pages (N), and the ratio of the size of a data entry to the size of a data record (F).
We can calculate the cost as follows:
We need to access each data page once N. However, for each data entry, because of the un-clustered nature of the B+ Tree, there might be repeated access to a data page. So, the cost to retrieve the data entries is F*N.
Secondary, we also need to consider the average number of records in a data page. When we retrieve the data, we have to consider this factor. As we're retrieving records in sorted order, we need to look at each record at least once, so average number of records per page (P) comes into the play.
So from the given options, it seems like the closest one is: (F + P) * N which represents the cost of retrieving records in sorted order from an un-clustered B+ tree. It combines the cost of retrieving each data entries (F*N) and retrieving the ,records (P*N).