Re: Normalizing Tree Data
Date: Mon, 11 Feb 2008 12:40:05 -0800 (PST)
Message-ID: <6fffee7c-5fa2-44cb-984b-0c857afcf316_at_s8g2000prg.googlegroups.com>
On Feb 8, 5:07 pm, Bob Badour <bbad..._at_pei.sympatico.ca> wrote:
> Is the first level always Company? Is the next level always Division? Is
> the next level always Manager? Is the next level always Employee?
Yes.
>
> What does the ID table give you that you don't get from foreign key
> references from Employee to Manager, from Manager to Division, and from
> Division to Company?
IBM
Div-A
Jones Smith Div-B Smith
Microsoft
Div-A
Johnson
Div-B
Jones Smith
Manager Table
Company Division Manager
IBM Div-A Jones IBM Div-A Smith IBM Div-B Smith Microsoft Div-A Johnson Microsoft Div-B Jones Microsoft Div-B Smith
Or this?
Company Table
CompanyKey Company
1 IBM 2 Microsoft
Division Table
DivisionKey Division CompanyKey
1 Div-A 1 2 Div-B 1 3 Div-A 2 4 Div-B 2 Manager Table ManagerKey Manager DivisionKey 1 Jones 1 2 Smith 1 3 Smith 2 4 Johnson 3 5 Jones 4 6 Smith 4
I've tried both of these and they seem to get awkward with 3 or more levels. Are you talking about one of these methods?
> You did not include an Employee table. Is there a difference between the
> Employee table and the Manger table? What is the difference?
I'm just using that as an example. My actual project has 4 levels so I added a 4th level to make it similar. Received on Mon Feb 11 2008 - 21:40:05 CET