PC Review


Reply
Thread Tools Rate Thread

Table Design Question

 
 
JeffTO
Guest
Posts: n/a
 
      7th Nov 2011
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
 
Reply With Quote
 
 
 
 
Dan Dungan
Guest
Posts: n/a
 
      7th Nov 2011
Hi Jeff,

In your first example, I'm unclear how each table contains a field "name".

In your second example, how are you going to link two records?

Could you provide sample data, and maybe a written description of the entities and relationships?

Dan
 
Reply With Quote
 
 
 
 
JeffTO
Guest
Posts: n/a
 
      7th Nov 2011
Thanks For Replying Dan

In the first example:

L2 is releated to L1 with a 1 to many relationship between
L2Table.L1ID and L1TableL1ID
L3 is releated to L2 with a 1 to many relationship between
L3Table.L2ID and L2TableL12D
Same for L4 and L5
The "Name" field in each table simply refers to the fact that each
Record will have a Name or Title (there is a lot of other fields as
well for each record in all of the tables but the design is basically
the same for each table)

In the 2nd Example the records would be "linked" through the
"LinkedToID" field - unlike traditional relationships between tables
this design would only denote that Record 2 was "related" to record
one as it would have a"1" in the "LinkedtoID" field. I would handl
the entegrity through my design I am just not sure this is a good way
to set up the table and I think my first suggestion is the most ideal
way

Let me know if this gives sufficient answers to your questions and if
not I will provide some sample data to try and explain better

Thanks,

Jeff



On Nov 7, 4:38*pm, Dan Dungan <d...@stagerobbers.com> wrote:
> Hi Jeff,
>
> In your first example, I'm unclear how each table contains a field "name"..
>
> In your second example, how are you going to link two records?
>
> Could you provide sample data, and maybe a written description of the entities and relationships?
>
> Dan


 
Reply With Quote
 
Dan Dungan
Guest
Posts: n/a
 
      9th Nov 2011
I'm curious what L1 etc. represents. What are the relationships.

When I see, "L2 is releated to L1 with a 1 to many relationship between
L2Table.L1ID and L1TableL1ID"

it seems you're modeling a family with five generations or something.

I just don't understand how I can help. Sorry.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Table-less CSS design looks jumbled up in design view frontpage =?Utf-8?B?ZnByb2Fk?= Microsoft Frontpage 6 28th Nov 2006 06:41 PM
how do i apply an Axis design or radial design from design templa. =?Utf-8?B?bmFkaWE=?= Microsoft Powerpoint 1 3rd Apr 2005 02:21 AM
Converting bad table design to good design =?Utf-8?B?TWVsdmlz?= Microsoft Access External Data 4 29th Sep 2004 06:27 PM
Table Design / Form design - How to manage vertical structures Qhalis Microsoft Access Forms 1 11th Dec 2003 09:02 PM
Re: Basic table design - design question John Vinson Microsoft Access Getting Started 1 26th Jun 2003 05:22 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:32 PM.