File Organization and Indexing MCQ Quiz - Objective Question with Answer for File Organization and Indexing - Download Free PDF

Last updated on Jun 27, 2025

Latest File Organization and Indexing MCQ Objective Questions

File Organization and Indexing Question 1:

What is the main objective of file organization in a database system?

  1. Enforcing data security
  2. Efficient storage of data
  3. Facilitating data retrieval
  4. Ensuring data integrity

Answer (Detailed Solution Below)

Option 3 : Facilitating data retrieval

File Organization and Indexing Question 1 Detailed Solution

The correct answer is Facilitating data retrieval.

Key Points

  • The main objective of file organization in a database system is to facilitate data retrieval. This ensures that data stored in the database can be accessed efficiently when needed.
    • File organization determines the physical layout of data on storage devices such as hard drives or SSDs.
    • Proper file organization minimizes data access time, improving the overall performance of the database system.
    • It helps optimize the use of storage space and ensures faster query execution by arranging data in a systematic way.
    • Techniques such as sequential, indexed, and hashed file organization are used based on the nature of data and retrieval requirements.
    • Efficient data retrieval is critical in applications requiring real-time data access, such as e-commerce platforms, banking systems, and search engines.

Additional Information

  • Other objectives of file organization include:
    • Efficient storage of data: Ensuring optimal use of storage space by organizing data compactly.
    • Enforcing data security: Protecting data from unauthorized access or corruption.
    • Ensuring data integrity: Maintaining data accuracy and consistency over its lifecycle.
  • However, facilitating data retrieval remains the primary focus, as it directly impacts database performance and user experience.
  • Modern database systems often use advanced indexing and caching mechanisms to further enhance data retrieval efficiency.

File Organization and Indexing Question 2:

Which file organization provides direct access to records using a key field?

  1. Indexed file organization
  2. Hash file organization
  3. Clustered file organization
  4. Sequential file organization

Answer (Detailed Solution Below)

Option 1 : Indexed file organization

File Organization and Indexing Question 2 Detailed Solution

The correct answer is Indexed File Organization.

Key Points

  • Indexed file organization is a file storage method that uses an index to provide direct access to records.
    • An index is a separate structure that contains key fields and pointers to the actual records in the file.
    • When a key field is provided, the index is searched to locate the pointer to the desired record.
    • This allows for efficient record retrieval without scanning the entire file.
    • Indexed file organization is widely used in databases and applications where quick access to records is essential.
    • It supports random access, making it suitable for applications that require frequent lookups.

Additional Information

  • Indexed file organization can also support multiple indexes for different key fields, enabling flexibility in record retrieval.
  • It is used in scenarios like library systems, banking systems, and inventory management systems.
  • While efficient for direct access, maintaining indexes can increase storage requirements and update complexity.
  • Examples of database systems that use indexed file organization include MySQL and PostgreSQL.
  • Indexed file organization is particularly useful for large datasets where sequential scanning would be inefficient.

File Organization and Indexing Question 3:

If a hash table is implemented as a search tree, the expected time required to enter n names and make m searches is proportional to : 

  1. (n + m) log2 n
  2. (n + m) log2 m
  3. mn log2
  4. mn log2 m

Answer (Detailed Solution Below)

Option 1 : (n + m) log2 n

File Organization and Indexing Question 3 Detailed Solution

The correct answer is (n + m) log2 n.

Key Points

  • If a hash table is implemented as a search tree, the expected time required to enter n names and make m searches is proportional to (n + m) log2 n.
  • The reason behind this is that the search tree ensures that the time complexity for insertion and search operations is logarithmic relative to the number of elements in the tree.
  • Inserting n names takes O(n log2 n) time, as each insertion can take up to log2 n comparisons in a balanced tree.
  • Searching for m names takes O(m log2 n) time, as each search operation can take up to log2 n comparisons.
  • Therefore, the total expected time is the sum of the time for insertion and search operations, which is (n + m) log2 n.

Additional Information

  • A search tree, such as a binary search tree (BST), AVL tree, or Red-Black tree, is used to maintain a sorted order of elements, allowing for efficient search and insertion operations.
  • The balancing property of search trees ensures that the height of the tree remains logarithmic relative to the number of elements, thus providing efficient operations.
  • Hash tables are typically used for average-case constant-time complexity operations, but when implemented as search trees, they leverage the tree's logarithmic properties for better worst-case performance.
  • This implementation is useful in scenarios where the data set is dynamic and needs to be frequently updated and searched efficiently.

File Organization and Indexing Question 4:

In a file with 1 million records and with an order of the tree being 100, find out the maximum number of nodes to be accessed if B+ tree index is used.

  1. 5
  2. 4
  3. 3
  4. 10

Answer (Detailed Solution Below)

Option 2 : 4

File Organization and Indexing Question 4 Detailed Solution

Correct answer is 4

Concept:

The number of level in the B+ tree will denote the maximum nodes to be accessed:

Data:

number of records = 1 million 

order of the tree = 100

Calculation:

Mini pointer per node =   = 50

Nodes in the last level = 

Nodes in the second last level = 

Nodes in the third last level = 

Nodes in the fourth last level = 

Therefore the maximum number of nodes to be accessed if B + tree index is used is 4.

File Organization and Indexing Question 5:

A clustering index is defined on the fields which are of the type

  1. non-key and ordering
  2. non-key and non-ordering
  3. key and ordering
  4. key and non-ordering

Answer (Detailed Solution Below)

Option 1 : non-key and ordering

File Organization and Indexing Question 5 Detailed Solution

The correct answer is non-key and ordering.

Key Points

  • A clustering index is defined on fields that are of the type non-key and ordering. This means the index is created on the non-primary key attributes that are sorted in some order.
  • In a clustering index, the order of the data records is determined by the order of the indexed values.
  • This type of index improves the efficiency of range queries on the non-key fields.

Additional Information

  • Option 2: non-key and non-ordering - This option is incorrect because clustering indexes require the fields to be ordered.
  • Option 3: key and ordering - This option is incorrect because a primary key or unique key automatically implies ordering, but clustering indexes are specifically for non-key fields.
  • Option 4: key and non-ordering - This option is incorrect because key fields in a database are inherently ordered and cannot be used for clustering indexes which are meant for non-key fields.

Top File Organization and Indexing MCQ Objective Questions

In a B-Tree, each node represents a disk block. Suppose one block holds 8192 bytes. Each key uses 32 bytes. In a B-tree of order M there are M – 1 keys. Since each branch is on another disk block. We assume a branch is of 4 bytes. The total memory requirement for a non-leaf node is

  1. 32 M - 32
  2. 36 M - 32
  3. 36 M - 36
  4. 32 M - 36

Answer (Detailed Solution Below)

Option 2 : 36 M - 32

File Organization and Indexing Question 6 Detailed Solution

Download Solution PDF

Data:

Block size = 8192 bytes = 213 bytes

Key size = 32 byte

Block pointer = 4 byte

Order of the b-tree = M

Number of keys = M – 1 

Formula:

In a B-Tree, the size of non-leaf node = M × (Block pointer) + (M – 1) × (key + Record pointer)

Calculation:

Assuming Record pointer = 0  (since nothing is mentioned about it)

Total size = M(4) + (M - 1)(32) = 36 M - 32

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?

  1. B+ Tree is a height-balanced tree
  2. Non-leaf nodes have pointers to data records
  3. Key values in each node are kept in sorted order
  4. Each leaf node has a pointer to the next leaf node

Answer (Detailed Solution Below)

Option 2 : Non-leaf nodes have pointers to data records

File Organization and Indexing Question 7 Detailed Solution

Download Solution PDF

Properties of B+ trees:

  • B+ tree is height balance tree.
  • Non leaf node has pointer to a node (leaf or non-leaf) and not pointer to data record
  • Key value in each node is in sorted order.
  • Leaf node has pointer to next leaf node.


Structure of non-leaf(internal) node of B+ tree:

Structure of leaf of B+ tree:

Option 2 is not correct.

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 ______.

Answer (Detailed Solution Below) 4

File Organization and Indexing Question 8 Detailed Solution

Download Solution PDF

Data:

Block size = 4 KB = 4096 B

Search key = 12 B

Tree pointer = 8 B

Number of DB records = 106

Explanation:

Each record fits into one disk block hence, Database block factor = 1. Means 1 block access from the database.

Moving on to the B+ tree. Since it's a B+ tree, an internal node only has search key values and tree pointers. Let p be the order of an internal node.

Suppose the order of this tree is p, therefore

P (8) + (p-1) (12) ≤ 4096

Therefore, p = 205.

Level

Nodes

Keys

Pointers

1

1

204

205

2

205

204 × 205

205 × 205

3

205 × 205

204 × 205 × 205

205 × 205 × 205

 

Number of entries in level 3 = 8.5 × 106. Therefore to access one of the 106 DB records, this B+ tree needs not more than 3 levels.

Total accesses = 3 + 1 = 4.

Given a hash table 𝑇 with 25 slots that stores 2000 elements, the load factor 𝛼 for 𝑇 is _________.

Answer (Detailed Solution Below) 80

File Organization and Indexing Question 9 Detailed Solution

Download Solution PDF

Data:

number of slots = 25

number of elements = 2000

Formula:

Calculation:

In __________ index instead of storing all the columns for a record together, each column is stored separately with all other rows in an index.

  1. Clustered
  2. Column store
  3. Non clustered
  4. Row store

Answer (Detailed Solution Below)

Option 2 : Column store

File Organization and Indexing Question 10 Detailed Solution

Download Solution PDF

The correct answer is option 2.

Concept:

The column store an index instead of storing all the columns for a record together, each column is stored separately with all other rows in an index.

Column store:

A column store database is a form of database that uses a column-oriented paradigm to store data.

  • A notion known as a keyspace is used to store databases in columns. In the relational paradigm, a keyspace is analogous to a schema.
  • All of the column families (similar to tables in the relational model), which include rows, which have columns, are contained in the keyspace.

