Tables for "client" - "login and password&quo
Posted: Mon Oct 21, 2002 3:15 pm
Im new to MySQl and I have a question about tables that I just can't seem to get my head around, I have a couple of books that show tables for a database where the user login and password is stored in a separate table which makes me think that that is the accepted or advised way of structuring the database, as in this rough layout:
users - login, ID and password
client - client details
sales - sales info
rentals - rentals info
so if there is one login and password used per client does it not make more sence to have the users columns "login and password" in the clients table as below rather than having them stored as a separate table as above?
client - client details, login, ID and password
sales - sales info
rentals - rentals info
then there is less chance of say the clients details getting logged in one table and maybe not their login and password in the other, also no join is needed when accessing the client info from the user and password, am I misunderstanding this or maybe being misguided in the fact that these tables should be separate rather than combined?
Thanks
users - login, ID and password
client - client details
sales - sales info
rentals - rentals info
so if there is one login and password used per client does it not make more sence to have the users columns "login and password" in the clients table as below rather than having them stored as a separate table as above?
client - client details, login, ID and password
sales - sales info
rentals - rentals info
then there is less chance of say the clients details getting logged in one table and maybe not their login and password in the other, also no join is needed when accessing the client info from the user and password, am I misunderstanding this or maybe being misguided in the fact that these tables should be separate rather than combined?
Thanks