Page 53 - AIS access_chang_ingraham
P. 53
MICROSOFT ACCESS 51
Jesse
I. .1
Inventory Purchase
Artist/Seller
Cash
Cash
(Bank
Disbursement
Account)
FIGURE 3-19 Complete REA Diagram for Cherokee's Expenditure Cycle
Purchase Table. Notice that in Access, only the maximum cardinality is shown in the rela-
tionship window.
In this section, you will set up these other tables for Cherokee and create relation-
ships among them. The following instructions will aid in setting up a relationship linking
the Purchase Table to the Artist Table.
1. From the main Access window, click on the Relationships toolbar button (or
select Relationships from the Tools menu).
2. In the Show Table window, add both the Purchase Table and the Artist Table as
shown in Figure 3-20. Close the Show Table dialogue box.
Click and drag the ArtistID field in the Artist Table to the ArtistID field in the
Purchase Table.
3. Click on the Enforce Referential Integrity checkbox as indicated in Figure 3-21.
Referential integrity ensures that records referenced by a foreign key cannot be deleted
unless the record containing the foreign key is first removed. Thus, in this case, an artist
now cannot be deleted if there is a related purchase and you cannot delete an artist from
the Purchase Table screen. In addition, epforcing referential integrity also checks to make
sure that the two fields' data types match." .
4. Click on the Create button (see Figure 3-22).
5. Save and close.
In this chapter, you learned how to construct tables and relationships in Access based on
an REA diagram. Tables are the fundamental storage entity for the database. You also learned
how to construct forms from the tables you created. Forms facilitate the entry and manipula-
tion of the data. In the next chapters, we will explore queries and reports while we construct
the Sales/Collection cycle, the AcquisitionlPayment cycle, and the Human Resource cycle.

