AI answers drawn only from these docs, with links to the pages used.

Database Fields and Tables

Last updated on October 15, 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 and data . Fields are defined in the YAML configuration files whenever a Database Table is created. For example:

The 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
  • Card Select (Multiple)
  • Checkbox
  • File (Multiple)
  • Input (Multiple)
  • Select (Multiple)
  • Table
Boolean Toggle
Date Date
DateTime Date and Time
Data Source
  • Search
  • Select
Data Source (Multiple)
  • Search (Multiple)
  • Select (Multiple)
Decimal
  • Decimal
  • Stepper
Geo JSON Code
Float
  • Decimal
  • Stepper
Integer
  • Number
  • Stepper
Media
  • Media - File
  • Media - Image
String
  • Address
  • Card Select
  • Code
  • Color
  • Email
  • HTML
  • Input
  • Link
  • Markdown
  • Multi-line
  • Phone
  • Radio
  • Select
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 . In GraphQL, that table is named .

Defining Tables

Put tables for your site in . Put tables that belong to a module in or .

The example below shows the BookList Table :

A 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 is automatically created by Insites; no need to create it either on the YAML file or in the Databases screen of the Instance Admin.

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
Have a suggestion for this page?

Didn't quite find what you are looking for or have feedback on how we can make the content better then we would love to hear from you. Please provide us feedback and we will get back to you shortly.