Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old May 12th, 2006, 1:11 PM   #1
hoffmandirt
Hobbyist Programmer
 
hoffmandirt's Avatar
 
Join Date: Jul 2005
Location: PA
Posts: 125
Rep Power: 4 hoffmandirt is on a distinguished road
Send a message via AIM to hoffmandirt
Handling registered users and non registered users in a database.

I am designing a database where there will be website users(registered users) and non website users who will just call in and a support admin will enter in the request. I am not sure how to set up the tables in the database. Should I have one users table that stores contact info and login info and leave login info blank if the user is not registered, or should I have two tables, one that stores all user contact info and one that stores only user names and passwords for registered users and links to the contact info table. This shouldn't be this hard i don't think. I must be looking to deep into it.
hoffmandirt is offline   Reply With Quote
Old Jun 27th, 2006, 6:15 PM   #2
hoffmandirt
Hobbyist Programmer
 
hoffmandirt's Avatar
 
Join Date: Jul 2005
Location: PA
Posts: 125
Rep Power: 4 hoffmandirt is on a distinguished road
Send a message via AIM to hoffmandirt
I ended up creating a users table that stored the user's contact information and email address. I then made a registered_account table that stores user names and passwords. I linked these two tables together based on user_id from the users table.
hoffmandirt is offline   Reply With Quote
Old Jul 13th, 2006, 4:20 PM   #3
mackenga
Professional Programmer
 
Join Date: Mar 2005
Location: Glasgow, Scotland
Posts: 314
Rep Power: 4 mackenga is on a distinguished road
Aye, not a bad solution. I probably would have gone with the more Unixy but not necessarily as good (I haven't thought about it deeply) approach of having only one kind of user - the registered type of user - and having a shared guest account with a blank password for non-registered users to use. This does mean every non-registered user ends up sharing the same user info in the table if you store other things in there; this would probably be dummy data anyway; and means that they all share the same uid, which is not necessarily great for security since you can't tell which of your unregistered users it was that performed any given action unless you ask them and they volunteer that information, but it does mean one table and is a little simpler.
__________________
"I'm not a genius. Why do I have to suffer?"
mackenga is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 3:50 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC