File Organization questions

Q46

GATE CS 2026 CS-2Storage and IndexingMCQ2 marks−2/3 if wrong
An index in a DBMS is said to be dense if an index entry appears for every search-key value in the indexed file. Otherwise it is called a sparse index. Consider the following two statements.

S1: A hash index must be a dense index

S2: A B+B^+ tree index can be a sparse index

Which one of the following options is correct?
Show answer without attempting

Answer: A

Q26

GATE CS 2024 CS-2Storage and IndexingMSQ1 mark
Which of the following file organizations is/are I/O efficient for the scan operation in DBMS?
More than one option can be correct.
Show answer without attempting

Answer: A, B

Q53

GATE CS 2024 CS-2Storage and IndexingNAT2 marks
Consider a disk with the following specifications: rotation speed of 6000 RPM, average seek time of 5 milliseconds, 500 sectors/track, 512-byte sectors.
A file has content stored in 3000 sectors located randomly on the disk. Assuming average rotational latency, the total time (in seconds, rounded off to 2 decimal places) to read the entire file from the disk is _________
Show answer without attempting

Answer: 29.50 to 30.50

Q62

GATE CS 2023 CSStorage and IndexingNAT2 marks
Consider a database of fixed-length records, stored as an ordered file. The database has 25,000 records, with each record being 100 bytes, of which the primary key occupies 15 bytes. The data file is block-aligned in that each data record is fully contained within a block. The database is indexed by a primary index file, which is also stored as a block-aligned ordered file. The figure below depicts this indexing scheme.

Suppose the block size of the file system is 1024 bytes, and a pointer to a block occupies 5 bytes. The system uses binary search on the index file to search for a record with a given key. You may assume that a binary search on an index file of bb blocks takes ⌈log⁡2b⌉\lceil \log_2 b \rceil block accesses in the worst case.

Given a key, the number of block accesses required to identify the block in the data file that may contain a record with the key, in the worst case, is ____________.
Question figure
Show answer without attempting

Answer: 6

Q21

GATE CS 2021 CS-2Storage and IndexingNAT1 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 data file and index file are not split across disk blocks. The number of blocks in the index file is ____________.
Show answer without attempting

Answer: 698

Q32

GATE CS 2015 CS-1Storage and IndexingMCQ1 mark−1/3 if wrong
A file is organized so that the ordering of data records is the same as or close to the ordering of data entries in some index. Then that index is called
Show answer without attempting

Answer: C

Q15

GATE CS 2013 CSStorage and IndexingMCQ1 mark−1/3 if wrong
An index is clustered, if
Show answer without attempting

Answer: C

0/70 correct0 marks

Related topics in Storage and Indexing