I'm building a website for a small store and I was told that its better not to keep the login and the rest of the users information in the same table.
Now im wondering, what is the best way to implement this website's database?
Some of the database tables are:
- Customers
- Providers
- Products
- Etc..
I need to have different users, after someone is logged in the site, depending on their rights they can do a series of things:
- If they are a customer they can order stuff
- If they are employees they can order stuff, manage stock, add customers, etc
- If they are the owner or administrator they can add employees and everything else.
Should I keep the login and the rest of the information of the user in the same table?
loginstable which holds data that's just enough to log in a user securely and map him to a user profile. The user profile might have consisted ofpermissionsanduser_attributestables which I may use to decide what actions a particular user take and store some necessary metadata about him (billing address, phone number etc.). I'd suggest designing your application by visualizing first too.