Skip to main content

Database Table For Login


 Login Table Database Design :

Login designs examples




Mostly all web applications contains  login module as second module of their project.  Generally first module is signup or say registration module of any web project.
 

Although username or email id and password is used for login credentials. First of all we are going to take a simple , easy and fast way to create login table for your web project. 

After this we will take a deep look of Login Section of a website. 


Although a login table may contain as simple as only two or three fields . Most important is password and then email id or say username.

For a normal size project below few fields are enough to handle login process of a web application.

You may also like this post: Advance Login Features

So consider below snapshot of login table , which is taken from phpmyadmin tool.


snapshot of login table in mysql


By clicking below link you can download a copy of sql file of above structrure.


Download Login Table sql file download link for sql file of Login Table



The core field in the table will be username and password.

After that we will add time , timestamp,date of last login.

If this login system  using old password recording policy then add one more field i.e. old password.

The old_password field will contain previous passwords in CSV format so that we can search whether a password already used in past.

 Now think what we can add for login functionality. More important " wrong login attempt". 

For security we should use login attempt field.

 So finally there are following fields may be considered.

Login Table Fields considerations : 


 1. id
 2. username
 3. password
 4. old_password
 5. wrong_login_attempt
 6. today_login_attempt
 7. is_now_login
 8. date
 9. time
 10. timestamp.

In this field list you can skip point number 9 . It is time. Because you can get it using programming function from timestamp i.e. point number 10. 


Field number 7 , which is is_now_login which is  more critical. You can use on/off or true/false or 0/1 or any decided data for this field . But keep in mind this field will contain only two different values only. For simplicity you can also use 'yes' value for logined users and 'no' value for logout user's. The default value should be set 'no'.


Comments

thank you very much, you help me a lot
Unknown said…
What is the best poker room in Canada? - Oklahomacasinoguru
With a lot to like about the casino floor, 더킹카지노 조작 I'll give you 메리트카지노 my list of the 카지노 사이트 best poker rooms 카지노 사이트 in Canada. the best casino games and 메리트 카지노 주소 promotions.
Anonymous said…
Thankful Blog