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

Home -> Community -> Usenet -> comp.databases.theory -> Re: Is it Possible to Enforce This Relationship at the DB Level?

Re: Is it Possible to Enforce This Relationship at the DB Level?

From: David Portas <REMOVE_BEFORE_REPLYING_dportas_at_acm.org>
Date: Fri, 19 Oct 2007 20:58:26 +0100
Message-ID: <wtCdnTezMtDzkYTanZ2dnUVZ8sKlnZ2d@giganews.com>


"dutone" <dutone_at_hotmail.com> wrote in message news:1192812253.242886.40630_at_q3g2000prf.googlegroups.com...
> On Oct 16, 4:03 am, David Portas
>
> What I was trying to say is that not all constraints can be enforced
> via relationships, hence the need for a RDMS to allow one to create a
> high level constraint with statements like check assertion.
>

I think you mean "not all constraints can be enforced by foreign keys alone". Am I right? I agree of course but you would be wrong to think that other types of constraint are not an equally legitimate part of conceptual and logical models. That's a mistake common to ER-modelling practice and it's a problem that ORM for example was specifically designed to correct. The problem being "I can't draw a picture of this relationship so it isn't part of my model!".

You see why this is purely an implementation issue? A SQL CHECK or ASSERTION is not in principle at a "higher level" than a FOREIGN KEY constraint - it just looks that way because you don't like the syntax (actually, neither do I!).

-- 
David Portas


> My original question appears to fall into this category, since I
> cannot see away to guarantee that the Cell Config table will include
> only rows of the Field table that are children of the Spec table
> referenced by Spreadsheet Config.
>
> Although maybe something was wrong with my model, which is why I
> initially posted my question.
>
> Thanks
>
>
Received on Fri Oct 19 2007 - 14:58:26 CDT

Original text of this message

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