Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Implementing complicated constraints
On 30 Sep 2004 03:09:12 -0700, Tony Andrews wrote:
> Brian Dick wrote:
>> After some consideration (and a beer) I like the following better. If
>> a chance to study the business domain, I would probably come up with >> something different, yet. >> >> Table A(AID, BID ref. B.BID, TID ref T.TID) >> Table B(BID, CID ref. C.CID) >> Table C(CID) >> Table T(TID, CID ref C.CID, ATXT) with unique constraint on CID, ATXT
Try this (again). This is Mark's solution with an additional table.
Table C(CID,
pk(CID))
Table B(BID, CID,
pk(BID, CID), fk(CID ref C(CID))) Table T(CID, ATXT, pk(CID, ATXT), fk(CID ref C(CID)) Table A(AID, BID, CID, ATXT, pk(AID, BID, CID), fk(BID, CID) ref B(BID, CID), fk(CID, ATXT) ref T(CID, ATXT))Received on Thu Sep 30 2004 - 07:28:18 CDT