Preface: I have for the most part never worked with databases, and am new. So my terminology may be incorrect at times.
I was wondering what the correct procedure would be for creating a database that has objects with multiple objects contained in them.
For a practical example, I was thinking if I were to make a database with separate meals, and also have the ingredients within the meals, how should I go about doing this? I was thinking it might look like this:
Meals | Ingredient | ~
------------------------
Chili | Ground Beef | ~
Chili | Beans | ~
Chili | Corn | ~
Burger | Ground Beef | ~
Burger | Tomato | ~
Burger | Lettuce | ~
Burger | Bun | ~
(the tilde represents extra columns, maybe calories, unit price, etc)
I was thinking this might be good, but I wouldn't be to sure how to group the meals. Would I have to make some query that looks through the meals column, finds similar names, then groups them together?
Not sure if there would be any better way of storing this type of information?