Re: Is it Possible to Enforce This Relationship at the DB Level?
Date: Fri, 19 Oct 2007 20:58:26 +0100
"dutone" <dutone_at_hotmail.com> wrote in message
> 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 PortasReceived on Fri Oct 19 2007 - 21:58:26 CEST
> 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.