Subject | Re: Check constraint vs. ref. integrity |
---|---|
Author | Alexander V.Nevsky <ded@hq.bereg.net> |
Post date | 2003-03-03T22:07:53Z |
--- In ib-support@yahoogroups.com, Bob Murdoch <ram5@e...> wrote:
added/dropped/modified to another ones in time of their work it is
safe to check it without references integrity - concurrency is near to
impossible and you need only one unique index on table Users not
low-selective one on every table on user_id.
Best regards, Alexander V.Nevsky.
> I'm setting up a new database, and wondering what the consensus ison this
> situation:and
>
> I have a couple of audit columns that are part of every table in the
> database. Those columns are simply Ins_User_ID, Ins_TS, Upd_User_ID
> Upd_TS, representing the user and timestamp of the insert, and themost
> recent user and timestamp of an update.linking
>
> I could create a foreign key from each table to the Users table,
> the Ins_User_ID and Upd_User_ID to the primary key of the Userscreate
> table. Alternatively, I could add a check constraint (or manually
> BeforeUpdate/Insert triggers) to do the validation.Bob, since it difficult to imagine users will be
added/dropped/modified to another ones in time of their work it is
safe to check it without references integrity - concurrency is near to
impossible and you need only one unique index on table Users not
low-selective one on every table on user_id.
Best regards, Alexander V.Nevsky.