AFM341 Lecture Notes - Lecture 10: Business Process, Class Diagram, Foreign Key

47 views2 pages
e.g. one person can own many cars. This is a one to many relationship and will be
implemented by foreign keys

One to one relationships will also be implemented with a foreign key
In a one to many relationship, the foreign key is posted toward the "many" side of the
association. e.g. the PK for person is posted in Auto as a foreign key. The PK for state is also
posted in Auto as a foreign key. See table 3-1 for general rules for posting foreign keys
based on the types of association between two classes
a.
Note in figure 3-7, the minimum is 0 for person to auto even if some individuals own
autos. As long as our requirement indicate that some individual may not own an auto,
the minimum is 0
i.
Timing for minimum multiplicities. If an entry in one table must match an entry in another
table, the minimum is 1. if an entry in one table can occur without an entry in the other
table, then the minimum is 0.
b.
Is when the maximum multiplicity is * on both ends of the association, regardless of the
minimum multiplicities
â—‹
Create a new table with the default PK as the combination of the two PK for the associated
tables
â—‹
In figure 3-7, auto can be serviced by many deals and each dealer can service many autos.
Thus "serviced by" association is implemented by creating a new table with a PK that
includes both auto_ID and the dealer_ID (called a concatenated or composite key) shown in
figure 3-8
â—‹
Create new tables to implement many to many relationships4.
AFM 341 Page 5
Unlock document

This preview shows half of the first page of the document.
Unlock all 2 pages and 3 million more documents.

Already have an account? Log in

Document Summary

A. b. e. g. one person can own many cars. This is a one to many relationship and will be implemented by foreign keys. One to one relationships will also be implemented with a foreign key. In a one to many relationship, the foreign key is posted toward the many side of the association. e. g. the pk for person is posted in auto as a foreign key. The pk for state is also posted in auto as a foreign key. See table 3-1 for general rules for posting foreign keys based on the types of association between two classes. If an entry in one table must match an entry in another table, the minimum is 1. if an entry in one table can occur without an entry in the other table, then the minimum is 0. i. Note in figure 3-7, the minimum is 0 for person to auto even if some individuals own autos.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents

Related Questions