12-15-2008, 11:21 PM
|
#8 (permalink)
|
|
Moderateur
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
|
Quote:
Originally Posted by Village Idiot
Even for basic functions, the database works off of an indexed primary key much faster than a varchar value floating in a tables values.
|
True, but there's no reason why that indexed primary key absolutely must be an auto-incrementing integer type.
For the particular situation of this topic, using an email address as the PK isn't a problem unless there are plans in the future to expand the system (but we can worry about that down the line, right? right?). The email address field (PK or not) will have to be indexed (unique) anyway to save repeated entries and keep the lookups speedy (e.g. when collating the addresses to send out).
All that said, there's good reason why using an integer auto-incrementing primary key is so common and it's a healthy habit to fall into.
|
|
|
|