【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

相关推荐
GUIQU.23 分钟前
【Oracle】数据仓库
数据库·oracle
恰薯条的屑海鸥1 小时前
零基础在实践中学习网络安全-皮卡丘靶场(第十六期-SSRF模块)
数据库·学习·安全·web安全·渗透测试·网络安全学习
咖啡啡不加糖1 小时前
Redis大key产生、排查与优化实践
java·数据库·redis·后端·缓存
曼汐 .1 小时前
数据库管理与高可用-MySQL高可用
数据库·mysql
2301_793102491 小时前
Linux——MySql数据库
linux·数据库
喵叔哟1 小时前
第4章:Cypher查询语言基础
数据库
刘 大 望1 小时前
数据库-联合查询(内连接外连接),子查询,合并查询
java·数据库·sql·mysql
从零开始学习人工智能2 小时前
Doris 数据库深度解析:架构、原理与实战应用
数据库·架构
LiRuiJie2 小时前
深入剖析MySQL锁机制,多事务并发场景锁竞争
数据库·mysql
2501_915374353 小时前
Faiss向量数据库全面解析:从原理到实战
数据库·faiss