An experimental RDBMS and DB engine using CSV text files to store tables.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
txtdb Create the first part of the 'WHERE' clause parser Feb 19, 2019


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.

Table specification

Example of a table stored by txtdb:

"d928ffe1-cef4-41fd-8123-f2ef7b009a69","John Smith",true,91
"6f2b874a-7849-4115-a6c8-9bae8918f886","Jane Doe",false,62

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.

Table names

The table name is simply the file name without the extension.

Data types

  • string (e.g. "something")
  • int (e.g. 12345)
  • boolean (e.g. true)

(Note: when strings are stored, any commas will be escaped in the CSV table file).

Column attributes

Columns can be given different "attributes", which can change their behaviour. Column attributes are appended to the end of the datatype (e.g. ,string?,).

The currently available attributes are:

  • $: Primary key
  • ?: Nullable column

At the moment there is a maximum of one attribute per column.

Null values

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.