PDA

View Full Version : Database structure


jossro
08-27-2005, 08:56 PM
I am attempting to properly define a database with 3 tables, and I am having trouble getting the relationships worked out. Here is the format:

user (unique id) - basic user information
user's agency (unique id) - (but since it is likely there would be more than one user per agency, what additional indices do I need to add?)
user's manager (unique id) - (and there would be more than one manager per agency)

what keys would I refer to where? I had considered the user table consisting of UserID/AgencyID/ManagerID, all int, all unsigned with the UserID being autoincremented, and then these columns followed by the user's information (about 6 additional columns).

:eek: .. it's the addition of the 3rd table that has me screwed up! In fact I'm no longer actually sure that the above makes sense!!

Any help would be gratefully appreciated...

Thanks