Rafal Krzewski <[EMAIL PROTECTED]> writes:
> Daniel Rall wrote:
> > > IMHO using the login name as foreign key is bad database design. Two
> > > reasons:
> > >
> > > 1. The login name of an user might change on some systems.
> > >
> > > 2. It will also cause your database to be a lot larger(and therefore
> > > slower).
> >
> > I agree with Gunnar's objections to the use of login name as primary
> > key--auto increments should always be preferred over text strings.
>
> I agree with the above, but how should we handle the situation where
> the user data is stored in LADP, and there is *no* numerical id?
>
> The only idea I have right now is to have the LDAPUserManager
> maintain a fake table id the DB that holds name <-> ID Mapping.
> Not very clean (Our system uses this apprach at te momement).
I think that this solution is fine for Turbine as well.
> Using the login name as the key would handle that. Moreover,
> if you have an index created for the textual column, selects
> will suffer very little performance penalty.
You'd be using more disk space replicating the text strings to all the
other tables. Additionally, for MySQL performance degrades ever so
slightly as tables get larger. I assume that this holds true for most
databases. :)
Daniel
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]