Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Real life databases

 
Mark Hershberg
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see any security issues around keeping it in one table, assuming table access is properly controlled. I would be more concerned with cleartext storage of the passwords.
 
Joe Ess
Bartender
Posts: 9339
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Mark Hershberg:

Do you keep all the data in the same table?


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.
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic