Operation Manual

b) Set FuelID as the Primary key.
Right-click on the green triangle to the left of FuelID (Figure 202) and choose Primary
Key from the menu. This places a key icon in front of FuelID.
Figure 202: Defining the primary key field
Note
The primary key serves only one purpose: to identify the record uniquely. Any name
can be used for this field. We have used FuelID for convenience, so we know to
which table it belongs.
3) All other fields (Date, FuelCost, FuelQuantity, Odometer, and PaymentType):
a) Type the next field name in the Field Name column.
b) Select the Field Type for each field.
For Date use Date[DATE]. (Press the D key to select it.)
PaymentType uses Text [VARCHAR], the default setting.
All other fields use Number [NUMERIC]. (Press the N key once to select it.)
c) FuelCost, FuelQuantity, and Odometer need changes in the Field Properties section
(Figure 203).
FuelQuantity: Change Length to 6 and Decimal places to 3. (Many fuel pumps
measure fuel to thousandths of a gallon in the USA, where I live.)
Odometer: Change the Length to 10 and the Decimal places to 1.
FuelCost: Change the Length to 5 and Decimal places to 2. Click the Format
example button (Figure 203). This opens the Field Format window (Figure 204).
Use Currency as the Category and your currency as the Format. My currency
has two decimal places. Use what is appropriate for yours.
Chapter 8 Getting Started with Base | 223