Skip to main content
Version: Current

Data Structures - Tables

Typically, such as in relational databases, a table is a data structure that organises data into rows and columns. However, in Genesis, a table is quite different.

Genesis tables

A Genesis table is an abstraction of a table from a physical database. It is made up of fields, indices and subtables

This is great, because it means that changes to the database don't change the Genesis table. If you want to change the database technology, you can - and you don't need to change the table definition. A good way of thinking of this is that the table is on a different layer than the database.

Tables are defined in the -tables-dictionary.kts files as discussed in our data model documentation. Table records can be represented as a table entity, or as a DbRecord. They support read, write and subscribe operations.

Requirements

For a table to be valid in Genesis, it must include the following:

  • unique table name
  • unique ID
  • At least one field as the primary key