Path: dp-news.maxwell.syr.edu!spool.maxwell.syr.edu!drn.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.news2me.com!nx01.iad01.newshosting.com!newshosting.com!216.196.98.140.MISMATCH!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!g49g2000cwa.googlegroups.com!not-for-mail
From: zeldorblat@gmail.com
Newsgroups: comp.databases.theory
Subject: Re: Storing "deleted" data
Date: 31 Oct 2005 07:02:21 -0800
Organization: http://groups.google.com
Lines: 26
Message-ID: <1130769897.026173.216650@g49g2000cwa.googlegroups.com>
References: <1130700808.833451.143900@g43g2000cwa.googlegroups.com>
   <dk4mo4$jib$1@domitilla.aioe.org>
NNTP-Posting-Host: 64.199.1.90
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1130770947 4455 127.0.0.1 (31 Oct 2005 15:02:27 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 31 Oct 2005 15:02:27 +0000 (UTC)
In-Reply-To: <dk4mo4$jib$1@domitilla.aioe.org>
User-Agent: G2/0.2
X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.0.7-1.1.fc4 Firefox/1.0.7,gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse@google.com
Injection-Info: g49g2000cwa.googlegroups.com; posting-host=64.199.1.90;
   posting-account=ivWmoA0AAAB2VzV5eyLZ6S5_uf1FfeWZ
Xref: dp-news.maxwell.syr.edu comp.databases.theory:34151

>b)You can try to declare a foreign key reference to one table AND another.

That doesn't help, though.  Consider the following:

create table livePeople (
   personID int not null,
   ...
)

create table deadPeople (
   personID int not null,
   ...
)

create table personComment (
    personID int not null,
    commentID int not null
)

So what primary key does personComment.personID refer to?  As far as I
know, while it can refer to livePerson.personID AND
deadPerson.personID, it can't refer to livePerson.personID OR
deadPerson.personID.  Furthermore, there's no way to indicate that
livePerson.personID and deadPerson.personID have to be unique when
combined.

