Developers · Data
Database Fields and Tables
Last updated 1 November 2026
This document explains how databases are built and structured on Insites.
Database Fields
A 'Database Field' or 'Column' is an element of a database table that holds a specific type of data, such as dates, integers, strings, and files. A field is defined by its
properties:
- name: name
type: string
- name: enabled
type: boolean
- name: age
type: integerThe above configuration adds three database fields:
- name of type string
- enabled of type boolean
- age of type integer
Note that at the YAML code level, Database Fields are declared using the keyword
Important
The codes and configuration files displayed in this article demonstrates how Insites work at the technical level. However, the Insites Instance Administration provides a user interface for a smoother and more intuitive user experience. Visit our Databases documentation to learn more.
Database Field Types
The table below lists available data types for Database Field configurations that are used to create fields on the database. In addition, the database fields' corresponding user interface elements are also outlined:
| Field Type | UI Element |
|---|---|
| Array |
|
| Boolean | Toggle |
| Date | Date |
| DateTime | Date and Time |
| Data Source |
|
| Data Source (Multiple) |
|
| Decimal |
|
| Geo JSON | Code |
| Float |
|
| Integer |
|
| Media |
|
| String |
|
| Time | Time |
Database Tables
A Table is an object that describes and contains all Database Item objects that belong to it.
Tables define object types that will exist in your application and describe the properties each object can have. For example, if your application manages data labelled as 'books', you can create a Table with the name 'book' that will have the properties 'title' and 'author' (both having the type 'string'). The main function of a Table is to allow you to define the structure of your data.
Tip
When you build a table under Databases in the Instance Admin, it writes the same kind of YAML file for you, at
Defining Tables
Put tables for your site in
The example below shows the BookList Table
name: book_list
properties:
- name: author
type: string
- name: title
type: stringA basic visual representation of such a table is displayed below. The table contains records (or Database Items) with mock (sample) data.
| id | Author | Title |
|---|---|---|
| 0001 | Tom Clancy | The Hunt for Red October |
| 0002 | Jane Austen | Pride and Prejudice |
| 0003 | C.S. Lewis | The Lion, The Witch, and the Wardrobe |
| 0004 | George Orwell | 1984 |
| 0005 | Hamilton, A., Madison, J., Rossiter, C., Jay, J., & Kesler, C. R. (2005). | The Federalist Papers |
Note that the column (or property) labeled
Database Configuration Properties
| Property | Description | Required |
|---|---|---|
| name | Name of your Table. Best practice is to keep it lower case. Example: |
Yes |
| properties | Array of properties you want to contain within your records. Equivalent to a column or database field in a database table. | No |