Full-Text Indexes, B-trees, Hashing, and Secondary Storage




CS157b

Chris Pollett

Feb 17, 2020

Outline

Introduction

Document Retrieval and Inverted Indexes

B-trees

The Structure of B-trees

B-Tree Leaf Node
An B-tree Leaf Node.
B-Tree Internal Node
An internal B-tree Node.

Domain of Application of B-trees

Lookup in B-Trees

For simplicity we will assume no duplicate keys. To search for a record with key K:

Example

B-Tree example

Quiz

Which of the following statements is true?

  1. We might use a tombstone record when we insert a new record into a data file.
  2. A clustering index is used to index a field in a sequential file with duplicates.
  3. Oracle allows you to use the keyword FILLFACTOR to create tables that avoid overflow blocks.

Range Queries

Insertion into B-Trees

B-Tree Insertion Example 1 B-Tree Insertion Example 2

Deletion from B-Trees

B-Tree for In-Class Exercise B-Tree Deletion Example 1 B-Tree Deletion Example 2 B-Tree Deletion Example 3

Efficiency of B-Trees

Secondary-Storage Hash Tables

Insertion, Deletion and Efficiency