Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: UID or username

Re: UID or username

From: Ed Stevens <Ed.Stevens_at_nmm.nissan-usa.com>
Date: Thu, 18 Nov 1999 13:14:42 GMT
Message-ID: <810u40$lqq$1@nnrp1.deja.com>

In article <01bf31c6$5262de40$2c289a0a_at_apollo>,   "Peter Laursen" < ptl_at_edbgruppen.dk> wrote:
> Hi
>
> I am currently designing a new db. Each table will have two fields
> updated_by and updated_at, which will record who and when the row was
last
> changed. The two fields will be maintained by a trigger.
> I thought I would store UID in updated_by, but a coworker of mine
thinks it
> is better to store the actual username.
>
> What are the pro's and con's?
>
> Thanks
> Peter Laursen
>

--
If there is a one-to-one correlation between userid and user's name, use whatever is easier for the procedure to capture.

I would suggest that you use more precise names for your columns. If you capture the userid, call it something like "update_userid"; if you capture the user name, call it something like "update_user_name"; call the other column "update_timestamp" or "update_time" or "update_date". A lot of information about the nature of an object (column, table, database, file, etc.) can be conveyed by the name alone if you put some thought into it and work out some consistant naming standards. This is something those of us with mainframe backgrounds take for granted, forged by 30+ years of history, and something those who can't remember computers before Windows still haven't grasped.

Ed Stevens
(Opinions are not necessarily those of my employer)

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Thu Nov 18 1999 - 07:14:42 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US