mbbsemu:development:sqlite_database_specifications
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
mbbsemu:development:sqlite_database_specifications [2020/11/20 04:12] – [SQLite Database Specifications] paladine | mbbsemu:development:sqlite_database_specifications [2023/10/06 23:41] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
< | < | ||
- | #SQLite Database | + | #SQLite Database |
MajorBBS & WorldGroup modules make heavy use of Btrieve databases. | MajorBBS & WorldGroup modules make heavy use of Btrieve databases. | ||
Line 15: | Line 15: | ||
* data_t | * data_t | ||
- | # The `metadata_t` table | + | # The 'metadata_t' |
This table contains metadata information about the file, analogous to the file header in the Btrieve `.DAT` file. The schema is as follows | This table contains metadata information about the file, analogous to the file header in the Btrieve `.DAT` file. The schema is as follows | ||
Line 21: | Line 21: | ||
`CREATE TABLE metadata_t(record_length INTEGER NOT NULL, physical_record_length INTEGER NOT NULL, page_length INTEGER NOT NULL, variable_length_records INTEGER NOT NULL, version INTEGER NOT NULL, acs_name STRING, acs BLOB)` | `CREATE TABLE metadata_t(record_length INTEGER NOT NULL, physical_record_length INTEGER NOT NULL, page_length INTEGER NOT NULL, variable_length_records INTEGER NOT NULL, version INTEGER NOT NULL, acs_name STRING, acs BLOB)` | ||
- | The `record_length` field is the length of all the records stored in the database, in the `data` column in the `data_t` table. For variable length records, this is the length of fixed portion, so every record will be at least this large and of course could be much larger. | + | The `record_length` field is the length of all the records stored in the database in the `data` column in the `data_t` table. For variable length records, this is the length of the fixed portion, so every record will be at least this large and of course could be much larger. |
- | The `physical_record_length` is the length of each physical record in the Btrieve file, and stored for informational purposes and not used by MBBSEmu. | + | The `physical_record_length` is the length of each fixed physical record in the Btrieve file, and stored for informational purposes and not used by MBBSEmu. |
The `page_length` is the length of each page in the Btrieve file, and likewise stored only for information purposes and not used by MBBSEmu. | The `page_length` is the length of each page in the Btrieve file, and likewise stored only for information purposes and not used by MBBSEmu. | ||
Line 29: | Line 29: | ||
`variable_length_records` indicates whether the records in this database are of variable length. Each record has a minimum length of `record_length.` | `variable_length_records` indicates whether the records in this database are of variable length. Each record has a minimum length of `record_length.` | ||
- | `version` specifies the schema version of this database. It is used for schema | + | `version` specifies the schema version of this database. It is used for schema |
`acs_name` and `acs` are related fields and contain information about the Alternate Collating Sequence. ACS is used to alter string keys in the database. The `acs` table is a byte array of size 256 which performs a simple string mapping for keys. ACS tables are often used for implementing case-insensitive string keys - for example the ACS table would map lower case characters to upper case and the engine treats the key as all upper case. | `acs_name` and `acs` are related fields and contain information about the Alternate Collating Sequence. ACS is used to alter string keys in the database. The `acs` table is a byte array of size 256 which performs a simple string mapping for keys. ACS tables are often used for implementing case-insensitive string keys - for example the ACS table would map lower case characters to upper case and the engine treats the key as all upper case. | ||
+ | |||
`acs_name` and `acs` are both `null` if ACS tables are not used for the database. Otherwise `acs_name` is used for informational purposes only, and `acs` is a blob of length 256. | `acs_name` and `acs` are both `null` if ACS tables are not used for the database. Otherwise `acs_name` is used for informational purposes only, and `acs` is a blob of length 256. | ||
Line 64: | Line 65: | ||
There could be multiple rows in this table depending on how many keys are in the original Btrieve database. | There could be multiple rows in this table depending on how many keys are in the original Btrieve database. | ||
- | # The `data_t` table | + | # The 'data_t' |
- | This table contains all the data/ | + | This table contains all the data/ |
The schema is dynamic based on the key, but always contains at least the following: | The schema is dynamic based on the key, but always contains at least the following: | ||
Line 126: | Line 127: | ||
This program dumps out your user data, so you can pipe it to a file, and then edits your character and saves it. You'll have to execute the program when MBBSEmu is **offline** | This program dumps out your user data, so you can pipe it to a file, and then edits your character and saves it. You'll have to execute the program when MBBSEmu is **offline** | ||
- | </markdow | + | </markdown> |
- | n> | + |
mbbsemu/development/sqlite_database_specifications.1605845557.txt · Last modified: 2023/10/06 23:40 (external edit)