【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

相关推荐
weixin_457885822 小时前
智能多媒体处理流水线——基于虎跃办公API的自动化解决方案
运维·数据库·人工智能·ai·自动化
狮歌~资深攻城狮4 小时前
ClickHouse进阶技巧:解锁数据处理的高级潜能
大数据·数据库
极限实验室5 小时前
Easysearch VS Opensearch 数据写入与存储性能对比
数据库
橘猫云计算机设计6 小时前
ASP.NET图书馆借阅系统(源码+lw+部署文档+讲解),源码可白嫖!
java·数据库·后端·爬虫·小程序·毕业设计·asp.net
王伯爵6 小时前
接入网和核心网之间的承载网详细介绍
服务器·网络·数据库
不剪发的Tony老师8 小时前
rqlite:一个基于SQLite构建的分布式数据库
数据库·分布式·sqlite
爱的叹息8 小时前
Redis 与 MongoDB 对比分析
数据库·redis·mongodb
·薯条大王8 小时前
MySQL视图
大数据·数据库·mysql
Truelon8 小时前
【QT】QT编译链接 msql 数据库
数据库·qt
ahauedu9 小时前
CentOS 环境下 MySQL 数据库全部备份的操作指南
数据库·mysql·centos