• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Real life databases

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic