Database Authentication Structure
Results 1 to 3 of 3

Thread: Database Authentication Structure

  1. #1
    Junior Member
    Join Date
    Nov 2002
    Posts
    24

    Database Authentication Structure

    Hello!

    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.

    OR

    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?

  2. #2
    Senior Member
    Join Date
    Mar 2009
    Location
    Canada
    Posts
    794
    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.
    Prison of Mirrors
    Declare variables, not war.

  3. #3
    Junior Member
    Join Date
    Nov 2011
    Posts
    18
    Quote Originally Posted by Bonesnap View Post
    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •