RE: [PHPLIB] Extending user_auth table or creating a new table From: Chris Johnson (chris <email protected>)
Date: 02/29/00

It's certainly true that a 32-character uid value (the primary key for
auth_user) is a bit large. One could use a 4-byte integer, and save 28
(or more) bytes per record that the alternate ID appears in, and still
have 2 billion unique keys. If you have quite a few tables using this
same key to relate them back to auth_user, doing what you suggest might
save quite a bit of disk space and perform a bit faster, too.

Be aware that auto-increment columns are not available in all databases,
(although it is possible to simulate them easily in any
fully-transactional RDBMS, and with a bit more effort,
programmatically.)

..chris

> -----Original Message-----
> From: Howard Ha [mailto:howardh <email protected>]

> One thing I was not sure on... I am thinking I will extend
> the user_auth
> table to include an autoincrement column to use for the join.
> I'm doing
> because I will be using the auth_user table as a basis for a
> set of other
> scripts I will be working on, all of which will need to
> relate information
> from other tables to the users in auth_user.
>
> I am sort of wary of using the hash value as the ID number
> for relating the
> items, because of their size. So I was thinking of using the
> autoincrement
> values to relate different items in different tables. Does
> anyone have any
> experience or comments on this?

-
PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in
the body, not the subject, of your message.