Database Authentication Structure
I am working on a backend system.
Basically, every user needs to log into the backend from my website. Each user will have their own unique mysql database, and upon authentication, they can access this database.
So theoretically, DB1 Authenticates all users and sets access to their unique database.
DB1 will continue to check that user is authenticated as they browse through the user area.
DB2 will contain all the user data which they get access to if DB1 has authenticated them to this database.
DB1 – lists all usernames and points to the DB2 (or which ever DB is set to the user) to then authenticate the user.
DB2 – Authenticates user and contains all user data
I hope this makes sense? What do you think is the best way to achieve this, I am guessing option 2? Or is there a better way?
I think the better way is to have one database and to put users' information into tables referenced by the user's ID. There's really no reason to create a database for every user, or even a table.
I agree with "Bonesnap". By using User ID, we can easily maintain one database and put user's information into tables easily.
Originally Posted by Bonesnap
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)