|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hello,
I am trying to create a data model to represent meals and menus. As part of this, I have tables: Ingredient Quantity measurement Method Equipment Recipe Dish Meal Menu a recipe can contain multiple ingredients (each with quantities and measurements) a dish can contain multiple recipies A meal can contain multiple dishes and so on. I currently relate the the ingredients and Recipe tables using an 'IngredientList' table which contains fields: ID RecipeID IngredientID Quantity Measurement ID This means that for a given recipe there will be multiple rows in the 'IngredientList' table. I'm then intending to go on and create 'RecipeList' which will contain: ID Dish ID RecipeID and so on. My question is that it seems like the original 'Dish' table is almost pointless, as it will contain hardly any information. the fields will be: ID Name Type Am I going in the right direction? Your is greatly appreciated. Thanks, Hugo |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
hugo@laterooms.com wrote:
> I currently relate the the ingredients and Recipe tables using an > 'IngredientList' table which contains fields: > > ID > RecipeID > IngredientID > Quantity > Measurement ID > > This means that for a given recipe there will be multiple rows in the > 'IngredientList' table. I would skip the ID and make the RecipeID+IngredientID to be the primary key, this prevents you to have doublets. > I'm then intending to go on and create 'RecipeList' which will > contain: > > ID > Dish ID > RecipeID > > and so on. I would skip the ID and make the DishID+RecipeID to be the primary key, this prevents you to have doublets. > My question is that it seems like the original 'Dish' table is almost > pointless, as it will contain hardly any information. the fields will > be: > > ID > Name > Type > > Am I going in the right direction? Say you did include the Name and Type to your 'RecipeList', then you would have duplicated the data for example: 1 12 "Some Name" "Some Type" 1 14 "Some Name" "Some Type" In the thought of disk space, it's a steb backward to skip the Dish table. -- //Aho |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
On Oct 20, 10:58 am, h...@laterooms.com wrote:
> Hello, > > I am trying to create a data model to represent meals and menus. As > part of this, I have tables: > > Ingredient > Quantity > measurement > Method > Equipment > > Recipe > Dish > Meal > Menu > > a recipe can contain multiple ingredients (each with quantities and > measurements) > a dish can contain multiple recipies > A meal can contain multiple dishes and so on. > > I currently relate the the ingredients and Recipe tables using an > 'IngredientList' table which contains fields: > > ID > RecipeID > IngredientID > Quantity > Measurement ID > > This means that for a given recipe there will be multiple rows in the > 'IngredientList' table. > > I'm then intending to go on and create 'RecipeList' which will > contain: > > ID > Dish ID > RecipeID > > and so on. > > My question is that it seems like the original 'Dish' table is almost > pointless, as it will contain hardly any information. the fields will > be: > > ID > Name > Type > > Am I going in the right direction? > > Your is greatly appreciated. > > Thanks, > > Hugo According to your definition, what are 'meals' and 'menus'? |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
On 20 Oct, 12:05, strawberry <zac.ca...@gmail.com> wrote:
> On Oct 20, 10:58 am, h...@laterooms.com wrote: > > > > > Hello, > > > I am trying to create a data model to represent meals and menus. As > > part of this, I have tables: > > > Ingredient > > Quantity > > measurement > > Method > > Equipment > > > Recipe > > Dish > > Meal > > Menu > > > a recipe can contain multiple ingredients (each with quantities and > > measurements) > > a dish can contain multiple recipies > > A meal can contain multiple dishes and so on. > > > I currently relate the the ingredients and Recipe tables using an > > 'IngredientList' table which contains fields: > > > ID > > RecipeID > > IngredientID > > Quantity > > Measurement ID > > > This means that for a given recipe there will be multiple rows in the > > 'IngredientList' table. > > > I'm then intending to go on and create 'RecipeList' which will > > contain: > > > ID > > Dish ID > > RecipeID > > > and so on. > > > My question is that it seems like the original 'Dish' table is almost > > pointless, as it will contain hardly any information. the fields will > > be: > > > ID > > Name > > Type > > > Am I going in the right direction? > > > Your is greatly appreciated. > > > Thanks, > > > Hugo > > According to your definition, what are 'meals' and 'menus'? Hugo wrote in email: <snip> Meals are multiple dishes, such as 'Ginger Beef' with 'Creamy potato mash' where both 'ginger beef' and 'creamy potato mash' are dishes. Menus are multiple dishes such as starter,main and dessert. </snip> OK, well in answer to your question, yes - you're on the right lines. Dishes and recipes are the same thing so the Dish table is redundant. If you feel like cheating a little why not visit http://www.databaseanswers.org/data%...ipes/index.htm which gives an example of a recipe schema. |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
strawberry wrote:
> On 20 Oct, 12:05, strawberry <zac.ca...@gmail.com> wrote: >> On Oct 20, 10:58 am, h...@laterooms.com wrote: >> >> >> >>> Hello, >>> I am trying to create a data model to represent meals and menus. As >>> part of this, I have tables: >>> Ingredient >>> Quantity >>> measurement >>> Method >>> Equipment >>> Recipe >>> Dish >>> Meal >>> Menu >>> a recipe can contain multiple ingredients (each with quantities and >>> measurements) >>> a dish can contain multiple recipies >>> A meal can contain multiple dishes and so on. >>> I currently relate the the ingredients and Recipe tables using an >>> 'IngredientList' table which contains fields: >>> ID >>> RecipeID >>> IngredientID >>> Quantity >>> Measurement ID >>> This means that for a given recipe there will be multiple rows in the >>> 'IngredientList' table. >>> I'm then intending to go on and create 'RecipeList' which will >>> contain: >>> ID >>> Dish ID >>> RecipeID >>> and so on. >>> My question is that it seems like the original 'Dish' table is almost >>> pointless, as it will contain hardly any information. the fields will >>> be: >>> ID >>> Name >>> Type >>> Am I going in the right direction? >>> Your is greatly appreciated. >>> Thanks, >>> Hugo >> According to your definition, what are 'meals' and 'menus'? > > Hugo wrote in email: > > <snip> > Meals are multiple dishes, such as 'Ginger Beef' with > 'Creamy potato mash' where both 'ginger beef' and 'creamy potato mash' > are dishes. > > Menus are multiple dishes such as starter,main and dessert. > </snip> > > OK, well in answer to your question, yes - you're on the right lines. > Dishes and recipes are the same thing so the Dish table is redundant. > If you feel like cheating a little why not visit > http://www.databaseanswers.org/data%...ipes/index.htm which > gives an example of a recipe schema. > > I disagree. Dishes and recipes are not necessarily the same. For instance, one might have Steak Tartar with creamed spinach and au gratin potatoes. That's three different dishes. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
On 22 Oct, 00:58, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> strawberry wrote: > > On 20 Oct, 12:05, strawberry <zac.ca...@gmail.com> wrote: > >> On Oct 20, 10:58 am, h...@laterooms.com wrote: > > >>> Hello, > >>> I am trying to create a data model to represent meals and menus. As > >>> part of this, I have tables: > >>> Ingredient > >>> Quantity > >>> measurement > >>> Method > >>> Equipment > >>> Recipe > >>> Dish > >>> Meal > >>> Menu > >>> a recipe can contain multiple ingredients (each with quantities and > >>> measurements) > >>> a dish can contain multiple recipies > >>> A meal can contain multiple dishes and so on. > >>> I currently relate the the ingredients and Recipe tables using an > >>> 'IngredientList' table which contains fields: > >>> ID > >>> RecipeID > >>> IngredientID > >>> Quantity > >>> Measurement ID > >>> This means that for a given recipe there will be multiple rows in the > >>> 'IngredientList' table. > >>> I'm then intending to go on and create 'RecipeList' which will > >>> contain: > >>> ID > >>> Dish ID > >>> RecipeID > >>> and so on. > >>> My question is that it seems like the original 'Dish' table is almost > >>> pointless, as it will contain hardly any information. the fields will > >>> be: > >>> ID > >>> Name > >>> Type > >>> Am I going in the right direction? > >>> Your is greatly appreciated. > >>> Thanks, > >>> Hugo > >> According to your definition, what are 'meals' and 'menus'? > > > Hugo wrote in email: > > > <snip> > > Meals are multiple dishes, such as 'Ginger Beef' with > > 'Creamy potato mash' where both 'ginger beef' and 'creamy potato mash' > > are dishes. > > > Menus are multiple dishes such as starter,main and dessert. > > </snip> > > > OK, well in answer to your question, yes - you're on the right lines. > > Dishes and recipes are the same thing so the Dish table is redundant. > > If you feel like cheating a little why not visit > >http://www.databaseanswers.org/data%...index.htmwhich > > gives an example of a recipe schema. > > I disagree. Dishes and recipes are not necessarily the same. > > For instance, one might have Steak Tartar with creamed spinach and au > gratin potatoes. That's three different dishes. > Yes, it is 3 different dishes. In my cookbook, that is shown with a recipe for Steak Tartar, with a suggestion to accompany it with Creamed Spinach (and a reference to the page that that recipe is found on) and Gratin Potatoes (with its associated recipe reference). |
|
|
|
#7 |
|
Messages: n/a
Hébergeur: |
Captain Paralytic wrote:
> On 22 Oct, 00:58, Jerry Stuckle <jstuck...@attglobal.net> wrote: >> strawberry wrote: >>> On 20 Oct, 12:05, strawberry <zac.ca...@gmail.com> wrote: >>>> On Oct 20, 10:58 am, h...@laterooms.com wrote: >>>>> Hello, >>>>> I am trying to create a data model to represent meals and menus. As >>>>> part of this, I have tables: >>>>> Ingredient >>>>> Quantity >>>>> measurement >>>>> Method >>>>> Equipment >>>>> Recipe >>>>> Dish >>>>> Meal >>>>> Menu >>>>> a recipe can contain multiple ingredients (each with quantities and >>>>> measurements) >>>>> a dish can contain multiple recipies >>>>> A meal can contain multiple dishes and so on. >>>>> I currently relate the the ingredients and Recipe tables using an >>>>> 'IngredientList' table which contains fields: >>>>> ID >>>>> RecipeID >>>>> IngredientID >>>>> Quantity >>>>> Measurement ID >>>>> This means that for a given recipe there will be multiple rows in the >>>>> 'IngredientList' table. >>>>> I'm then intending to go on and create 'RecipeList' which will >>>>> contain: >>>>> ID >>>>> Dish ID >>>>> RecipeID >>>>> and so on. >>>>> My question is that it seems like the original 'Dish' table is almost >>>>> pointless, as it will contain hardly any information. the fields will >>>>> be: >>>>> ID >>>>> Name >>>>> Type >>>>> Am I going in the right direction? >>>>> Your is greatly appreciated. >>>>> Thanks, >>>>> Hugo >>>> According to your definition, what are 'meals' and 'menus'? >>> Hugo wrote in email: >>> <snip> >>> Meals are multiple dishes, such as 'Ginger Beef' with >>> 'Creamy potato mash' where both 'ginger beef' and 'creamy potato mash' >>> are dishes. >>> Menus are multiple dishes such as starter,main and dessert. >>> </snip> >>> OK, well in answer to your question, yes - you're on the right lines. >>> Dishes and recipes are the same thing so the Dish table is redundant. >>> If you feel like cheating a little why not visit >>> http://www.databaseanswers.org/data%...index.htmwhich >>> gives an example of a recipe schema. >> I disagree. Dishes and recipes are not necessarily the same. >> >> For instance, one might have Steak Tartar with creamed spinach and au >> gratin potatoes. That's three different dishes. >> > Yes, it is 3 different dishes. In my cookbook, that is shown with a > recipe for Steak Tartar, with a suggestion to accompany it with > Creamed Spinach (and a reference to the page that that recipe is found > on) and Gratin Potatoes (with its associated recipe reference). > Hmmm, do we have the same cookbook? :-) -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |
|
|
|
#8 |
|
Messages: n/a
Hébergeur: |
On 22 Oct, 12:17, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> Captain Paralytic wrote: > > On 22 Oct, 00:58, Jerry Stuckle <jstuck...@attglobal.net> wrote: > >> strawberry wrote: > >>> On 20 Oct, 12:05, strawberry <zac.ca...@gmail.com> wrote: > >>>> On Oct 20, 10:58 am, h...@laterooms.com wrote: > >>>>> Hello, > >>>>> I am trying to create a data model to represent meals and menus. As > >>>>> part of this, I have tables: > >>>>> Ingredient > >>>>> Quantity > >>>>> measurement > >>>>> Method > >>>>> Equipment > >>>>> Recipe > >>>>> Dish > >>>>> Meal > >>>>> Menu > >>>>> a recipe can contain multiple ingredients (each with quantities and > >>>>> measurements) > >>>>> a dish can contain multiple recipies > >>>>> A meal can contain multiple dishes and so on. > >>>>> I currently relate the the ingredients and Recipe tables using an > >>>>> 'IngredientList' table which contains fields: > >>>>> ID > >>>>> RecipeID > >>>>> IngredientID > >>>>> Quantity > >>>>> Measurement ID > >>>>> This means that for a given recipe there will be multiple rows in the > >>>>> 'IngredientList' table. > >>>>> I'm then intending to go on and create 'RecipeList' which will > >>>>> contain: > >>>>> ID > >>>>> Dish ID > >>>>> RecipeID > >>>>> and so on. > >>>>> My question is that it seems like the original 'Dish' table is almost > >>>>> pointless, as it will contain hardly any information. the fields will > >>>>> be: > >>>>> ID > >>>>> Name > >>>>> Type > >>>>> Am I going in the right direction? > >>>>> Your is greatly appreciated. > >>>>> Thanks, > >>>>> Hugo > >>>> According to your definition, what are 'meals' and 'menus'? > >>> Hugo wrote in email: > >>> <snip> > >>> Meals are multiple dishes, such as 'Ginger Beef' with > >>> 'Creamy potato mash' where both 'ginger beef' and 'creamy potato mash' > >>> are dishes. > >>> Menus are multiple dishes such as starter,main and dessert. > >>> </snip> > >>> OK, well in answer to your question, yes - you're on the right lines. > >>> Dishes and recipes are the same thing so the Dish table is redundant. > >>> If you feel like cheating a little why not visit > >>>http://www.databaseanswers.org/data%...index.htmwhich > >>> gives an example of a recipe schema. > >> I disagree. Dishes and recipes are not necessarily the same. > > >> For instance, one might have Steak Tartar with creamed spinach and au > >> gratin potatoes. That's three different dishes. > > > Yes, it is 3 different dishes. In my cookbook, that is shown with a > > recipe for Steak Tartar, with a suggestion to accompany it with > > Creamed Spinach (and a reference to the page that that recipe is found > > on) and Gratin Potatoes (with its associated recipe reference). > > Hmmm, do we have the same cookbook? :-) > > -- > ================== > Remove the "x" from my email address > Jerry Stuckle > JDS Computer Training Corp. > jstuck...@attglobal.net > ==================- Hide quoted text - > > - Show quoted text - Maybe similar ones. Mine is decorated with samples of the recipes and their ingredients. I'm sure your copy is pristine ;-) |
|
![]() |
| Outils de la discussion | |
|
|