Database for restaurants

From: ^Bart <gabriele1NOSPAM_at_hotmail.com>
Date: Thu, 15 Aug 2019 19:45:26 +0200
Message-ID: <qj45nm$1n18$1_at_gioia.aioe.org>



Hi everybody,

I'd like to create a db for restaurants where I should add recipes, ingredients, etc. and I thought to use these tables:

foodgroups



id_foodgroup name
1       	Vegetable
2       	Meat
3        	Dairy Product
4        	Fruit
5        	Sea fish
6        	Shellfish
7        	Freshwater fish
8        	Pasta
9        	Rice
10        	Burger

subfoodgroups


id_subfoodgroup name 	       FK_id_foodgroup
1        	Spice and herb 	1
2        	Cereals G. Free 1
3        	Bovine     	2
4        	Cheese 		3
5        	Tuna            5
6        	Bucatini        8
7		Spaghetti	8

I should also add, for example about pasta, what kind of flour they used to made it and also for Dairy products I should add which milk was used (From cows, sheeps, etc.) and I think I should add a third table like this:

foodgroupdetails


id_foodgroupdetail	name			FK_id_foodgroup
1			Sheep's milk		3
2			Cow's milk		3
3 			Whole wheat flour	8
4			Emmer flour 		8

Last fourth table should be recipes:

recipes


id_recipe  name		FK_id_subfoodgroup FK_id_foodgroupdetail
1	   Amatriciana	7		   4

But now I should also add the sauce, maybe I should have another table where I could add sauce for pasta and about what I can put inside to other dishes also inside a burger to connect to the recipe's table...

I know my idea is not the best but I'm trying to understand how to solve this problem... :|

^Bart Received on Thu Aug 15 2019 - 19:45:26 CEST

Original text of this message