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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Storing/referencing users

Re: Storing/referencing users

From: DA Morgan <damorgan_at_psoug.org>
Date: Sat, 03 Jun 2006 10:44:29 -0700
Message-ID: <1149356671.433831@bubbleator.drizzle.com>


Dave wrote:
> Is it best practise to:
>
> 1) Store users in a User table, with a numeric UserID as primary key, and
> reference these users in other tables using that UserID as a foreign key?
> Also, this would require an additional username field.
>
> or
>
> 2) Store users in a User table, with a text Username as primary key, and
> reference these users in other tables using the Username as a foreign key?
>
> TIA.
It is best practice to state the version of the database and the business rules. Is each individual user logging in with the same userid and password or does each one have their own? Do users have a unique surrogate key such as an employee id number or are you talking about creating a new purely arbitrary numbering system? How do other applications in the organization identify users such that you can exchange data between systems. Where do user names come from? Could their be two Bob Joneses? How are names to be maintained?

The simple answer is that there is no "right" way.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Sat Jun 03 2006 - 12:44:29 CDT

Original text of this message

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