Processing math: 100%

11.Indexing§

Files and Indexing

Keys and Indexing

Linear Indexing (1)

1 / 14 Settings
<<<>>>

Here is an array of variable length database records, perhaps stored on disk. The numbers shown are the keys, and these are not in any particular order.

Created with Raphaël 2.1.2
73
52
98
37
42
Proficient Saving... Error Saving
Server Error
Resubmit

Linear Indexing (2)

1 / 13 Settings
<<<>>>

Here is the Second Level Index Array which stores the first key value in the disk block of the index file.

Created with Raphaël 2.1.2
  1. 1
  2. 2003
  3. 5894
  4. 10528
Proficient Saving... Error Saving
Server Error
Resubmit

Tree Indexing (1)

Tree Indexing (2)

0 / 0 Settings
<<<>>>

Insert 5 into the tree.

Created with Raphaël 2.1.2
Created with Raphaël 2.1.2
10
5
10
Proficient Saving... Error Saving
Server Error
Resubmit

Tree Indexing (3)

Tree Indexing (4)

Settings

Proficient Saving... Error Saving
Server Error
Resubmit

2-3 Tree

2-3 Tree Example

Created with Raphaël 2.1.2
  1. 18
  2. 32
  1. 12
  1. 23
  2. 30
  1. 48
  1. 10
  1. 15
  1. 20
  2. 21
  1. 24
  1. 31
  1. 45
  2. 47
  1. 50
  2. 52

2-3 Tree Insertion (1)

Settings

Proficient Saving... Error Saving
Server Error
Resubmit

2-3 Tree Insertion (2)

Settings

Proficient Saving... Error Saving
Server Error
Resubmit

2-3 Tree Insertion (3)

Settings

Proficient Saving... Error Saving
Server Error
Resubmit

B-Trees (1)

B-Trees (2)

  1. B-Trees are always balanced.
  2. B-Trees keep similar-valued records together on a disk page, which takes advantage of locality of reference.
  3. B-Trees guarantee that every node in the tree will be full at least to a certain minimum percentage. This improves space efficiency while reducing the typical number of disk fetches necessary during a search or update operation.
A B-tree of order four

B+-Trees

B+-Tree Example

Example of a :math:`\mathrm{B}^+` tree.

B+-Tree Insertion

Examples of :math:`\mathrm{B}^+` tree insertion.

B+-Tree Deletion (1)

Example of a :math:`\mathrm{B}^+` tree.
Simple deletion from a :math:`\mathrm{B}^+` tree.

B+-Tree Deletion (2)

Example of a :math:`\mathrm{B}^+` tree.
Deletion from a :math:`\mathrm{B}^+` tree via borrowing from a sibling.

B+-Tree Deletion (3)

Example of a :math:`\mathrm{B}^+` tree.
Deletion from a :math:`\mathrm{B}^+` tree via collapsing siblings

.

.

B-Tree Space Analysis (1)

B-Tree Space Analysis (2)

B-Trees: The Big Idea