Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Database menu item+ingredients tables

$
0
0
Ok. Right away i'm sorry if I shouldn't have made this topic or if theres an answer somewhere on here but I did do a quick look and to be honest i'm not even sure what I should search to find an answer.

Basically, I'm doing some A-level database work. The database I need to create is for an over-the-phone ordering system for a food delivery service. I need to keep track of stock, menu and ingredients.
The issue I have is that I need the database to be normalised to 3rd form.

How would I go about including a menu table AND an ingredients table while still doing this? Right now I have an ingredients table: Ingredient ID, Ingredient, Stock Level, and a Menu table: Menu ID, Item, Price, Ingredient 1, Ingredient 2, Ingredient 3...
But if an item on the menu only includes 2 ingredients then I have wasted space. I've tried but I can't think of a way to list all of an item's ingredients without possible wasted space.

I'm very sorry if i'm rambling or if this shouldn't have been posted in the first place, i'm just here because i'm struggling and it's beginning to frustrate me.

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>