| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Table acting as a relation table
David Cressey wrote:
> "Marshall" <marshall.spight_at_gmail.com> wrote in message > news:1176248821.606596.203310_at_l77g2000hsb.googlegroups.com... >
> > What Marshall said, and also this: > > If you make (HOSP_CODE,CLINIC_CODE) the key to the T_HOSPITAL_CLINIC table, > this would have the effect of preventing the same entry from being entered > twice into this table. This is generally a "good thing". Relations cannot > have duplicate tuples, by definition. By preventing the table from having > duplicate rows, you cause the behavior of the table to be more congruent. > > I would take your expert's advice to create separate key column for each > table with a very large grain of salt. I believe that's bad general advice, > and I think Marshall and Bob are also saying that.
A nit: According to Guy's requirements, (HOSP_CODE,CLINIC_CODE) is reducible to (CLINIC_CODE) because a clinic gets associated to at most one hospital.
Remember, he is using the join table to model a 1:N relative cardinality because he cannot alter either T_HOSPITAL or T_CLINIC. Ordinarily, I think he would simply add a HOSP_CODE to T_CLINIC. I think you are getting thrown off because the normal use of a join table is to model a N:M relative cardinality, which would require a compound key. Received on Wed Apr 11 2007 - 07:28:04 CDT
![]() |
![]() |