Databases Reference
In-Depth Information
Table D-8. Single pr o perty to set for the PUBLISHERS table
Field Name:
PubID
P roperty:
I ndexed
V alue:
Y es (No Duplicates)
Designate PubID as the primary key, and save the table as PUBLISHERS.
Once you've finished creating the PUBLISHERS table, you can enter data into it. The
PUBLISHERS table contains records for only three publishers; these are shown in Table
D-9.
Table D-9. Data for the PUBLI S HERS table
PubID
PubName
PubPhone
1
Big House
123-456-7890
2
Alpha Press
999-999-9999
3
Small House
714-000-0000
D.5 Creating the BOOK/AUTHOR Table
The BOOK/AUTHOR table is the final table needed for our examples. Once again, create
it following the same basic steps described earlier in Section D.2. It consists of only two
fields, as shown in Table D-10. Once you've entered the field names and data types into
the table definition, change the two properties listed in Table D-11, and save the table as
BOOK/AUTHOR. When you save the table, Access will open the dialog box shown in
Figure D-4. The table does not have a primary key, so click on the No button; Access will
save the table without designating a primary key.
Table D-10. Fields of the B OOK/AUTHOR table
Field Name
Data Type
I SBN
text
AuID
text
Table D-11. N ondefault propertie s of the BOOK/AUTHOR table
Field Name
Property
Value
I SBN
I ndexed
Y es (Duplicates OK)
AuID
Indexed
Yes (Duplicates OK)
Once you've created the BOOK/AUTHOR table, you can enter the data shown in Table
D-12 into it.
Once you've finished this data entry, you'll still have to define the relationships among
the tables. This is discussed in detail in Section 3.4.1, in Chapter 3. Once this detail is
taken care of, you can use the tables to create the queries and to run the programs
discussed in the text of the topic.
 
Search WWH ::




Custom Search