This document explains how databases are built and structured on Insites.
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
The above configuration adds three database fields:
Note that at the YAML code level, Database Fields are declared using the keyword
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 Insites Database Manager documentation to learn more.
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 | DateTime |
Data Source | Select (with infinite scroll and dynamic search) |
Data Source (Multiple) | Select (Multiple) (with infinite scroll and dynamic search) |
GeoJSON | Code Editor |
Float | Decimal |
Media |
|
Integer | Number |
String |
|
Time | Time |
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.
The codes and configurations discussed in the following sections are automatically generated when you use the Insites Database Manager user interface to build your Database Tables.
Tables are placed in the
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 | The Hunt for Red October | Tom Clancy |
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
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 |
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.