Figuring out relationships between tables.
От | Andrew Cooper |
---|---|
Тема | Figuring out relationships between tables. |
Дата | |
Msg-id | h6rkp6$ilp$1@aioe.org обсуждение исходный текст |
Ответы |
Re: Figuring out relationships between tables.
Re: Figuring out relationships between tables. |
Список | pgsql-general |
Greetings, This is a general database design question. I've got a database where I need to hold information on employees. Every employee has much of the same information so I've created an Employee table. Now, some employees are supervisors or managers. An employee can only have 1 manager/supervisor but the hierarchy can be varying depths. For example... I have the following employees: Bob, Jill, Tom, Bill, Harry, Jane, Amy, Jim, Fred, Sue and June The management hierarchy works like this: Bob / | \ Jill Tom Bill / \ | \ Harry Jane Amy Jim | | Fred Sue | June How can I create these relationships in the database? I don't want a Manager table that duplicates all the information for employees for the managers. Besides, a manager can have a manager who can have a manager... and so on. There is probably a simple solution to this problem but I'm not seeing it. Any help would be appreciated. Thanks, Andrew
В списке pgsql-general по дате отправления: