Top MCQs on B and B+ Trees with Answers

Last Updated :
Discuss
Comments

Question 1

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

  • 2

  • 3

  • 4

Question 2

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 2004 | MCQ | 1-Mark)

  • 20

  • 23

  • 18

  • 32

Question 3

B+ trees are preferred to binary trees in databases because (GATE CS 2000)

  • Disk capacities are greater than memory capacities
  • Disk access is much slower than memory access
  • Disk data transfer rates are much less than memory data transfer rates
  • Disks are more reliable than memory

Question 4

A B-tree of order 4 is built from scratch by 10 successive insertions. What is the maximum number of node splitting operations that may take place?

(GATE 2008 | MCQ | 2-Mark)

  • 3

  • 4

  • 5

  • 6

Question 5

The order of a leaf node in a tree B+ 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?

  • 63

  • 64

  • 67

  • 68

Question 6

Consider the following 2-3-4 tree (i.e., B-tree with a minimum degree of two) in which each data item is a letter. The usual alphabetical ordering of letters is used in constructing the tree.

GATECS2003Q65

What is the result of inserting G in the above tree ?

(GATE 2003 | MCQ | 2-Mark)

A) GATECS2003Q65A

B) GATECS2003Q65B

C) GATECS2003Q65C

D) None of the above
  • A

  • B

  • C

  • D

Question 7

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 block are 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?

  • 16

  • 42

  • 43

  • 44

Question 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 ________

Q12

(GATE 2015 | MCQ | 2-Mark)

  • 4

  • 5

  • 6

  • 7

Question 9

Consider 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

  • 49

  • 50

  • 51

  • 52

Question 10

Consider a B-Tree of order 5 (Maximum number of children a node can have is 5). What is the maximum number of keys that can be stored in a single node?

(GATE 2005 | MCQ | 1-Mark)

  • 5

  • 4

  • 3

  • 2

There are 16 questions to complete.

Take a part in the ongoing discussion