Operation Manual

Creating a table by copying an existing table
If you have a large collection of music, you might want to create a table for each type of music you
have. Rather than creating each table from the wizard, you can make copies of the original table,
naming each according to the type of music contained in it.
1) Click on the Tables icon in the Database pane to see the existing tables.
2) Right-click on the CD-Collection table icon. Choose Copy from the pop-up menu.
3) Move the mouse pointer below this table, right-click, and select Paste. The Copy table
dialog opens.
4) Change the table name to Pop and click Next.
5) Click the >> button to move all the fields from the left box to the right box and click Next.
6) Since all the fields already have the proper Field type, no changes should be needed.
However, this is the time and place to make any changes if they are needed. (See Caution
below for the reason why.) Click Create. The new table is created.
Caution
Once tables have been created using the wizard, and data has been entered, editing
them should be very limited. Fields can be added or deleted, but adding a field
requires you to enter the data for that one field for every existing record with an entry
for that field.
Deleting a field deletes all the data once contained in that field. Changing the field
type of a field can lead to data being lost either partially or completely. When
creating a new table, it pays to create the fields with the correct names, length, and
format before you add any data.
Deleting a table removes all of the data contained in every field of the table. Unless
you are sure, do not delete a table.
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.
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.
222 | Getting Started with LibreOffice 4.0