# File System

 Question 1
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 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 ______
 A 235 B 248 C 488 D 698
GATE CSE 2021 SET-2   Database Management System
Question 1 Explanation:
 Question 2
Consider a linear list based directory 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?
[MSQ]
 A Creation of a new file in foo B Deletion of an existing file from foo C Renaming of an existing file in foo D Opening of an existing file in foo
GATE CSE 2021 SET-1   Database Management System
Question 2 Explanation:
 Question 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 _______
 A 2 B 3 C 4 D 5
GATE CSE 2020   Database Management System
Question 3 Explanation:
 Question 4
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?
 A $B^+$ Tree is a height-balanced tree B Non-leaf nodes have pointers to data records C Key values in each node are kept in sorted order D Each leaf node has a pointer to the next leaf node
GATE CSE 2019   Database Management System
Question 4 Explanation:
 Question 5
Which of the following is dense index?
 A Primary index B Clustered index C Secondary index D Secondary non-key index
ISRO CSE 2018   Database Management System
Question 5 Explanation:
 Question 6
in a file which contains 1 million records and the order of the tree is 100, then what is the maximum number of nodes to be accessed if B+ tree index is used?
 A 5 B 4 C 3 D 10
ISRO CSE 2018   Database Management System
Question 6 Explanation:
 Question 7
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
 A 5 B 4 C 3 D 2
ISRO CSE 2017   Database Management System
Question 7 Explanation:
 Question 8
Which of these is characteristic of RAID 5?
 A Dedicated parity B Double parity C Hamming code parity D Distributed parity
ISRO CSE 2017   Database Management System
Question 8 Explanation:
 Question 9
In a $B^{+}$ tree, if the search -key value is 8 bytes long, the block size is 512 bytes and the block pointer size is 2 bytes, then maximum order of the $B^{+}$ tree is _______________.
 A 64 B 32 C 52 D 12
GATE CSE 2017 SET-2   Database Management System
Question 9 Explanation:
 Question 10
A clustering index is defined on the fields which are of type
 A non-key and ordering B non-key and non-ordering C key and ordering D key and non-ordering
ISRO CSE 2016   Database Management System
Question 10 Explanation:
There are 10 questions to complete.