[Wolves] MySQL

Alex Willmer alex at moreati.org.uk
Mon Aug 2 12:49:24 UTC 2010


On 2 August 2010 13:37, Stephen Parkes <sparkes at westmids.biz> wrote:
> I tend to have a primary key based on a autoinc integer even if there
> is another field that looks like it could be a unique key.  They work
> well and don't break.
>
> This is because the fuckers always add an exception to their business
> rules at some point and it's your fault it doesn't fit in the
> database.

Wise words. These are also almost never a good primary key:
Name -- people get married, go into witness protection, change their
name to Mr <Bank>areabunchofthievingbastards
Email address -- ditto, also company mergers/rebranding
Social security or NI number -- sensitive, and they can change
Payroll number - same person moves jobs, gets special contract which
payroll system can't handle



-- 
Alex Willmer <alex at moreati.org.uk>
http://moreati.org.uk/blog



More information about the Wolves mailing list