Cowboy_BeBa
Registered User.
- Local time
- Today, 10:33
- Joined
- Nov 30, 2010
- Messages
- 188
hi all
i think ive pretty much figured this out, however id like a little bit of input from people with more experience than I have in database design
In our company we have several different types of stock we keep track of (we blend cake mixes for people to buy and make at home, think betty crocker but allergen free and more delicious )
We have Ingredients and Packaging (which we more or less treat as one entity, theyre both stored in tblIngredients)
Then theres Products (which is stored in tblProducts), these are the packets of mix that are produced, they are linked to ingredients via tblRecipes (which is just a simple break table that contains a product id, an ingredient id and a percentage of the ingredient that is used in the product)
and finally theres Finished Goods, stored in tblFG, a finished good may have several products in it (like a cake mix and an icing mix for example), theres a break table in between finished goods and products called tblComponents, which is more or less the same as tblRecipes, to link FGs and products together and then theres also a break third table linking Finished Goods with Ingredients (tblBOM - Bill of Materials), again the same concept as tblComponents and tblRecipes, this is where we assign packaging used
as you can imagine all these tables are quite cumbersome and are confusing for anyone other than myself to keep track of (only reason it makes sense to me is because i designed it, all the other users in the office keep asking the difference between components and bill of materials and why they need to do both), as well as this we now have what we're calling composite goods, boxes that contain several of our finished goods and i honestly do not want to have to add two more tables just to handle that
im trying to simplify the whole process by just having tblStock, which has all the fields in tables Ingredients, Products and FG, but also has an extra field to differentiate what each item is (ie, whether its an ingredient or a product, or a finished good) and based on what a user selects the form their on will hide or disable the fields that arent relevant to it (ie only an ingredient would need a supplier field and only a finished good or composite good would need a sale price field, but all stock needs a name field)
then i would have only one break table (tblBOM) which will connect finished goods to products, products to ingredients and so forth
it seems simple to me but just wondering if anyone has any experience with this and if they can offer any insights to what im doing, does it make sense to do it this way or should i be looking into a different form of design?
are there any other suggestions you guys can think of that might help me in this?
Thank you,
Ben
i think ive pretty much figured this out, however id like a little bit of input from people with more experience than I have in database design
In our company we have several different types of stock we keep track of (we blend cake mixes for people to buy and make at home, think betty crocker but allergen free and more delicious )
We have Ingredients and Packaging (which we more or less treat as one entity, theyre both stored in tblIngredients)
Then theres Products (which is stored in tblProducts), these are the packets of mix that are produced, they are linked to ingredients via tblRecipes (which is just a simple break table that contains a product id, an ingredient id and a percentage of the ingredient that is used in the product)
and finally theres Finished Goods, stored in tblFG, a finished good may have several products in it (like a cake mix and an icing mix for example), theres a break table in between finished goods and products called tblComponents, which is more or less the same as tblRecipes, to link FGs and products together and then theres also a break third table linking Finished Goods with Ingredients (tblBOM - Bill of Materials), again the same concept as tblComponents and tblRecipes, this is where we assign packaging used
as you can imagine all these tables are quite cumbersome and are confusing for anyone other than myself to keep track of (only reason it makes sense to me is because i designed it, all the other users in the office keep asking the difference between components and bill of materials and why they need to do both), as well as this we now have what we're calling composite goods, boxes that contain several of our finished goods and i honestly do not want to have to add two more tables just to handle that
im trying to simplify the whole process by just having tblStock, which has all the fields in tables Ingredients, Products and FG, but also has an extra field to differentiate what each item is (ie, whether its an ingredient or a product, or a finished good) and based on what a user selects the form their on will hide or disable the fields that arent relevant to it (ie only an ingredient would need a supplier field and only a finished good or composite good would need a sale price field, but all stock needs a name field)
then i would have only one break table (tblBOM) which will connect finished goods to products, products to ingredients and so forth
it seems simple to me but just wondering if anyone has any experience with this and if they can offer any insights to what im doing, does it make sense to do it this way or should i be looking into a different form of design?
are there any other suggestions you guys can think of that might help me in this?
Thank you,
Ben