SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict tbakerisageek's Avatar
    Join Date
    Sep 2006
    Posts
    213
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Backend Database Considerations

    Hello all,
    I'm torn on my back end database layout for a public facing application I'm building. Each account in the system will have multiple users that are related, with tables of information that are related to those users. One account's users should not have access to another account's data. To increase security, I'd like to have each account have their own database that their information is feed into and retrieved from.

    I will need to keep an account-userid table that when someone attempts to authenticate, it looks up what account they belong to and selects that database as their source within the application. I don't want all of the users account information stored in this account-userID linking table for multiple reasons. I want to use this table only once, when the user logs in.

    I've contemplated using a PIN number that will translate to what database is used during the session. Infact this offers another token of authentication and will allow the same username to be used more than once (but only once per database)

    I'm sure this has been done multiple times before, can someone offer insight into how you have tackled this problem?

  2. #2
    SitePoint Wizard cranial-bore's Avatar
    Join Date
    Jan 2002
    Location
    Australia
    Posts
    2,634
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sounds like you know what you want to do.

    If the same username can exist in different databases then the user will need to identify their DB, either directly or indirectly.
    The PIN could do this, otherwise you'll need to ask for an accountID.

  3. #3
    SitePoint Addict tbakerisageek's Avatar
    Join Date
    Sep 2006
    Posts
    213
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm just afraid that this will be something people will forget and just have to provide more support because of it.


Bookmarks

Posting Permissions

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