The purpose of table relationships is to enforce referential integrity.
It does not have anything to do with Joins. In a one-to-many
relationship the "one" (Primary) table must contain the Value that will
be inserted into the "many" (detail/child) table.
Keys will prevent duplicate data entry. Relationships prevent invalid
data from being entered into a system (depending on how the
relationships(s) are defined). Your application is working as expected
if you cannot enter data into a given table if the key field in the
Primary table does not contain the value you are trying to enter into
the child table.
You can have several relationships in a child table. Fld1 can be
related to PrimaryTbl_A, fld2 can be related to PrimaryTbl_B. This
means that values for fld1 and fld2 must exist in PrimaryTbl_A and
PrimaryTbl_B before these values can be inserted into the child table.
Generally, the Primary tables will only contain one or two fields and
the rows will be unique. These primary tables are constraint tables and
relationships are constraints.
One thing to understand, however, is that a field in a child table can
only be related to one Primary table. You cannot relate two Primary
tables to the same field in the child table. But the converse is that
one Primary table can be related to one field in several child tables.
Rich
*** Sent via Developersdex
http://www.developersdex.com ***