Hence the correct answer is Column store.

Which of the following statements is FALSE?

  1. A primary index is an unordered file.
  2. A secondary index is an ordered file.
  3. A primary index is specified on the ordering key field of an ordered file of records.
  4. A clustering index is an ordered file.

Answer (Detailed Solution Below)

Option 1 : A primary index is an unordered file.

File Organization and Indexing Question 11 Detailed Solution

Download Solution PDF

A primary index is an unordered file, it is a false statement.

Explanation:-

A primary index is specified on the ordering key field of an ordered file of records. A primary index and a clustered index cannot exist on a table at the same time. This is because both of these index types physically order the records.

Key Points

  • The primary index is created automatically when the table is created in the database.
  • The indexes are created with the file and maintained by the system.
  • A secondary index is an index that is not a primary index and may have duplicates.

Additional InformationPrimary Indexes:- A primary index is an ordered file whose entries are of fixed length with two fields: .

Clustering Indexes:- A clustering index is an ordered file whose entries are of fixed length with two fields: .

Secondary Indexes:- A secondary index, on the other hand, is an index that is built on a non-primary key column or columns. The fields used for the secondary index do not have to be candidate keys. They can be any column or set of columns that you want to build an index on for efficient searching, including columns that allow duplicates.

A candidate key is a set of one or more fields/columns that can identify a record uniquely in a relational database. A primary key is a type of candidate key - there can be more than one candidate key, but only one can be the primary key.

NOTE-

So, a secondary index could be built on a candidate key (other than the primary key), but it could also be built on non-candidate keys. The defining feature of a secondary index is that it's not built on the primary key, not that it's built on a candidate key.

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?

  1. 1
  2. 2
  3. 3
  4. 4

Answer (Detailed Solution Below)

Option 2 : 2

File Organization and Indexing Question 12 Detailed Solution

Download Solution PDF
Key Points

 All internal nodes, except the root, will have between n/2 and n children where 'n' is the order of the node. Since the maximum number of keys is 5, the maximum number of children a node can have is 6. The number of children a node can have is 6. The number of keys in a node is n-1.

Hence the minimum number of keys= 

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

  1. 5
  2. 4
  3. 1
  4. 2

Answer (Detailed Solution Below)

Option 1 : 5

File Organization and Indexing Question 13 Detailed Solution

Download Solution PDF

Concept

Considering all nodes are completely full means every node has N − 1 key.

If a new key is inserted, then at every level there will be a new node created, and in the worst-case root node will also be broken into two parts. Since we have 4 levels, then 5 new nodes will be created 

Additional Information

Diagram needs to be updated

First, the overflow happens at the leaf, and second on the parent of that leaf, and so on until the last overflow happens at the root node.

Therefore 4 nodes are created

Key Points 

If the database table has h levels and the level of the root node is 1 then on a new key insertion, the maximum number of nodes newly created is h + 1

Which of the following objects are data-independent and can provide security so as to restrict data access?

A. Sequence

B. Views

C. Indexes

  1. Only B
  2. Only C
  3. Both B and C
  4. A, B and C

Answer (Detailed Solution Below)

Option 4 : A, B and C

File Organization and Indexing Question 14 Detailed Solution

Download Solution PDF

The correct answer is option 4.

Concept:

Sequences, Views, Synonyms, and Indexes are the objects that are data-independent and can provide security so as to restrict data access. Synonyms are often used for security and convenience. Views are often used to provide an additional level of table security by restricting access to a predetermined set of rows and/or columns of a table

Views:

A view is a customized presentation of data from one or more tables (or other views). A view is a "stored query" or a "virtual table" that takes the result of a query and handles it like a table.

Index:

An index is a set of keys made up of one or more columns in a table or view.

Sequences:

A sequence is a database item that allows users to construct one-of-a-kind numeric values. Every time a sequence number is created, the sequence is incremented.

Synonyms:

Any table, view, snapshot, sequence, procedure, function, or package can have a synonym. Because a synonym is nothing more than an alias, it requires no storage other than its description in the data dictionary.

Hence the correct answer is A, B, and C.

In linear hashing, if blocking factor bfr, loading factor I and file buckets N are known, the number of records will be

  1. cr = I + bfr + N
  2. r = I – bfr - N
  3. r = I + bfr - N
  4. r = I * bfr * N

Answer (Detailed Solution Below)

Option 4 : r = I * bfr * N

File Organization and Indexing Question 15 Detailed Solution

Download Solution PDF

Blocking factor = Number of records in a block

Load factor = Number of keys associated with each cell or slot or bucket

In this question,

blocking factor can be understood as = number of buckets in each block

Total number of buckets = Buckets in each block (bfr) × Number of buckets (N) = bfr × N

Total number of records = Total number of buckets × loading factor = l × bfr × N

Hot Links: teen patti gold old version teen patti king teen patti octro 3 patti rummy teen patti master apk