Secondary Indexes, B-trees




CS157b

Chris Pollett

Feb 12, 2018

Outline

Introduction

Indexes with Duplicate Search Keys

Indexes and Data Modification

Action on fileDense IndexSparse Index
Create Blocksnoneinsert if sequential
Delete Blocksnonedelete if sequential
Insertinsert also into indexupdate(?)
Deletedelete also from indexupdate(?)
Slideupdateupdate(?)

Avoiding Overflow Blocks, Preventing Row Migration

Quiz

Which of the following statements is true?

  1. DB Logical Addresses usually contain information such as the track number of the physical location of database record on disk.
  2. Reading a DB block into memory and converting all the DB addresses in it to memory addresses is an example of pointer swizzling.
  3. A sparse index on a table always has one index entry for every record in the table.

Secondary Indexes

Design of Secondary Indexes

Secondary Index Example

Applications of Secondary Indexes

Indirection in Secondary Indexes

Document Retrieval and Inverted Indexes

B-trees

The Structure of B-trees