摘要
索引是数据库的对象之一,在关系数据库中,索引建立在一张基本表的一列或多列上,索引的逻辑结构是一张二维表,索引表由两类信息组成,一是索引关键字,即在基本表上经常查询的一列或多列属性,二是地址信息,即索引关键字在基本表中所在行的物理地址;索引的物理结构以B树形式组织。按照对基本表的组织方式,索引分为聚集索引和非聚集索引;按照索引关键字取值的唯一性,分为唯一索引和不唯一索引。文章着重探讨聚集索引及其B树结构,用实例分析二维表的B树索引的创建,在B树结构上的查询和更新操作,形象说明索引是如何提高查询效率的,以及进行更新操作时对索引的影响。
Index is one of the objects of the database. In relational database, the index is based on one or more columns in a table. The logic structure of the index is a two-dimensional table, which is composed of two kinds of information,one is the index keywords, that is query attributes which used frequently; the second is the address information, that is physical address which indicates the storage location of the indexing key words. The Physical structure of the index is organized by B tree. According to the organized form of basic table, index can be divided into clustered index and non-clustered index. According to the uniqueness of index key values, index can be divided into the unique index and non-unique index. This paper discusses the clustered index and its B tree structure. It analyzes the creation of the B-tree by example, the query and update operations on B tree. It shows how to improve the query efficiency through index, and some influence about index when updating .
作者
赵亚娟
柴西林
ZHAO Ya-juan;CAI Xi-lin(Zhixing College of Northwest Normal University,Lanzhou 730070,China)
出处
《电脑与信息技术》
2016年第6期34-35,51,共3页
Computer and Information Technology
基金
2015年度甘肃省教育科学"十二五"规划课题(项目编号:GS[2015]GHB0206)
关键词
聚集索引
B树结构
查询操作
clustered index
B-Tree structure
query operation