Skip to main content

Database Section

The database section declares the file as CSDB and lists database-level metadata.

--- csdb

Shape

format: CSDB
version: 1
name: payroll
machine_indexing:
enabled: true
machine_key_width: 80
machine_value_width: 40
section_title_length: 80
footer_entry_count: 1
tables:
- workers
- sessions
comments:
database: Payroll and work-session records.

Minimal metadata:

format: CSDB
version: 1
name: payroll
tables:
- workers
- sessions

Fields

format must be CSDB.

version must contain the appropriate CSDB format version. For CSDB v1, version must be 1.

name is the database name. It must use letters, numbers, and these symbols in any order: _, -, ., $.

machine_indexing declares whether bottom-of-file machine sections are present. machine_key_width, machine_value_width, section_title_length, and footer_entry_count define the fixed machine layout.

The footer byte length is computed from section_title_length plus footer_entry_count fixed-width key/value lines.

Machine section title lines must be padded with spaces to exactly section_title_length bytes, including the --- prefix and section name.

tables lists every table in the database. It must not contain duplicates. Each listed table must have matching schema and data sections, and every table section in the file must have a matching entry in tables.

comments contains structured database comments. See Comments.