GATE CS 2021 Set 2 | Question 31

Databases › File Organization & Indexing · NAT · 1 mark · Answer: 698

  1. Question 31Databasesnat1 mark
    A data file consisting of 1,50,000 student-records is stored on a hard disk with block size of 4096 bytes. The data file is sorted on the primary key RollNo. The size of a record pointer for this disk is 7 bytes. Each student-record has a candidate key attribute called ANum of size 12 bytes. Suppose an index file with records consisting of two fields, ANum value and the record pointer to the corresponding student record, is built and stored on the same disk. Assume that the records of the data file and index file are not split across disk blocks. The number of blocks in the index file is ______.

    Answer: 698

    Solution

    Index record size bytes; records per block . Since ANum is a candidate key, the index is dense with 150000 entries, needing blocks.

More GATE PYQ on File Organization & Indexing

All GATE CS Databases PYQ →

Attempt GATE CS 2021 Set 2 in real GATE exam mode

Full paper with a timer, the GATE interface and a topic-wise analysis — free.

Create free account →