Introduction
Last updated 19/03/2024
Five gives you several ways to create your tables. You can use the Table form, Five's Table Wizard, or Five's Database Modeler.
Tables are a data source that contain your data. In tables, data is logically organized in columns and rows. Each row represents a record that is uniquely identified by a primary key, and each column represents a field in the record.
Columns define the data in a table, and each column holds a single type of data value to further describe the information it contains along with the constraints for the type of data that may be inserted in the column.
Each field in a row is implicitly correlated with each of the other fields in that same row. For example, a table containing customer information data might contain a row for each customer and columns representing customer information such as Customer Number, Name, Phone, Email.
In Five, you can assign properties to a table, and each field in the table to control the data that is allowed. For example, you can create constraints on a field to disallow null values, or provide a default value, or assign a key constraint on a field that enforces uniqueness or defines a relationship between tables.
Who Can Add, Edit, and Delete Tables?
Please refer to the chapter Five's Users and Roles.
How Five Will Use Your Tables
The forms connected to your tables, are only capable of instructing the browser on the method of presenting the information. Five handles the transactions needed to store the information in your database. The input values in your application will be accepted by Five and stored in an organized structure in your tables.The fields in your tables can become your form fields on your forms and column headings for your lists. The input values must match the definitions set for the values to be stored in your tables.
Navigate to the Tables View
1. Select Data in the menu.2. Select Tables in the sub-menu.
The Table Form
The Table form has five tabs across the top of the form, each of these tabs will navigate you to their respective page to build out your table.Page | Description |
---|---|
General | Select your database and give your table an ID and a name. |
Events | Attach functions to your table. |
Fields | Add fields and their definitions. |
Indices | Add the keys for your table. |
References | A report of where your table is being referenced. |
General Page
The General page is to name your table, if you are working in the cloud, you will need to select the database you want to add the table to if you are working with multiple databases. The table below will give you an overview of the fields on the General page.
Field | Description |
---|---|
Database | This field is only available in the cloud, as the desktop version does not support multiple databases. Use the field to select the database for the table to be created in. If you only have one database for your application, Five will automatically populate the field. |
Data Source ID | Add a data source ID for your table. This will uniquely identify your table across multiple databases and across all data sources in Five. Please see the note below for further information. |
Table Name | Add fields and their definitions. |
Notes | Add the keys for your table. |
When you are using multiple databases we provide the fields Data Source ID and Table Name. The data source ID must be unique for all data sources in your application.
Five's Data Sources- Tables
- Connections
- Queries
Because of this we also provide the Table Name field, this enables you to have the same table name across multiple databases as long as they have a unique data source ID.
ExampleField | Database One | Database Two |
---|---|---|
Data Source ID | CustomerA | CustomerB |
Table Name | Customer | Customer |
The next logical step when creating a table via the form is to add fields to the table followed by any keys required for the table inclusive of the primary key.