Skip to main content

Create Tables

Last updated 1/09/2025


info
You can find the Create Tables video in the Introductory Videos chapter that will cover this documentation.

You can create tables in Five several ways:

The quickest and recommended way is through our Table Wizard. Two tables will be added into the Shopping application, these tables will be called ShoppingList and Item.

Add ShoppingList Table

1. Select Data in the menu followed by Table Wizard in the sub-menu.


Table Wizard menu item
Figure 1 - Table Wizard menu item

2. Type ShoppingList in the Name field.

tip
The Table Wizard creates your primary key for you! You can read more on this in the Table Wizard chapter.

Add ShoppingList table
Figure 2 - Add ShoppingList table

3. Click the Add Fields button and type Name in the Name field.

4. Click the Add Fields button and type Date in the Name field.

5. Click the Add Fields button and type Store in the Name field.

6. Click the Add Fields button and type PostCode in the Name field.

tip
The Table Wizard automatically creates some definitions for you! You can read more on this in the Table Wizard chapter.

Add fields
Figure 3 - Add fields

7. Click the Save button in the Table Wizard app bar.


Save button
Figure 4 - Save button

8. Click the Save button in the Table Upgrade window.


Save button
Figure 5 - Save button

Add the Item Table

1. Type Item in the Name field.


Add Item table
Figure 6 - Add Item table

2. Click the Add Fields button and type Name in the Name field.

3. Click the Add Fields button and type Quantity in the Name field.

4. Click the Add Fields button and type Price in the Name field.

5. Click the lookup icon in the Data Type field and select Float.


Add fields
Figure 7 - Add fields

6. Click the Next button.


Next button
Figure 8 - Next button

7. Click the Add Relationships button.

8. Click the lookup icon in the Table field and select ShoppingList.

9. Click the Required checkbox.

tip
The Table Wizard creates your foreign key for you when you add a relationship! You can read more on this in the Table Wizard chapter.

Add ShoppingList relationship
Figure 9 - Add ShoppingList relationship

10. Click the Save button in the Table Wizard app bar.


Save button
Figure 10 - Save button

11. Click the Save button in the Table Upgrade window.


Save button
Figure 11 - Save button

Locate Your Table Records

All your table records will be stored in the Tables view and this is where you can maintain your records.

1. Select Data in the menu followed by Tables in the sub-menu.


Tables menu item
Figure 12 - Tables menu item

2. Select the Item record and click the Fields tab.


Fields tab
Figure 13 - Fields tab

The ItemKey record is our primary key field, when you create a table via our Table Wizard, Five will automatically create this field to store the key that uniquely identifies each record in your table. You can select the record in the list to see the full details for the record.

There is also a ShoppingListKey field, when you create a relationship in our Table Wizard, Five will automatically create this field to store the key for the record in the foreign table ShoppingList. You can select the record in the list to see the full details for the record.


Field records
Figure 14 - Field records

3. Click the Indices tab.


Indices tab
Figure 15 - Indices tab

The ItemKey record is our primary index for our table. You can select the record in the list to see the full details for the record.

The ShoppingListKey record is our foreign index and forms a relationship between the Item table and the ShoppingList table. You can select the record in the list to see the full details for the record.


Index records
Figure 16 - Index records

Database Modeler

The third way to add tables into Five is by using our Database Modeler. It is also where you can see a visual representation of your tables and their relationships.

1. Select Data in the menu followed by Database Modeler in the sub-menu.


Database Modeler menu item
Figure 17 - Database Modeler menu item

This is the Shopping database model. You can see the tables and the relationships between the tables.


Database Modeler
Figure 18 - Database Modeler