Is there a standard implementation of a Users Database?

I suggest that you use typical normalization standards. One user per row.

  • User ID (incrementing bigint)
  • User Common Name (to be displayed on the site)
  • User Email Address
  • Password Salt (Unique for every user, inserted when the account is created)
  • Password (Hashed with the salt - MD5 or SHA1, your preference)
  • Date Account Was Created

The rest is up to you given your business rules.


Going to have to go for a big old fashion "it depends".

Of course you are going to need some sort of key on this table. You could start off with a UserID. This could just be a incrementing INT (or bigint if you are going to have over 2.1 million users).

I've seen lots of databases also use GUIDs as the main UserID. But that's opening a whole different can of worms using GUIDs for PKs.

You then need to decide how normalized you want your database. Are you going to allow your user to have multiple emails? multiple phone numbers? If so, they should be in a different table.

I'd keep the main user table to:

  • some sort of ID or PK you can use
  • First Name/Last Name or just a username
  • some sort of status of the user (active, disabled, etc) - (tinyint linking to a status table)
  • created date

That should be your starting point.

From there you could add other columns based on what you want to store. Email could link to an email table, address to an address table, etc. Password could use hash+salt but have you considered openids?

I HIGHLY recommend you read this article though - http://www.sqlservercentral.com/articles/data-modeling/71725/