943,901 Members | Top Members by Rank

Ad:
Jun 23rd, 2009
0

Please help me with my table design

Expand Post »
Background:
I have many tables for ex:

Nominations:
---------------
Type (there are 3 types)

WorkOrders:
----------------
Type (there are 7 types)


I have many typical tables like these. In designing database, I need to know which approach is wiser ie to make a control table for each, or to make a lookup table?

For ex:

NominationTypes:
---------------------
ID Name
-- --------
1 NominationType1
2 NominationType2
3 NominationType3


or using a lookup table

Lookups:
------------
Group Code Value
------- ------- --------
NominationTypes NT1 NominationType1
NominationTypes NT2 NominationType2
NominationTypes NT3 NominationType3
WorkOrderTypes WO1 WorkOrderType1
.
.
.
WorkOrderTypes WO7 WorkOrderType7


........

My consideration on not using a lookup value within the database is this.. User may need to customize (add or delete types) it in the future.

How usually people making their country database? Are they using a seperate table to store data or using a lookup table?

---------------

In my case, I may access these types oftenly, so in query wise, which option is best for me?

thanks for replying
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
bayangan is offline Offline
1 posts
since Jun 2009
Jun 24th, 2009
0

Re: Please help me with my table design

I would recommend the "lookup table" approach. This will save you from creating many tables that serve the same purpose and it will make queries easier to build since you don't have to remember which table stores which types.
Reputation Points: 27
Solved Threads: 29
Posting Whiz
timothybard is offline Offline
317 posts
since Mar 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Database Design Forum Timeline: Design decision: One or multiple tables
Next Thread in Database Design Forum Timeline: replication





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC