Operation Manual
Creating tables in Design View
Design View is a more advanced method for creating a new table, in which you directly enter
information about each field in the table. We will use this method for the tables of our database.
Note
While the Field type and formatting are different in Design View, the concepts are the
same as in the Wizard.
The first table to be created is Fuel. Its fields are FuelID, Date, FuelCost, FuelQuantity, Odometer,
and PaymentType.
1) Click Create Table in Design View (which opens the Table Design dialog).
2) FuelID field: Type FuelID as the first Field Name. Press the Tab key to move to the Field
Type column. Select Integer [INTEGER] as the Field Type from the drop down list. (The
default setting is Text [VARCHAR].)
Tip
A shortcut for selecting from the Field Type drop down list: press the key for the first
letter of the choice. You can cycle through the choices for a given letter by repeatedly
pressing that key.
a) Change the Field Properties in the bottom section.
Change AutoValue from No to Yes.
b) Set FuelID as the Primary key.
Click in the Field Name cell directly below FuelID. The dialog automatically sets FuelID
as the primary key and places a key icon in front of FuelID. (Figure 208)
Figure 208: Defining the primary key field
Tip
Certain of the Integer filed types (Integer and BigInt for example) have an AutoValue
Field Property. When using one of these field types, your selection of Yes for the
AutoValue value automatically makes the field the primary key.
Primary keys for any other field type must be selected by right-clicking the rectangle
before the field and selecting Primary key in the context menu.
Chapter 8 Getting Started with Base | 227