Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: [Q] circular foreign key constraints

Re: [Q] circular foreign key constraints

From: Nikolaus Rumm <nikolaus.rumm_at_spamremoveme.chello.at>
Date: 2000/07/09
Message-ID: <9p6a5.8812$7D2.179100@news.chello.at>#1/1

>
> 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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US