Hi Just wanted to know if anyone here has designed a commercial real life database which (part of it) is to do with storing usernames and password and other personal information.
Do you keep all the data in the same table? i.e. UserID(P.K) username, password, email, firstname, lastname, city, etc... in just one table or do you separate the details into more tables, such as table 1 will hold UserID, username and password only and the rest of the personal details in another table with a reference to the first table.
My question is not only for design issue, but also taking into account any security issues for one design or the other.
A database that I maintain keeps user information seperate from other personal information like addresses. The reason being we have some users who do not have address information (i.e. our employees) and we have multiple addresses for customers (shipping, billing, business, etc.). There's no one answer for your question. You have to design a database to match your particular requirements.
is there a particular reason why you are using database authentication? If you are going this route most databases have the storage of encrypted passwords built in ( Oracle has excellent documentation here). But for enterprise systems, external authentication (LDAp, Active directory, etc... ) provides single signon for users and flexibility for integration of authentication into existing systems. Just wondering if your hands are tied, and you can't even consider external authentication.
In the current app (written before I joined the project) authentication details are in the user table, but personal details are in the 'person' table. Similarly, last time I implemented something like this we had a table for the individual's data and then a separate authentication table for login username/password before we moved this to LDAP.