Results 1 to 3 of 3

Thread: Design Question

  1. #1
    Join Date
    Dec 2004
    Posts
    2

    Unanswered: Design Question

    I have a database with the following tables:

    tblAdmin (admin table, one admin per project)
    username
    password

    tblProject (projects table)
    project_name
    admin (FK references tblAdmin.username)

    tblAccounts (several accounts per project)
    username
    password
    project_name (FK references tblProjects.project_name)

    How do I create the database so that each project will have an admin AND verify that each admin user has an account in the projects table (so any admin can also log in as a user).

    I must first create the admin table so that the projects table can reference it as a foreign key...then I create the projects table...then I create the accounts table. But my problem is that the usernames/passwords for the tblAccounts aren't forced to be in sync with the tblAdmin usernames/passwords.

    What is the best way to design the database to avoid redundancy of usernames/passwords?

    Thanks,
    Steve

  2. #2
    Join Date
    Dec 2004
    Posts
    9
    1] In tblProject there should be SAME name [username] as in admin ( I think you know that...)

    2] If you don't want both username & Password sync with eachother, then you have to do nothing. both will be treated as a separate columns/data.
    ===go ahead, you are fine====
    -Nanc

  3. #3
    Join Date
    Dec 2004
    Posts
    2
    I DO want the usernames/passwords in sync...but the problem is that they're in two separate tables. How do I keep them in sync when they're in two separate tables?

Posting Permissions

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