Subject Re: [firebird-support] Constraint
Author Fidel Viegas
On Feb 19, 2008 6:56 PM, Sergio <sergiog@...> wrote:

> Hi. FB 1.5.3 SS. I want to create a constraint to relate some own table with
> a system table containing server/database users.
>
> ALTER TABLE
> SomeTable
> ADD CONSTRAINT
> FK_SomeTable_Users
> FOREIGN KEY(User_id)
> REFERENCES "some system table"(User_id)
> ON DELETE CASCADE
> ON UPDATE CASCADE;
>
> It's that possible?

You should never relate your own defined tables with system tables.
Those tables are for system use. In fact, you should not even play
with system tables, because you run the risk of corrupting your
database.

The best solution is to create a table for your users and relate to
that instead.

Fidel.