Ann,

> I think it would be wise to add a [NO] VALIDATION modifier to constraint
> definitions, including NOT NULL and referential integrity definitions.
> In the presence of a VALIDATION modifier, Firebird would begin enforcing
> the constraint on commit (as now) and then start a pass to insure that
> the data complies with the constraint.  I'd also be tempted to add a
> database configuration option that makes validation the default.

AFAIK, all constraints backed by indices (i.e. PK/UK/FK) were always 
validated upon creation. Well, upon commit, actually.

Starting with v3, we also enforce NOT NULL constraints. The engine 
validates data when NOT NULL is added for an already populated column 
(also at the commit time).

So CHECK constraints seem to be the only ones that are not validated 
upon creation. Surely doable some day.

The good question is whether we really should be supporting the NO 
VALIDATION option. Personally, I don't like that, however I know that 
some other databases has such a feature. If somebody had a real need for 
that, please describe your use case(s).

All that said, I see no need for a configuration option. Validation 
should be always the default behavior. Any RDBMS is first of all about 
consistency and only then about performance.


Dmitry


------------------------------------------------------------------------------
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to