When designing a new application/database for multiple users, it usually involves having a table for user management.
The table usually always has Username as well as ID....
Just to check that I am not being an idiot (well, you may still think that!) I have just downloaded and taken a look at the schema of both MediaWiki and PHPBB, and they do the same.
When I first learnt about relational databases, I was always told that a big rule was never to duplicate data or do anything Unnecessary.
So, why is it that we have ID as the primary key instead of Username?
I understand the reason if it was not unique (such as the SO series of sites), however in these applications, it is.
The only thing I could think of is it is quicker to do a Select * from xxx where ID="454"
instead of Select * from xxx where name="some_really_long_name"
or because having really long names would increase the database size a lot.
Are these the only reasons, or have I missed something here?