Re: Primary Keys

Tech-Archive recommends: Fix windows errors by optimizing your registry



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.

--



.



Relevant Pages

  • Re: Primary Keys
    ... that two tables' unique row identifiers would ... Given that one table is referencing another in a (foreign key) ... addition of a unique constraint in the 'child' table. ...
    (microsoft.public.access.tablesdbdesign)
  • Re: constraints in algebra instead of calculus
    ... So it ought to be possible to write any constraint from the ... I thought that one was easy, if FK is the set of 'foreign key' ... attributes and A is the 'referencing table' and using an op like D&D ... and avoiding interactions between FDs and INDs because the joint implication ...
    (comp.databases.theory)
  • Re: constraints in algebra instead of calculus
    ... So it ought to be possible to write any constraint from the ... I thought that one was easy, if FK is the set of 'foreign key' attributes and A is the 'referencing table' and using an op like D&D, then it's something like AB= A. ... In it they argue that a database schema should be free of circular inclusion dependencies and should only contain key-based inclusion dependencies ...
    (comp.databases.theory)
  • Re: Key Fields
    ... the referencing is changed automatically. ... > Table2 has a foreign key IP Address that relates it to Table1 ... > All records in Table2 that have the foreign key set to the original IP ...
    (microsoft.public.sqlserver.programming)