If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > help newbie with design

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-26-08, 15:08
kltmacd kltmacd is offline
Registered User
 
Join Date: Feb 2008
Posts: 1
help newbie with design

Hi I am trying to design a database. The first table/s are needed to hold a list of items and would have
HT-REF A unique alpha-numeric. HT-001, HT-002 etc.
MANUFACTURER This would be a lookup table to the MANUFACTURERS TABLE as it would repeat (many items from the same manufacturer)
DESCRIPTION This would be a shortform description of the item

The bit I am stuck on is this. Although each HT-REF is unique it can have a suffix added to specify what it is made of.
HT-001A is a bag made of single layer paper. HT-001B is a bag made of double layer paper. HT-001C is a bag made of 3 layers of paper. The HT-001 describes what machine the bag will fit. The suffix describes the bags construction. I guess there would be a table of bag types linked to the first table.

Add to this a suppliers price list for each supplier of each type of bag. It starts to get very complicated. I have tried various ways, but cannot find a way to do it.

Help please!!!
Reply With Quote
  #2 (permalink)  
Old 02-26-08, 23:49
sco08y sco08y is offline
Registered User
 
Join Date: Oct 2002
Location: Baghdad, Iraq
Posts: 697
In your base table, store each part in separate columns.

If possible, store the most useful information you can rather than just codes.

Next, create a view that includes all the original columns as well as a calculated column that figures out what the code should be.

That way you get the best of both worlds: the proper code is kept up to date and you still have the original information to refer to easily.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On