An attempt to create a simple database engine and RDBMS which stores the table data in text files, using the CSV format.
Please do not use this for anything important, it was created as a learning project.
Example of a table stored by txtdb:
string$,string,boolean?,int? "id","name","pass","score" "d928ffe1-cef4-41fd-8123-f2ef7b009a69","John Smith",true,91 "6f2b874a-7849-4115-a6c8-9bae8918f886","Jane Doe",false,62 "49064480-4056-4a08-aff9-4af9580f1879","Bob",, "48da7211-3648-4a8e-85d1-8d68c6161653","Alice",true,95
The table files are stored in the CSV format, for easy parsing by other tools.
The first line of a file specifies the data type of each column and sets the attributes for each of the columns.
The second line just holds a list of each of the names of the columns.
The table name is simply the file name without the extension.
(Note: when strings are stored, any commas will be escaped in the CSV table file).
Columns can be given different "attributes", which can change their behaviour.
Column attributes are appended to the end of the datatype (e.g.
The currently available attributes are:
$: Primary key
?: Nullable column
At the moment there is a maximum of one attribute per column.
If a column has the
? (null) attribute, then null values can be stored in
that column. A null value is represented by an empty CSV field.