Subject | Re: CHECK Constraints (was: Re: [firebird-support] Re: Checking periods don't overla |
---|---|
Author | Martijn Tonies |
Post date | 2004-06-15T11:31:25Z |
> Your example:It's a very simple example, of course. Nevertheless, other
>
> > Then again, Uniques might be useful deferred as well. For example,
> > one cannot do this:
> >
> > CREATE TABLE mytable
> > (
> > INTCOL INTEGER NOT NULL PRIMARY KEY
> > )
> > COMMIT;
> > INSERT INTO mytable VALUES (1);
> > INSERT INTO mytable VALUES (2);
> > INSERT INTO mytable VALUES (3);
> > COMMIT;
> >
> > UPDATE mytable SET intcol = intcol + 1;
> >
> > While the constraint itself - after all rows have been updated - is
> > perfectly valid.
>
> >From a theoretical point of view, this is a very sad and
> unfortunate failure to conform to the SQL standard. It's
> so a blatant violation of atomicity. It can't be that
> important in practice, or it would have been fixed
> already -- I hope.
examples that actually do use this are possible.
> "Believe it or not, there DBMSs alive today which will failSo you're saying that exactly this example is mentioned in
> when they encounter this example's UPDATE statement."
> Peter Gulutzan, 1999
the SQL standard? Funny :-)
> Of course, now working for MySQL, poor Peter Gulutzanbtw, MySQL/InnoDB fails on this as well.
> will have been confronted with even more unbelievable
> deviations from the standard.
MS SQL Server does allow this.
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com