i usually just store all user info in 1 table, including passwords, etc
a buddy and i were having a discussion about database safety and he says that it is better to store the password in a separate table and cross-reference it with the id in the user table.
i see how what he is saying could work but really if the database is compromised it doesn't really make a difference does it? i mean the guy can look up the password in the password table and find the id in the user table anyway, it just takes 1 extra step.
and this extra step is actually a pain in the ass when authenticating in the website, because i need 1 query to find the guy's id from his email and another query to match the id with the password from the other table...
can anyone please explain whether or not his method is worth it and if it's considered bad practice to store all user information in 1 table... thanks! 🙂
a buddy and i were having a discussion about database safety and he says that it is better to store the password in a separate table and cross-reference it with the id in the user table.
i see how what he is saying could work but really if the database is compromised it doesn't really make a difference does it? i mean the guy can look up the password in the password table and find the id in the user table anyway, it just takes 1 extra step.
and this extra step is actually a pain in the ass when authenticating in the website, because i need 1 query to find the guy's id from his email and another query to match the id with the password from the other table...
can anyone please explain whether or not his method is worth it and if it's considered bad practice to store all user information in 1 table... thanks! 🙂