PC.doc-ACCESS Instructions for Use Page 13 of 19
4.4 PC.doc-ACCESS Primary Keys
Data which are displayed in forms are saved to tables by means of PC.doc-ACCESS. The tables are linked to
each other for queries and reports.
Data must be uniquely identified to this end. Identification for each table is accomplished by means of primary
keys, e.g. the customer number is used as a primary key in the customer table. Several fields in a single table may
be used together to make up one primary key as well: For a database in which several customers are managed, the
device ID number alone is no guarantee for unambiguous identification, because two customers could have the
same ID number for different devices. Thus both fields, namely customer number in combination with the ID
number, are essential criteria for the uniqueness of device data. Even this double combination is insufficient for
the unique identification of device test data, because several tests for a single device may be stored in the
database. The work order number is used as an additional criterion by PC.doc-ACCESS to this end, i.e. the
primary key for test data is: customer number + ID number
The fields for the primary key are specified and highlighted in yellow at the top of each form in
PC.doc-ACCESS. Primary keys consist of combinations of number and/or letters. If the button used for
generating new data records is clicked in the sub-form in PC.doc-ACCESS, PC.doc-ACCESS automatically
suggests a new number for the primary key field which will be changed.
PC.doc-ACCESS: Creating a New Data Record
The field is sorted in ascending order and is analyzed from right to left. If the right-hand field is numeric, the
numeric component is increased by one. The field suggested by PC.doc-ACCESS can, of course, be changed.
When the form is saved, ACCESS checks to make sure that the entered primary key is unique (combination of
fields highlighted in yellow). If this is not the case, the data record is not saved.