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 > Design Problems

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-19-04, 09:34
tha_mink tha_mink is offline
Registered User
 
Join Date: Sep 2004
Posts: 1
Design Problems

I have this interesting problem (to me) that I could use some help with.

The database is MySQL.

The background (simplified)

There's a catering company that has a list of available menus in a table called "menus". There is also a table called "inventory" which stores their entire inventory(cost, name, type, etc). In addition there is a table called "jobs" which stores particular job information such as which "menu" will be served. The last relevant table is "menuItems". "menuItems" stores each inventoryItem necc. to serve a particular "menu" and the perPerson ratio for each item. This includes not only the food involved but also the silverware and so forth. "menuItems" is populated by the item_id, the menu_id, and the perPerson ratio of items to people served.

Right now, there are about 1000 inventory items and 35 menus, so at least 35,000 "menuItems".

So, the user adds a new job and chooses a menu. Based on the ratios in "menuItems" I build an excel file(item,bring,return,used,cost,etc) for the user that acts like a packing list. It lists the items required and how much of each item to bring to the job and calculates the cost (based on today's cost of "inventoryItems") for the job.

Since jobs could have totaly different lists of items, I can just make a talble with all the inventory items, since they can add and remove items at will. I could store the items in an array but I am always weary of using arrays for data storage.

I could make a table like menuItems called packingItems or something that stores each item and how much they bring, return, cost, used etc, but this caterer does like 2000 jobs per year so I am affraid that the db will get to be way too big way too fast.

Can't figure out a better way. Point me somewhere!

Andy
Reply With Quote
  #2 (permalink)  
Old 09-20-04, 22:16
bdimple bdimple is offline
Registered User
 
Join Date: Jul 2003
Posts: 74
Here's some helpful Data Models ...

The Database Answers web site has a couple of Data Models that might be helpful.

Recipes and Menus :-
http://www.databaseanswers.org/data_...ipes/index.htm

Pizzas :-
http://www.databaseanswers.org/data_...ries/index.htm

HTH

B.Dimple
DBA
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