J
JeffTO
Hello
I have a question on Table Design
For Part of a DB that I am designing I have a 5 Level Reporting
Structure that I am trying to create the most efficient table design
for. I want to make sure that it is built for the easiest way to
enter the information but also to query and exract information later
on.
Which once of the following is "better" or more Proper"
Suggestion1: (Which is the way I would normally design my tables)
L1Table
L1_ID
L1_Name
L2Table
L2_ID
L1_ID (Linked to L1 Table)
L2_Name
L3Table
L3_ID
L2_ID (Linked to L2 Table)
L3_Name
L4Table
L4_ID
L3_ID (Linked to L3 Table)
L3_Name
L5able
L5ID
L4ID (Linked to L4Table)
L5Name
OR
Suggestion 2
Single Table
Role_ID
Level (Indicating which level the record is in 1, 2, 3, 4, 5)
Name
LinkedToID (Where this would link to a record in the same table)
I am seeing pros and cons to both potential designs and am just not
sure which way to go - if anyone has any thoughts or comments that
would be very much appreciated. If anyone needs any more details
please let me know
Thanks in advance for any comments
Jeff
I have a question on Table Design
For Part of a DB that I am designing I have a 5 Level Reporting
Structure that I am trying to create the most efficient table design
for. I want to make sure that it is built for the easiest way to
enter the information but also to query and exract information later
on.
Which once of the following is "better" or more Proper"
Suggestion1: (Which is the way I would normally design my tables)
L1Table
L1_ID
L1_Name
L2Table
L2_ID
L1_ID (Linked to L1 Table)
L2_Name
L3Table
L3_ID
L2_ID (Linked to L2 Table)
L3_Name
L4Table
L4_ID
L3_ID (Linked to L3 Table)
L3_Name
L5able
L5ID
L4ID (Linked to L4Table)
L5Name
OR
Suggestion 2
Single Table
Role_ID
Level (Indicating which level the record is in 1, 2, 3, 4, 5)
Name
LinkedToID (Where this would link to a record in the same table)
I am seeing pros and cons to both potential designs and am just not
sure which way to go - if anyone has any thoughts or comments that
would be very much appreciated. If anyone needs any more details
please let me know
Thanks in advance for any comments
Jeff