Operation Manual

Figure 219: Selected fields in a relationship
Tip
The primary key can contain more than one field. (Its foreign key
1
will contain the same
number of fields.) If this were the case in Figure 219, the other fields of the primary field
for the Fuel table would be listed under Date. The corresponding fields of the foreign
key would be listed under Vacations. Detailed information about this is in the Base
Guide.
Figure 220: Update options and Delete options section
f) Click OK.
g) Save the Relation Design dialog if the Save button is active.
h) Close the Relation Design dialog.
i) Click the Save button at the top of the main database window.
While these options are not strictly necessary, they do help. Having them selected permits you to
update a table that has a relationship defined with another table which has been modified. It also
permits you to delete a field from the table without causing inconsistencies.
Creating a database form
Databases are used to store data. But, how is the data put into the database? Forms are used to
do this. In the language of databases, a form is a front end for data entry and editing.
A simple form consists of the fields from a table (Figure 221). More complex forms can contain
much more, including additional text, graphics, selection boxes, and many other elements. Figure
222 is made from the same table with a text label (Fuel Purchases), a list box placed in
PaymentType, and a graphic background.
A list box is useful when a field contains a fixed choice of options. It saves you from having to type
data by hand, and ensures that invalid options are not entered.
1 A field in a table that stores values of the primary key of records in another table.
238 | Getting Started with LibreOffice 5.1