Subject Re: [Firebird-Architect] Nulls in CHECK Constraints
Author Martijn Tonies
> > Might be, but given that our CHECKs are only evaluated on insert/update
> > (and not even on DELETE), could make them useless in certain occasions
> > when referring to other tables.
> The code has existed always to generate checks for DELETE...
> but it has been always commented, too. We got it this way from Borland.
> Can you explain how a check on delete is necessary? I don't get the idea.
> Maybe if it references another table, but a thing like check (a > 0) has
> little sense when deleting. It should have been validated at insertion or
> update time.


As you said -- if other tables are involved, it could be necessary
to check on delete.

It Firebird supported deferred constraints, this would actually be
very useful.

With regards,

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Upscene Productions
Database development questions? Check the forum!