Hi, I am new to this, PHP, JScript, database design... you get it.
I have question about database design:
* I will have a general area (index) from which a visitor will be able to:
-- login
-- register
REGISTER:
nickname
password
password confirmation
Firstname
Lastname
etc. ..........
Will it be best to make 2 tables:
table 1 - will hold the nickname and the password
table 2 - will hold the rest of the data
or
have only 1 table that will hold both the nickname, password, firstname, lastname, etc. ?
Regards, B
database design > mebers table vs login table
Moderator: General Moderators
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
I would make two tables. Say you have this set up:
This way, you can infinately add information about users.Nickname, Password, First name, Last name, phone, address, zip
Now you need to set up something that describes where they work... you'd have to add that also to the table
Nickname, Password, First name, Last name, phone, address, zip, work_phone, work_address, work_zip
The Ninja Space Goat wrote:I would make two tables. Say you have this set up:
Now you need to set up something that describes where they work... you'd have to add that also to the tableNickname, Password, First name, Last name, phone, address, zip
Now you need to set a signin time table for themNickname, Password, First name, Last name, phone, address, zip, work_phone, work_address, work_zip
So, just to make it easier in the future, I would do this:Nickname, Password, First name, Last name, phone, address, zip, work_phone, work_address, work_zip, signin, signout
This way, you can infinately add information about users.
USERS:
id, username, password
USER INFO:
id, First Name, Last name, phone, address, zip, user_id
USER'S WORK INFO
id, work_name, work_phone, work_address, work_zip, user_id
USER TIME LOG
id, sign_in, sign_out, user_id