4.2 Database structure overview
Database is the structured file ( or files ). Everything in the database and her
shared memory segment uses a threaded AVL tree as the index method:
- Meta-scheme - the key is the name of file, field, index etc.
- Data block - the key is a part of the primary index ( or the whole index, if the file consists of only one block )
- Interval block - the key is a part of primary index
- Locking shared memory See Locking, the keys are file-ids at level 0 (lock entire file) and offset at levels 1 and 2 ( lock block, lock record ).
- Internal memory management - the key is file-id at level 0 and block offset at level 1
This section contains the description of database “main file”, structure of which is :
- Meta scheme, where lives the description of database structure. Default size 16 MB.
- Free list handles “holes” in database file - the list of freed blocks. Database
file isn't extended until the free list is empty. Default size 1 MB.
- Couple of data and some interval tree blocks, both types of block contain
parts of primary index.