Q: 1 Indices whose search key specifies an order different from the sequential order of the file are called—
Primary Indices
Random Indices
Sequential Indices
Secondary Indices
[ Option D ]
An Index in a database is a special data structure that helps the system locate records quickly without scanning the entire table.
Primary Indices correspond to the sequence of the data file itself, meaning the index key and the file are ordered the same way.
Secondary Indices have a search key order that is different from the sequential order of the data file. This allows access to data organized by non-primary keys, where the actual data storage is unrelated to the index ordering.
Q: 2 Consider below statements –
(I) Each non-leaf node in B+ tree has between [n/2] and n children, where n is fixed for a particular tree.
(II) The search key of a clustering index is always primary key.
(III) Secondary indices must be dense.
(IV) In a dense index, an index entry appears for only some of the search-key values.
Which of the above statements are true?
I and IV
II and III
I and III
I and II
[ Option C ]
The statement (I) is true because, in B+ trees, to maintain balance and efficient use of space, the number of children for each internal (non-leaf) node must be at least half of the maximum allowed children, up to the maximum n.
The statement (II) is false because, a clustering index is based on the order in which data records are stored physically. The search key for the clustering index is the attribute(s) on which the file is ordered, which may or may not be the primary key.
The statement (III) is true because, secondary indices typically maintain an index record for every tuple in the data file to provide quick access regardless of the clustering. Hence, secondary indices are dense meaning an index entry exists for every search-key value.
The statement (IV) is false because, by definition, a Dense Index has an index record for every search-key value in the data file. A Sparse Index has entries for only some search-key values.
Q: 3 The master list of an indexed file:
Is sorted in ascending order
Contains only a list of keys and record numbers
Has a number assigned to each record
Both (b) and (c)
[ Option D ]
In an indexed file organization, the master list stores only key values along with their corresponding record numbers. Each record in the data file is assigned a unique record number, which helps the index quickly locate the actual record.
Q: 4 Total time to access a disk block is given by the—
Seek time + rotational delay
Seek time + rotational delay + transfer time
Seek time + transfer time
Seek time
[ Option B ]
Accessing a disk block involves three main components:
Seek Time: The time taken for the disk arm to move the read/write head to the track where the desired block is located.
Rotational Delay (Latency): The time it takes for the disk platter to rotate so that the desired sector is under the read/write head.
Transfer Time: The time required to actually read or write the data once the head is in position.
All three components combined give the total time required to access a disk block.
Total Access Time = Seek Time + Rotational Delay + Transfer Time
Q: 5 A locked file in a database system can be:
Accessed by only one user
Modified by user with the correct password
Used to hide sensitive information
None of the above
[ Option A ]
A Locked File is used in multi-user database environments to prevent simultaneous access or modification of data. When a file is locked, only one user or transaction can access it at a time, ensuring data consistency and avoiding conflicts.
Thank you so much for taking the time to read my Computer Science MCQs section carefully. Your support and interest mean a lot, and I truly appreciate you being part of this journey. Stay connected for more insights and updates! If you'd like to explore more tutorials and insights, check out my YouTube channel.
Don’t forget to subscribe and stay connected for future updates.