This preview shows pages 1–5. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: B.B. Karki, LSU 1 CSC 3102 BTrees B.B. Karki, LSU 2 CSC 3102 Multiway Trees For any binary tree (e.g., binary search tree, AVL tree) or even for 23 tree, the outdegree is restricted to two or three. As the trees grow in size, their height can become significant. A binary tree with 1,000 entries has height of at least 9 while a tree with 100,000 entries has a height of at least 16 assuming that h = 0 for single entry. In case of unbalanced trees, the height can be significantly larger. For multiway trees, the outdegree is not restricted to two or three while retaining the general properties of binary search trees. A mway tree is a search tree in which each node can have from zero to m subtrees, where m is defined as the order of the tree. A m way tree is not a balanced tree. A balanced m B.B. Karki, LSU 2 CSC 3102 Multiway Trees For any binary tree (e.g., binary search tree, AVL tree) or even for 23 tree, the outdegree is restricted to two or three. As the trees grow in size, their height can become significant. A binary tree with 1,000 entries has height of at least 9 while a tree with 100,000 entries has a height of at least 16 assuming that h = 0 for single entry. In case of unbalanced trees, the height can be significantly larger. For multiway trees, the outdegree is not restricted to two or three while retaining the general properties of binary search trees. A mway tree is a search tree in which each node can have from zero to m subtrees, where m is defined as the order of the tree. A m way tree is not a balanced tree. A balanced mway search tree is a B tree. B.B. Karki, LSU 3 CSC 3102 BTrees A Btree provides an efficient index organization for data sets of structured records Introduced by R. Bayer and E. McGreight in 1972 Extends the idea of the 23 tree by permitting more than a single key in the same node of a search tree. In a Btree, all data records (or record keys) are stored at the leaves, in increasing order of the keys The parental nodes are used for indexing Usually called B + tree When used for storing a large data file on a disk, the nodes of a Btree usually correspond to the disk pages (blocks). B.B. Karki, LSU 4 CSC 3102 Parental Node of a BTree Each Btree node contains n1 ordered keys K 1 < K 2 .< K n1 The keys are interposed with n pointers or references to the nodes children so that all the keys in subtree T are smaller than K 1 , all the keys in subtree T 1 are greater than or equal to K 1 and smaller than K 2 with K 1 being equal to the smallest key in T 1 , and so on....
View
Full
Document
 Fall '08
 Kraft,D
 Binary Search

Click to edit the document details