| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: On view updating
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'"
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.
Thus I would see the constraint being violated.
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.
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 think of the predicate and you of each individual proposition?
Paul. Received on Sun Sep 26 2004 - 09:54:04 CDT
![]() |
![]() |