Best database structure for this example

That’s true, but since the username has to be in the database too, it’s pointless to add another field (even if it’s just an integer) as the primary key, because we can use directly the username for this purpose.

I thought that was already deemed a questionable idea… unless you a) don’t want to allow your users to change their username (what if they get married/divorced?) or b) don’t mind them changing their primary key with potential cascading effects throughout your tables. Is it really that big of a rub to just use a surrogate primary key id number and a username?