Subject | Re: [ib-support] Check constraint vs. ref. integrity |
---|---|
Author | Bob Murdoch |
Post date | 2003-03-04T02:49:47Z |
At 3/3/2003 04:39 PM, you wrote:
you never know what a maintenance programmer is going to think a good idea is.
but the User_ID is a generator-supplied PK, so no problems there.
thanks for confirming my suspicions,
Bob M..
>A reason not to place dependencies on these columns is that, if aYes, that's a good point. Although my apps typically do not delete users,
>particular user were to be removed from the Users table, relationships
>would be broken everywhere. This type of "user-stamping" usually has to be
>designed to survive changes to the parent table.
you never know what a maintenance programmer is going to think a good idea is.
>You *can* do this with referential integrity; but I guess you have toThat's what I couldn't swallow, and made me post the question here.
>decide whether you want the extra cost of two additional referential
>integrity checks on every row in
>your database.
>If users are allowed to enter their own IDs, then the preferred solutionYes, exactly. There is a username/password that is updateable by the user,
>would be to use the triggers for your checks. Even better would be to have
>some means to do the stamping automatically in the triggers and disallow
>users from subsequently tampering with those columns where they are visible
>in applications.
but the User_ID is a generator-supplied PK, so no problems there.
thanks for confirming my suspicions,
Bob M..