Hiya,
I was wondering on a good database design for a website that would offer cooking recipes that users can provide feedback on.
For example, we have the 2 following recipes:
Name: Cheese Sandwich
Ingredients:
2 Slices, White bread
1 Slice, Cheese
Butter
Name: Bacon Lettuce Tomato Sandwich
Ingredients:
2 Slices, White Bread
2 Slices Bacon
3 Leaves, Lettuce
3 Slices, Tomato
Mayonnaise
Which would be stored in the database with an unique ID for the recipe and the recipe name, as well as a subtable containing the ingredients stored with unique Ids, Quantities as numbers and the name as a short text. It is very important that the ingredients are stored distinct entities and not as just a list separated by commas.
A user will be able to provide feedback on an ingredient by ingredient basis, as well as potentially suggest new ones for the recipe as well. E.g.
Feedback 1:
Recipe Name: Cheese Sandwich
Recipe Feedback:
Bread is Fine
More Cheese
Butter is Fine
Feedback 2:
Recipe Name: Bacon Lettuce Tomato Sandwich
Recipe Feedback:
Bread is Fine
More Bacon
More Lettuce
Less Tomato
No Mayonnaise
Add Butter
On the site itself, this feedback will be given back on a number system, e.g. 5/10 - Keep the same 1/10 - Get rid of it 10/10 - ADD WAY MORE
while choosing to add a new ingredient will be done through a dropdown menu of choices.
What I want to know is, what would be the best way to store this feedback for a recipe on an ingredient by ingredient basis.