Re: Codd and many-valued logics
Date: Sat, 11 Jun 2016 20:33:22 -0400
Message-Id: <20160611203322.53cd85a2fbda37206ee813eb_at_speakeasy.net>
On Tue, 7 Jun 2016 09:31:36 +0000 (UTC)
Roy Hann <specially_at_processed.almost.meat> wrote:
> James K. Lowden wrote:
>
> [snip]
>
> > I argue that Missing should have direct representation in the
> > database, but not in the logic. An attempt to use a missing value
> > where an actual one is needed is a domain error.
>
> [snip]
>
> I am intrigued by this suggestion but how are we to square it with the
> concept a transaction?
>
> A transaction moves the database from one consistent state to a
> (possibly different) consistent state. If data are missing then how
> can one say the database is consistent and therefore a transaction is
> complete? In SQL terms: how could one ever properly COMMIT such a
> "transaction"?
I don't see any problem. The rule says it's an error to reference a value where none exists. The inserted/updated value is constrained in exactly the same way its predecessor was. Transactions do not introduce any before-after relationship; they only ensure that the after-relationship meets the same constraints as the before-one.
Let's take the simplest form of transaction, inserting a single row into an empty database. You complexify it until a problem such as you describe arises.
The table into which the row is inserted may have NULL columns defined. No constraint on such a column may require a value; if any CHECK constraint (for example) is defined, it must -- then as now -- include OR colname IS NULL.
Can you add to my illustration to show your concern?
--jkl Received on Sun Jun 12 2016 - 02:33:22 CEST