Re: storing survey answers of different data types

From: paul c <toledobythesea_at_oohay.ac>
Date: Sun, 26 Apr 2009 19:06:31 GMT
Message-ID: <Xg2Jl.24350$Db2.19062_at_edtnps83>


Brian Selzer wrote:
...
>
> I disagree: in this case the Delete is unsafe because it might violate a
> referential constraint (the one-to-many constraint Date refer's to); there
> is no danger of any Select violating a constraint.
> ...

You and Date are both wrong. There is no notion of constraint in Codd's calculus nor the algebra. Therefore constraints must be applied to the results of a desired algebraic operation (this doesn't prevent constraints being expressed by the algebra), they cannot be applied as part of an algebraic operation like 'minus' or 'union'.

> I would also suggest that you apply simple logic:,,,

That is exactly what those who say the problem is undecideable do. Simple logic is misplaced unless it recognizes that here we are not only talking about mapping to values that produce true propositions via prediicate logic. The real situation is that when we update a relvar, we are also updating a database. 'Simple logic' applied to the actual situation will show that a delete to 'one side' of a join will also insert to possible relvars that are not inferrable from the join (eg., the value of A MINUS B is non inferrable from A JOIN B). Similarly, an insert to 'one side' of a union will delete from such non-inferrable relvars. Now, if somebody says such side-effects are a consequence of logic, then they will also have to agree that 'Delete ... from R' is logically nonsense, specifying 'R' in an implementation language becomes meaningless when other non-inferrable relvars might be changed. In fact, the very word 'Delete' becomes nonsense when non-inferrable 'inserts' are made.

The very suggestion that there is more than one way to 'map' is a mis-use of logic. This is why simple logic by itself is not enough. But it can help point the way when a database is involved. Received on Sun Apr 26 2009 - 21:06:31 CEST

Original text of this message