Forum Post: RE: composite foreign keys

  • Thread starter Thread starter ChUIMonster
  • Start date Start date
Status
Not open for further replies.
C

ChUIMonster

Guest
That is my favorite definition as well. I would say that attributes id1 and id2 do meet the criteria -- they describe the relationship between table A and table B and that relationship is a fact about the key to table A. If, for instance, id1 = order# and id2 = orderLine then id1 is a fact about what order table A is related to (so, in this case, id1 is also a foreign key to table C which is the parent of table B...) and id2 is the orderLine of that order. Having said that -- I certainly prefer the use of a surrogate key as Marian suggests and as you illustrate with the GUID. (Although a GUID is relationally questionable because it is itself an composite even though we usually pretend not to know that.)

Continue reading...
 
Status
Not open for further replies.
Back
Top