Re: Multiple parent design

From: Laconic2 <>
Date: Fri, 16 Apr 2004 08:26:24 -0400
Message-ID: <>

Some people may object to my previous suggestion, because it relies on NULLS. Here's an alternative:

Take the parent_id out of the phone table.

Create two new tables:

create table PERSONAL_PHONE
   PERSON_ID); create table COMPANY_PHONE
    COMPANY_ID); Put in the appropriate constraints for referential integrity, and relationships. A PHONE_ID must exist in one and only one of these two tables.

"Laconic2" <> wrote in message
> Create two columns in the phone table, Person_id and Company_id. Enforce
> referential integrity on each one separately. Allow each one to be NULL.
> If necessary, enforce a constraint that either Person_id or Company_id
> be null.
Received on Fri Apr 16 2004 - 14:26:24 CEST

Original text of this message