【Database System Concept 7th】Chapter 14 Indexing 读书笔记

Chapter 14 Indexing

  • [14.1 Basic Concepts](#14.1 Basic Concepts)
  • [14.2 Ordered Indices](#14.2 Ordered Indices)
    • [14.2.1 Dense and Sparse Indices](#14.2.1 Dense and Sparse Indices)
    • [14.2.2 Multilevel Indices](#14.2.2 Multilevel Indices)
    • [14.2.3 Index Update](#14.2.3 Index Update)
    • [14.2.4 Secondary Indices](#14.2.4 Secondary Indices)
    • [14.2.5 Indices on Multiple Keys](#14.2.5 Indices on Multiple Keys)
  • [14.3 B+-Tree Index Files](#14.3 B+-Tree Index Files)
    • [14.3.1 Structure of a B+-Tree](#14.3.1 Structure of a B+-Tree)
    • [14.3.2 Queries on B+-Trees](#14.3.2 Queries on B+-Trees)
    • [14.3.3 Updates on B+-Trees](#14.3.3 Updates on B+-Trees)
    • [14.3.4 Complexity of B+-Tree Updates](#14.3.4 Complexity of B+-Tree Updates)
    • [14.3.5 Nonunique Search Keys](#14.3.5 Nonunique Search Keys)
  • [14.4 B+-Tree Extensions](#14.4 B+-Tree Extensions)
    • [14.4.1 B+-Tree File Organization](#14.4.1 B+-Tree File Organization)
    • [14.4.2 Secondary Indices and Record Relocation](#14.4.2 Secondary Indices and Record Relocation)
    • [14.4.3 Indexing Strings](#14.4.3 Indexing Strings)
    • [14.4.4 Bulk Loading of B+-Tree Indices](#14.4.4 Bulk Loading of B+-Tree Indices)
    • [14.4.5 B-Tree Index Files](#14.4.5 B-Tree Index Files)
    • [14.4.6 Indexing on Flash Storage](#14.4.6 Indexing on Flash Storage)
    • [14.4.7 Indexing in Main Memory](#14.4.7 Indexing in Main Memory)
  • [14.5 Hash Indices](#14.5 Hash Indices)

14.1 Basic Concepts

众所周知,索引就是用于加快检索滴,就像书的目录一样,维护了主题到页数的映射 ,我们通过某个关键字查找主题 ,然后再跳转到某一页 进行内容的查看。本章主要介绍一些常见的索引技术,主要是Hash索引B+tree索引 ,在本节让我们先了解一些基本概念。

有两种基本的索引类型:

  • 顺序索引:基于key进行顺序排序
  • 散列索引:将key散列到不同的hash桶中

索引技术非常多,适用于不同的场景,主要由以下几点衡量是否适用:

  • 访问类型:能支持的访问类型(包括查询具有特定属性值的记录、查询特定属性值在某个特定区间范围的记录)
  • 访问时间:找到一个特定记录或记录集所花费的时间
  • 插入时间:插入一个新记录所需要的时间
  • 删除时间:删除一个记录所需要的时间
  • 空间复杂度:维护索引结构所需要的空间开销

通常我们会在一个文件中建立多个索引,比如我们可能希望按照作者、主题或者书名来查找图书馆里的一本书。其中,用于查找的关键字称为搜索码,搜索码可以由一个或多个属性组成。

14.2 Ordered Indices

14.2.1 Dense and Sparse Indices

14.2.2 Multilevel Indices

14.2.3 Index Update

14.2.4 Secondary Indices

14.2.5 Indices on Multiple Keys

14.3 B±Tree Index Files

14.3.1 Structure of a B±Tree

14.3.2 Queries on B±Trees

14.3.3 Updates on B±Trees

14.3.4 Complexity of B±Tree Updates

14.4 B±Tree Extensions

14.4.1 B±Tree File Organization

14.4.2 Secondary Indices and Record Relocation

14.4.3 Indexing Strings

14.4.4 Bulk Loading of B±Tree Indices

14.4.5 B-Tree Index Files

14.4.6 Indexing on Flash Storage

14.4.7 Indexing in Main Memory

14.5 Hash Indices

相关推荐
-SGlow-8 小时前
MySQL相关概念和易错知识点(2)(表结构的操作、数据类型、约束)
linux·运维·服务器·数据库·mysql
明月5669 小时前
Oracle 误删数据恢复
数据库·oracle
♡喜欢做梦10 小时前
【MySQL】深入浅出事务:保证数据一致性的核心武器
数据库·mysql
遇见你的雩风10 小时前
MySQL的认识与基本操作
数据库·mysql
dblens 数据库管理和开发工具10 小时前
MySQL新增字段DDL:锁表全解析、避坑指南与实战案例
数据库·mysql·dblens·dblens mysql·数据库连接管理
weixin_4196583110 小时前
MySQL的基础操作
数据库·mysql
不辉放弃11 小时前
ZooKeeper 是什么?
数据库·大数据开发
Goona_12 小时前
拒绝SQL恐惧:用Python+pyqt打造任意Excel数据库查询系统
数据库·python·sql·excel·pyqt
程序员编程指南12 小时前
Qt 数据库连接池实现与管理
c语言·数据库·c++·qt·oracle
幼儿园老大*14 小时前
数据中心-时序数据库InfluxDB
数据库·时序数据库