2 ms·
Email addresses are a terrible primary key. They change (and they change a lot). They are longer than strictly necessary. A related problem there isn't a one-t
by nommm-nommm 10y ago
Email addresses are a terrible primary key. They change (and they change a lot). They are longer than strictly necessary.
A related problem there isn't a one-to-one mapping between email address and person, one person can have several email addresses. If you want to let a person have many accounts and keep track of which accounts a person has (like ebay does) then you're going to need a person primary key too and can't make an assumption about email = person.
Its my opinion natural primary keys should be used very, very sparingly if at all. There's basically no "person" natural key. Even social security numbers are subject to various problems when used as primary keys. SSNs can (rarely) change. Laws and policies around SSN use and storeage also change.