HiveBrain v1.2.0
Get Started
← Back to all entries
patternMajor

Is there a standard implementation of a Users Database?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
usersstandarddatabaseimplementationthere

Problem

I need to implement basic personalized user functionality for my website. Is there a standard structure for databases of this type? Like is it common practice to have all user info and data in a single table with each user having his own row, or should this info be split among different tables and linked together (maybe for efficiency?) I'm not tremendously concerned with security at this point, but I'll obviously want to have password encryption before too long.

I tried to find what I was looking for on google, but to no avail. Just let me know if the question needs further clarification or anything.

Solution

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.

Context

StackExchange Database Administrators Q#3519, answer score: 23

Revisions (0)

No revisions yet.