0

I'm currently grappling with a database administration question and would greatly appreciate some guidance. Here's the scenario: I'm working with a slotted page array organized under the unspanned model, consisting of a header (11B) and 3B slot references. The relation in question is 'Book,' which includes fields for ISBN (char(11)), title (char(26)), and author (char(22)).

My task is to determine the number of tuples that can fit into a 16000B slotted page array. I've followed the calculations, considering the storage requirements per tuple and the available space within the page. However, I've not understood why the answer is 257, and I'm struggling to understand why it's that specific number.

Could someone kindly walk me through the steps or provide insights into why the answer is precisely 257?

8
  • Which database system and version?
    – J.D.
    Dec 3, 2023 at 15:13
  • so, what do you think "the storage requirements per tuple" and "the available space within the page" are, and why?
    – mustaccio
    Dec 3, 2023 at 15:16
  • @mustaccio I was thinking that determining the storage requirements per tuple and the available space within the page involves understanding the size of each tuple and the overall space utilization in the slotted page array. In this scenario, the storage requirements per tuple are calculated by summing the sizes of the fields for ISBN (char(11)), title (char(26)), and author (char(22)). The total comes to 11 + 26 + 22 = 59 bytes per tuple. The available space within the page is calculated by subtracting the header size from the total page size, resulting in 15989B for storing tuples.
    – cricket900
    Dec 3, 2023 at 15:29
  • What about "3B slot references"? Where do you think they are stored?
    – mustaccio
    Dec 3, 2023 at 15:30
  • @mustaccio To find the number of tuples that can fit, you divide the available space by the storage requirements per tuple: 15989B / 59B ≈ 271. Since you can't have a fraction of a tuple, the answer is rounded down to the nearest whole number. However, the answer is wrong.
    – cricket900
    Dec 3, 2023 at 15:30

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.