Re: On view updating
Date: Sun, 26 Sep 2004 17:38:05 +0200
Message-ID: <4156e25e$0$48933$e4fe514c_at_news.xs4all.nl>
Paul wrote:
> mAsterdam wrote:
>
>> The interpretation of "X=2 OR X=3" as a constraint is: >> Every assertion containing a value for X should have 2 or 3 as the >> value for X. It specifically does not assert that there should be >> assertions containing a value for X.> > If there is no assertion having a value for X, the constraint
> >
> > is not violated.
>
> I interpret it as meaning:
> "At least one of these statements is true: (1) 'X=2' (2) 'X=3'"
It is possible to express a constraint that would have "At least one of these statements is true: (1) 'X=2' (2) 'X=3'" as meaning, and the absence of both *would* constitute a violation - but we would need some more context.
> In a database that has no assertions about X (i.e. a relation exists but
> has no rows), if we ask: "Can X=2?" or if we ask: "Can X=3?", we will
> get the answer "No" both times.
Which interpreter are you using?
> Thus I would see the constraint being violated.
Yep.
> Maybe I'm not quite understanding the use of "X=2" though. I'm assuming
> this is shorthand for something like "there exists an employee with ID
> of 2". So you can have both X=2 and X=3 in the database at the same time
> with no contradiction. Unlike the mathematical sense where one would
> preclude the other (assuming 2 != 3 that is).
>
> Let's take a concrete SQL example.
Ah! Context.
> In one case you would have a table constraint like:
> EXISTS( SELECT * FROM emp WHERE id IN (2,3))
> In the other case you would have a row constraint like:
> id IN (2,3)
>
> Am I thinking of the former and you of the latter?
I was thinking of the latter.
Your statement (earlier post):
> just thought about this some more, and I realise now that
> the database can only contain these constraints "X=2 OR X=3"
> if one or the other of the statements is explicitly contained
> within the database. Because anything not in the database is
> assumed to be false.
needs an interpretation along the lines of the former.
> I think of the predicate and you of each individual proposition?
Could you elaborate, please?
Received on Sun Sep 26 2004 - 17:38:05 CEST