File Structures and Indexing · Database Management System · GATE CSE

Start Practice

Marks 1

1

Which of the following file organizations is/are I/O efficient for the scan operation in DBMS?

GATE CSE 2024 Set 2
2

In a B+ tree, the requirement of at least half-full (50%) node occupancy is relaxed for which one of the following cases?

GATE CSE 2024 Set 1
3
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 _______
GATE CSE 2021 Set 2
4

Consider a linear list based implementation in a file system. Each directory is a list of nodes, where each node contains the file name along with the file metadata, such as the list of pointers to the data blocks. Consider a given directory foo.

Which of the following operations will necessarily require a full scan of foo for successful completion?

GATE CSE 2021 Set 1
5
Which one of the following statements is NOT correct about the B+ tree data structure used for creating an index of a relational database table?
GATE CSE 2019
6
B+ Trees are considered BALANCED because
GATE CSE 2016 Set 2
7
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
GATE CSE 2015 Set 1
8
With reference to the B+ tree index of order 1 shown below, the minimum number of nodes (including the Root node) that must be fetched in order to satisfy the following query: “Get all records with a search key greater than or equal to 7 and less than 15” is _________ GATE CSE 2015 Set 2 Database Management System - File Structures and Indexing Question 19 English
GATE CSE 2015 Set 2
9
Consider a B+- tree in which the maximum number of keys in a node is 5. What is the minimum number of keys in any non-root node?
GATE CSE 2010
10
A clustering index is defined on the fields which are of type
GATE CSE 2008
11
A B-Tree used as an index for a large database table has four levels including the root node. If a new key is inserted in this index, then the maximum number of nodes that could be newly created in the process are:
GATE CSE 2005
12
B+-trees are preferred to binary trees in databases because
GATE CSE 2000
13
Which of the following is correct?
GATE CSE 1999
14

There are five records in a database.

Name Age Occupation Category
Rama 27 CON A
Abdul 22 ENG A
Jennifer
28 DOC B
Maya 32 SER D
Dev 24 MUS C

There is an index file associated with this and it contains the values 1, 3, 2, 5 and 4. Which one of the fields is the index built from?

GATE CSE 1998

Marks 2

1

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.

GATE CSE 2023 Database Management System - File Structures and Indexing Question 3 English

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 b blocks takes $$\left\lceil {{{\log }_2}b} \right\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 ___________.

GATE CSE 2023
2

Consider two files systems A and B, that use contiguous allocation and linked allocation, respectively. A file of size 100 blocks is already stored in A and also in B. Now, consider inserting a new block in the middle of the file (between 50th and 51st block), whose data is already available in the memory. Assume that there are enough free blocks at the end of the file and that the file control blocks are already in memory. Let the number of disk accesses required to insert a block in the midele of the file in A and B are nA and nB, respectively, then the value of nA + nB is _____________.

GATE CSE 2022
3
Consider a database implemented using B+ tree for file indexing and installed on a disk drive with block size of 4 KB. The size of search key is 12 bytes and the size of tree/disk pointer is 8 bytes. Assume that the database has one million records. Also assume that no node of the B+ tree and no records are present initially in main memory. Consider that each record fits into one disk block. The minimum number of disk accesses required to retrieve any record in the database is ______.
GATE CSE 2020
4
Consider a B+ tree in which the search key is 12 bytes long, block size is 1024 bytes, record pointer is 10 bytes long and block pointer is 8 bytes long. The maximum number of keys that can be accommodated in each non-leaf node of the tree is ____.
GATE CSE 2015 Set 3
5
The following key values are inserted into a B+-tree in which order of the internal nodes is 3, and that of the leaf nodes is 2, in the sequence given below. The order of internal nodes is the maximum number of tree pointers in each node, and the order of leaf nodes is the maximum number of data items that can be stored in it. The B+- tree is initially empty.

10, 3, 6, 8, 4, 2, 1

The maximum number of times leaf nodes would get split up as a result of these insertions is
GATE CSE 2009
6
Consider a file of 16384 records. Each record is 32 bytes long and its key field is of size 6 bytes. The file is ordered on a non-key field, and the file organization is unspanned. The file is stored in a file system with block size 1024 bytes, and the size of a block pointer is 10 bytes. If the secondary index is built on the key field of the file, and a multi-level index scheme is used to store the secondary index, the number of first-level and second-level blocks in the multi-level index are respectively
GATE CSE 2008
7
The order of a leaf node in a B+- tree is the maximum number of (value, data record pointer) pairs it can hold. Given that the block size is 1K bytes, data record pointer is 7 bytes long, the value field is 9 bytes long and a block pointer is 6 bytes long, what is the order of the leaf node?
GATE CSE 2007
8
Consider the B+ tree in the adjoining figure, where each node has at most two keys and three links. GATE CSE 2007 Database Management System - File Structures and Indexing Question 13 English 1

Keys K 15 and then K 25 are inserted into this tree in that order. Exactly how many of the following nodes (disregarding the links) will be present in the tree after the two insertions?

GATE CSE 2007 Database Management System - File Structures and Indexing Question 13 English 2
GATE CSE 2007
9
Consider the B+ tree in the adjoining figure, where each node has at most two keys and three links. GATE CSE 2007 Database Management System - File Structures and Indexing Question 12 English 1

Now the key K 50 is deleted from the B+ tree resulting after the two insertions made earlier. Consider the following statements about the B+ tree resulting after this deletion.

i) The height of the tree remains the same.

ii) The node GATE CSE 2007 Database Management System - File Structures and Indexing Question 12 English 2 (disregarding the links) is present in the tree.

iii) The root node remains unchanged (disregarding the links).

Which one of the following options is true ?
GATE CSE 2007
10
The order of an internal node in a B+ tree index is the maximum number of children it can have. Suppose that a child pointer takes 6 bytes, the search field value takes 14 bytes, and the block size is 512 bytes. What is the order of the internal node?
GATE CSE 2004
11
Consider a table T in a relational database with a key field K. A B-tree of order p is used as an access structure on K, where p denotes the maximum number of tree pointers in a B-tree index node. Assume that K is 10 bytes long; disk block size is 512 bytes; each data pointer PD is 8 bytes long and each block pointer PB is 5 bytes long. In order for each B-tree node to fit in a single disk block, the maximum value of p is
GATE CSE 2004
12
A B+ - tree index is to be built on the Name attribute of the relation STUDENT. Assume that all student names are of length 8 bytes, disk blocks are of size 512 bytes, and index pointers are of size 4 bytes. Given this scenario, what would be the best choice of the degree (i.e. the number of pointers per node) of the B+ - tree?
GATE CSE 2002
EXAM MAP
Medical
NEETAIIMS
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
Civil Services
UPSC Civil Service
Defence
NDA
Staff Selection Commission
SSC CGL Tier I
CBSE
Class 12