Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Implementing complicated constraints
"Agoston Bejo" <gusz1_at_freemail.hu> wrote in message news:<cjdr0n$vr4$1_at_news.caesar.elte.hu>...
> I would like to do this so that the structure of the tables remain the same.
> (Since in the real-life analogue of this example it is important that the
> structures reflect the real-life concepts.)
>
> Anyway, the question is rather about the implementation of more complicated
> constraints on tables than this specific example (which actually led me to
> pose this question in the newsgroup).
>
>
> "wario" <wario_spam_at_insightbb.com> wrote in message
> news:962c6d85.0409280619.395fb2_at_posting.google.com...
> > --Table A(AID, BID ref. B.BID, CID ref. C.CID, ATXT)
> > --Table B(BID, CID ref. C.CID)
> > --Table C(CID)
> >
> > 1. Add CID key to table A.
> > 2. Create unique index on CID and ATXT.
> >
> > Wario
More complicated constraints require more complicated datamodels. Why do you fear adding columns to tables when it allows you to better model the "real-life concepts"?
Sounds like a meta constraint that is holding you back. ("We can not change the existing database structure since it is supplied by an outside vendor.") Layering a kludge on top will never be as good as making the changes needed in the datamodel.
Good luck.
Ed
Received on Wed Sep 29 2004 - 12:17:03 CDT