Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: [Q] circular foreign key constraints
>
> Van, your suggestion is good, except that Nikolaus expressly says he
> doesn't need the M:M relationship. Instead his model only allows anyone
> to attend at most one meeting.
>
> So the model is:
>
> Columns in Meeting:
> MID, primary key
> MName
> ContactPersonID
>
> Columns in Person:
> PID, primary key
> Name
> MID
>
> Then create FKs:
> alter table Meeting add fk_cpid foreign key (ContactPersonID)
> references Person (PID);
> alter table Person add fk_mid foreign key (MID) references Meeting
> (MID);
>
> Let me know if this is not clear.
>
> --
> Yong Huang
>
Thank you, Yong (or Huang ?), that's exactly how I solved my problem. However I thought it would be possible to create the foreign key constraint when creating the table. Is the Oracle Designer able to generate the tables if there are circular constraints ?
Thx
Nikolaus Received on Sun Jul 09 2000 - 00:00:00 CDT
![]() |
![]() |