关于树索引结构.ppt

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
关于树索引结构.ppt

The B-Tree Index Prof. Sin-Min Lee Department of Computer Science San Jose State University Outline Introduction The B-tree shape Dynamic changes in the B-tree Properties of the B-tree Create index statement syntax More about the B-tree Summary Introduction A B-tree is a keyed index structure, comparable to a number of memory resident keyed lookup structures such as balanced binary tree, the AVL tree, and the 2-3 tree. The difference is that a B-tree is meant to reside on disk, being made partially memory-resident only when entries int the structure are accessed. The B-tree structure is the most common used index type in databases today. It is provided by ORACLE, DB2, and INGRES. The B-Tree Shape A B-tree is built upside down with the root at the top and the leaves at the bottom. All nodes above the leaf level, including the root, are called directory nodes or index nodes. Directory nodes below the root are called internal nodes. The root node is known as level 1 of the B-tree and successively lower levels are given successively larger level numbers with the leaf nodes at the lowest level. The total number of levels is called the depth of the B-tree. The Problem of Unbalanced Trees a. A Troublesome Search Tree b. A More Troublesome Search Tree Disadvantage of unbalanced tree Searching an unbalanced tree may require traversing an arbitrary and unpredictable number of nodes and pointers. Unbalanced Tree (cont.) Problems: 1. The levels of the tree are only sparsely filled 2. Resulting in long 3. Deep paths and defeating the purpose of binary trees in the first place. The B-Tree Shape (c.) level1: root node, level2: directory nodes, level3: leaf nodes B-Trees For a binary search tree, the search time is O(h), where h is the height of the tree. The height cannot be less than roughly log2n for a tree with n nodes. If the tree is too large for internal memory, each access of a node is an I/O. For a tree with 10,000 nodes: log210000 = 100

文档评论(0)

克拉钻 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档