A table's rows are stored in the order of its primary key. An index orders the same rows by other columns, so that a program can find them without reading the whole table. Each index is a B+-tree of its own, defined by a row of Type 3 in the catalog.
The definition
| Catalog column | Holds |
|---|---|
| Name | The index's name. |
| Id | The index's object identifier; its pages carry it in their header. |
| ColtypOrPgnoFDP | The root page of the index's tree. The first index of a table, the primary index, shares the table's own tree. |
| Flags | Index flags: unique, primary, null handling, unicode, tuples and others (see the catalog). |
| PagesOrLocale | The locale (LCID) the key collation uses. |
| KeyFldIDs | The key columns: four bytes each, a flags word (0 in every file checked) and the column id. |
Entries
An index tree's pages have the index flag (0x40). An entry's key is the normalised values of the key columns followed by the table row's primary key; its data is the primary key of the row, with which the row is found in the table's tree. Key bytes are ordered by byte comparison, so numbers are stored big-endian with the sign bit flipped and text as sort weights of the index's locale. The explorer lists an index's entries as hexadecimal keys; it does not turn the keys back into values.
Links
Reference
- Extensible Storage Engine (ESE) Database File (EDB) format – index definitions and flags