DA10 - B.B. Karki, LSU 1 CSC 3102 B-Trees B.B. Karki, LSU 2...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: B.B. Karki, LSU 1 CSC 3102 B-Trees B.B. Karki, LSU 2 CSC 3102 Multiway Trees For any binary tree (e.g., binary search tree, AVL tree) or even for 2-3 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 m-way 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 2-3 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 m-way 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-way search tree is a B tree. B.B. Karki, LSU 3 CSC 3102 B-Trees A B-tree 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 2-3 tree by permitting more than a single key in the same node of a search tree. In a B-tree, 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 B-tree usually correspond to the disk pages (blocks). B.B. Karki, LSU 4 CSC 3102 Parental Node of a B-Tree Each B-tree node contains n-1 ordered keys K 1 < K 2 .< K n-1 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

Page1 / 14

DA10 - B.B. Karki, LSU 1 CSC 3102 B-Trees B.B. Karki, LSU 2...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online