8.4 Records
-
8.4.1 Add a record
-
8.4.2 Error detection
-
8.4.3 View a Record
-
8.4.4 Edit a Record
-
8.4.5 Add a related record
-
8.4.6 Deleting Records
8.4.1 Add a record
A record can be added to a table by using Add | Record . The "Add Record" page for each table will contain type-in boxes for each of the
fields where the user should enter the appropriate parts of the data for each record. The boxes will look
different depending on the type of data which they represent, e.g. date boxes will contain three parts -
for the day, month and year. Figure 8.4-1 shows an Add Record page containing a date field.
Figure 8.4-1: An Add Record page
Data must be entered for all required fields (see section 8.3.6 -
Required fields). Required fields are clearly distinguished.
When the record data has been completed, click on "Add Record". If an error is detected in the data it will be reported, with an
indication of where the error occurred and its type. Only when the data is error-free will it be submitted
to the database.
When adding a record to a foreign key, the user must choose a value from a list box containing the values
in the corresponding primary field. Whenever an entry is added to the primary key it will appear in the
list box for the related foreign key. The entries in the primary key should therefore be completed before
the related foreign key entries are to be filled in.
8.4.2 Error detection
Users will be prevented from entering the wrong kind of data into records in the database. Firstly, text
boxes for fields related to dates and times will prevent more than the appropriate number of digits being
entered. Whenever an error is detected on data entry, such as an integer containing an invalid character,
an error message will be presented to the user indicating in which field the error message occurred and
giving sufficient detail for the user to be able to correct the problem. Figure 8.4-2 shows an error report triggered by an error when adding a record.
Figure 8.4-2: Errors reported when adding a record
Similarly, if a value lies outside the specified range, an error will be reported to the user and they will
be prevented from submitting this record until the error is corrected.
8.4.3 View a record
To view a record, click the icon in the table view. This will bring up a non-editable view of the individual record.
8.4.4 Edit a record
To edit a record, click the icon in the table view. This will bring up an editable view of the individual record and will
check out this record. This means that the record is locked and cannot be edited by another user. After
the data has been changed as required, the record must be checked back in by clicking "Edit
Record". If the data is not changed, the user should press "Cancel and Book in" to check the
record back in without committing changes. An Edit Record page is shown in Figure 8.4-3:
Figure 8.4-3: An Edit Record page
8.4.5 Add a related record
When you have two tables linked together you have the option to add a record to a foreign table directly from the primary table. Clicking on the icon will bring up the appropriate add record form with the value appropriately chosen for the foreign field.
8.4.6 Deleting Records
To delete a single record, click the icon in the table view. This will bring up an editable view of the individual record and
will check out this record. Clicking the "Delete" button will delete it from the database.
Alternatively, multiple records can be deleted at once by selecting their checkbox from the table view, and pressing the
"Delete Records" button at the bottom of the table (see Figure 8.2-1). A warning screen will then be shown to check that the records should really be removed from the system. Clicking "Delete Records" will expunge them permanently from the database.
|