Now that we have our database, we have to create the main tables that, in addition to containing our data, will define the task that the management will have.
The tables we are going to create are Customers, Items and Orders. The first two can be defined “basic” as the data entered are pure personal data that we will enter directly.
The table Orders, on the other hand, is populated by joining the data of the other tables. From here you can understand that our management will be used to create orders.
Open the program options by pressing on the gear icon at the bottom left.
Then select the Tables page. As you can see there is only one line, because when the program creates an empty database, a table called Info is always produced. The task of the latter is to allow you to enter company information or any information that defines the owner of the management system. The use of this table will be clearer when dealing with prints.
Press the Add button and enter the name of our first table, i.e. “Customers”.
Since tables contain several rows of data, a plural name is always chosen by convention. Furthermore, it will always be written in lower case and if it contains non-alphabetical character, it will not be accepted.
The program will create the table and show the window for the definition of the fields. Creating tables without fields will also be accepted, but they won’t serve any purpose.
Select the text field type and write “Name” inside the field label. This, as is evident, will be the field that will contain the customer’s name.
The name of the field will be created automatically through the label. This is the actual name of the field within the database and will be the one we will use to create the various interactions between the data.
Pressing the Save button will create the field.
You may notice that the window remains open because it will be used to vary the parameters and characteristics of the field just created. The field just created will be updated by pressing Save.
If you want to create a new field, press the Reset button.
Close the window to create the other two tables.
- Click on the Add button, enter the name Item table and create the field with the label Code.
- Finally create the Orders table and the field with the name Date by changing the type of field from Text to Date.
We have created the tables that will contain your future data. You do not need to enter all the fields because you can create them at any time. For now, one per table will be enough and the others will be added as needed.
The most important thing to remember when creating fields is that the choice of type limits the possible options after creation. If, for example, a field is created as Text, it can never become a numeric type field.
If you have done all the steps on the Tables page correctly you will see this situation:
Inside the Fields page, however, you should have something that looks like this:
Now you need to create the sections to access the data within the tables.