Re: Primary Keys
- From: "Jeff Boyce" <nonsense@xxxxxxxxxxxx>
- Date: Wed, 11 Oct 2006 07:59:52 -0700
Jamie
My fingers overpowered my brain ... the small likelihood referred to a
non-1-to-1 relationship between tables, and allow for the possibility of a
multi-field natural unique row identifier. ... or maybe I was just getting
statistical...<g>
Jeff
"Jamie Collins" <jamiecollins@xxxxxxxxxx> wrote in message
news:1160555797.000218.144000@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Jeff Boyce wrote:
If you have normalized your data structure, there's only a small
likelihood
(in a one-to-one relationship) that two tables' unique row identifiers
would
have ANY relationship to each other.
I'm not sure what you are trying to say here. Two tables are either
related to each other (in a foreign key relationship) or they are not;
there is no middle ground. Perhaps using the terms 'referenced' and
'referencing' is better than the more ambiguous 'relationship' (see
below).
Given that one table is referencing another in a (foreign key)
one-to-one relationship, how can you know the probability of
coincidence between identifier values without knowing the (difference
between the) cardinality of *both* tables?
where one table acts as a "parent", with
(potentially) multiple "child" records in another table. In this
scenario,
the primary key of the parent table gets stored AS A FOREIGN KEY in the
child table. This is considered a "one-to-many" relationship.
A FOREIGN KEY can also used to model a one-to-one relationship with the
addition of a unique constraint in the 'child' table.
FWIW the standard terms are 'referencing' for 'child' and 'referenced'
for 'parent'; the correct mental model can aid comprehension <g>.
Jamie.
--
.
- References:
- Re: Primary Keys
- From: Jeff Boyce
- Re: Primary Keys
- From: Jamie Collins
- Re: Primary Keys
- Prev by Date: Re: 'Lord Help Me' Project
- Next by Date: Re: Church Database Help Needed!
- Previous by thread: Re: Primary Keys
- Next by thread: Image problem
- Index(es):
Relevant Pages
|