The database record

A database consists of a series of database records, and a database record consists of a series of segments.

Another thing to understand is that a specific database can only contain one kind of database record. In the school database, for example, you can place as many school records as desired. You could not, however, create a different type of database record, such as the medical database record shown in the following figure, and put it in the school database.

Figure 1. An example of a medical database record
PATIENT is the root segment and the parent of the three segments below it: ILLNESS, BILLING, and HOUSHOLD. Below ILLNESS is TREATMENT. Below BILLING is PAYMENT.

The only other thing to understand is that a specific database record, when stored in the database, does not need to contain all the segment types you originally designed. To exist in a database, a database record need only contain an occurrence of the root segment. In the school database, all four of the records shown in the following figure can be stored.

Figure 2. Example of records that can be stored in the school database
Database Record 1: Full record. Record 2: COURSE and PLACE. Record 3: COURSE, INSTR, and REPORT. Record 4: COURSE and 2 STUDENT segments.

However, no segment can be stored unless its parent is also stored. For example, you could not store the records shown in the following figure.

Figure 3. Records that cannot be stored in the school database
Two records: COURSE parent with GRADE child and COURSE parent with REPORT child.

Occurrences of any of the segment types can later be added to or deleted from the database.