database design - How is this login table structure? -


the structure follows:

for main login user:

user_id | email_id | username | password | is_active | is_banned | last_login  

user_detail:

uname | fname | lname | phone_no  

should move is_active , is_banned user_detail, checked once?

i suggest follow asp.net's membership table structure. has 1 table holding user input (username, real name, phone, email, etc), , 1 table back-end login system (password, active, banned, etc).

this way have tables divided out between functionality: 1 handles user account, other handles how/if can log in.

however, reasonable keep user information in users table.

for more information, see database normalization.


Comments

Popular posts from this blog

Line ending issue with Mercurial or Visual Studio -

java - Jtable duplicate Rows -

java - Run a .jar on Heroku -