Which statement correctly describes the structure of a B+ tree used in databases?
Think about where the actual data is stored versus where the keys for navigation are kept.
In B+ trees, all actual data records are stored in the leaf nodes. Internal nodes only contain keys to guide the search process. This design allows efficient range queries and sequential access.
In a B+ tree of order m, what is the maximum number of children an internal node can have?
Recall the definition of order in B+ trees and how it relates to children count.
The order m of a B+ tree defines the maximum number of children an internal node can have, which is exactly m. The number of keys in such a node is one less, i.e., m - 1.
Consider inserting keys into a B+ tree. Which of the following best describes how node splitting affects the height of the tree?
Think about when the root node splits compared to other nodes.
Node splitting usually happens at leaf or internal nodes and does not increase tree height unless the root node itself splits. When the root splits, a new root is created, increasing the height by one.
Which of the following is a key difference between B+ trees and B trees in how they store data records?
Consider where data is stored in each tree type.
B trees store data records in both internal and leaf nodes, which can make range queries less efficient. B+ trees store all data records in leaf nodes only, allowing easier sequential access and range queries.
Why are B+ trees generally preferred over B trees for range queries in database systems?
Think about how leaf nodes are connected in B+ trees.
B+ trees link all leaf nodes in a linked list, allowing easy and fast sequential access to data in sorted order. This makes range queries efficient because the system can scan leaf nodes directly without traversing internal nodes repeatedly.