Hi,
I have a scenario like XYZ company is creating a User management System , which allows to purchase for different company , so based on the package the system provides options to save last three or five user password to check and the max is ten .

XYZ---| Total password count 10
Company1--------|-----Company 2
company 1 takes with 5 retrivals where the other takes 2 retrivals, please let me know how can I design the DB for the same.
My present deisgn what i have done i have master table with following fields

Master table => Company ID , COmpany Name,User ID , Number Of password count,
User table => User Id , Company ID,User Name , Password .
Password table => User ID ,Password1,......password10.
I want them to be design in better normalisation , Thanks.

Alarm bells went off on this one. Try this. Don't store the actual password. Make a hash of the password so to avoid troubles down the road.

That's it.

You need a trigger that will run and update the password count and such when a user logs in or out.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.