Subject Re: [ib-support] check constraint stops working after backup and restore
Author Martijn Tonies
Hi,

> > > my problem is:
> > > I create a domain with check constraint.
> > >
> > > e.g.
> > > ALTER DOMAIN D_TRANSPORT_TYPE_ID
> > > ADD CHECK (exists
> > > (
> > > select *
> > > from transport_types
> > > where tt_id = value
> > > ))
> > >
> > Not an answer to your question, but I'd use a foreign key constraint
instead of a domain.
>
>
> But then you have to create many foreign keys (we use this domain on
> many places). Defining this constraint on a domain saves (actually would
> save :-| ) work. And then there is still the problem with necessity of
> creating indexes for foreign keys ...

Domain shouldn't hold a database or table constraint - they should hold
value constraints only.


With regards,

Martijn Tonies
InterBase Workbench - the developer tool for InterBase
http://www.upscene.com

Firebird Workbench - the developer tool for Firebird
http://www.upscene.com

Upscene Productions
http://www.upscene.com

"This is an object-oriented system.
If we change anything, the users object."