Schema configuration
The schema .cnf configuration files use a TOML like structure to encode
SQLite databases.
The parser will look for two schemas (rcv_schema.cnf and vcv_schema.cnf)
matching the two XML files maintained by ClinVar.
File Structure
The schema parser will look for the following top level tags to define the actual table column, and the table indices, respectively.
[[Tables]]
...
[[Indices]]
...
Table Definitions
Each table is defined using standard SQLite syntax wrapped in square brackets, where each table column and possible constraints are provided between parentheses.
[CREATE TABLE IF NOT EXISTS TableName]
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
column_name TYPE constraints,
...
FOREIGN KEY (column) REFERENCES OtherTable(id) ON DELETE CASCADE
)
Index Definitions
The indices are encoded similarly as the tables.
[CREATE INDEX IF NOT EXISTS idx_name]
ON TableName(column1, column2)
Note
In future the JSON files used to instruct XML parsing will also
encode the schema information, deprecating the current .cnf files.