I have a database with the following tables:
tblAdmin (admin table, one admin per project)
tblProject (projects table)
admin (FK references tblAdmin.username)
tblAccounts (several accounts per project)
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?