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 > Database design issue

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-01-06, 03:01
MTI MTI is offline
Registered User
 
Join Date: Nov 2006
Posts: 1
Database design issue

Hello,
I have an Inventory DB. the DB mainly manages the equipments, different kinds of them, some has a serial number and some don't (like small connectors).
I have a table that contain all these equipments. When the equipments with no serial number are added, they usually contain a quantity number like 200 RJ45 ethernet connectors. When they are ordered out of the warehouse, probably 56 RJ45 connectors are ordered. the orderdetails table contain only the equipment ID of the equipment. So, I will not be able to select the same equipement item again, but I have used only quarter the equipment quantity.

What can I do to redesign these tables (equipment, orders, orderdetails)

Thanks

MTI
Reply With Quote
  #2 (permalink)  
Old 11-01-06, 16:42
blindman blindman is offline
World Class Flame Warrior
 
Join Date: Jun 2003
Location: Ohio
Posts: 11,726
I'd just maintain a running total of the "commodity" products. If you want to use identical code for all types of products, then you can keep a running total of the serial number products as well, and this total will always be either one or zero.
__________________
If it's not practically useful, then it's practically useless.

blindman
www.chess.com: "sqlblindman"
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