|
Creating a Table in Design View
From NeoWiki
This article is part of the To Base and Back Again tutorial series.
While we had an existing set of data for the bird list, the remainder of our tables are not built on existing spreadsheets. So we will design the other tables by hand. If one is creating a database with more "conventional' fields (name, address, phone number, account number, etc.) using the wizard can simplify the process. But since the wizard is not designed with fields related to birding, it is easier to create the needed tables in design view.
- Open your database document.
- Click on the Tables icon in the left column (labeled Database).
- Click on Create Table in Design View... icon in the Tasks section
- For each field:
- type a field name
- once a field name is chosen, Neo enters Text[VARCHAR] as the field type; if this is not the correct field type, click on this field type (in the same row as the field name); a drop-down menu appears; choose the correct field type
- Make the necessary adjustments in the Field Properties section below the fields list.
- be sure that you have provided sufficient length for your fields; this cannot be changed later.
- You can specify that the field must have an entry (necessary for primary key fields).
- You can specify a Default Value for those cases when a field will usually (but not always) have a specific value. For example, you could enter your own state abbreviation in the State field of the Locations table.
- For those tables where the primary key will be an ID field, the field type should be Integer, and AutoValue should be set to Yes
- Select the row with the field that is to be the primary key. A green triangle will appear in the left hand column.
- Control-click or right-click on the green triangle and choose Primary Key from the contextual menu. A key icon appears in the far left column. Remember that each record of your database must have a unique entry in the primary key field.
- Click on the disk drive icon on the toolbar at the top of the window; this saves your changes.
- Close the window and return to the main database document window
External Links
Using the Wizard to Create a Table
- an article by Solveig Haugland.