PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.databases.mysql > Dealing with hierarchies - A novices question.
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Dealing with hierarchies - A novices question.

Réponse
 
LinkBack Outils de la discussion
Vieux 19/10/2007, 14h54   #1
hugo@laterooms.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Dealing with hierarchies - A novices question.

Hello,

I've been designing a schema for a web app that will allow users to
create a weekly meal plan and shopping list.

At the heart of the design is the model for recipe data.

I currently have a hierarchy of:

Menu eg. Mozzarella Salad, Beef Casserole , Apple Flan w. Raspberry
cream.
Meal eg. Apple Flan w. raspberry cream
Dish eg Apple Flan
Recipe - eg pastry case, apple sauce, topping
Ingredient - eg flour

At the lowest level - ingredient, I also have:

Measurement
Method
Equipment tables

My question is, how do I connect these tables? I've created an
'ingredient list' table, which links the ingredient, measurement and
recipe tables and contains:
recipe ID
Quantity
Measurement ID
Ingredient ID

Do I need to create list tables to link every other set of tables up
the hierarchy?
How do other systems deal with hierarchies?
Can you ?

Thanks you for your .

Hugo

  Réponse avec citation
Vieux 19/10/2007, 15h01   #2
Captain Paralytic
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Dealing with hierarchies - A novices question.

On 19 Oct, 13:54, h...@laterooms.com wrote:
> Hello,
>
> I've been designing a schema for a web app that will allow users to
> create a weekly meal plan and shopping list.
>
> At the heart of the design is the model for recipe data.
>
> I currently have a hierarchy of:
>
> Menu eg. Mozzarella Salad, Beef Casserole , Apple Flan w. Raspberry
> cream.
> Meal eg. Apple Flan w. raspberry cream
> Dish eg Apple Flan
> Recipe - eg pastry case, apple sauce, topping
> Ingredient - eg flour
>
> At the lowest level - ingredient, I also have:
>
> Measurement
> Method
> Equipment tables
>
> My question is, how do I connect these tables? I've created an
> 'ingredient list' table, which links the ingredient, measurement and
> recipe tables and contains:
> recipe ID
> Quantity
> Measurement ID
> Ingredient ID
>
> Do I need to create list tables to link every other set of tables up
> the hierarchy?
> How do other systems deal with hierarchies?
> Can you ?
>
> Thanks you for your .
>
> Hugo


http://del.icio.us/Captain_Paralytic/hierarchical

  Réponse avec citation
Vieux 19/10/2007, 15h37   #3
hugo@laterooms.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Dealing with hierarchies - A novices question.

On Oct 19, 2:01 pm, Captain Paralytic <paul_laut...@yahoo.com> wrote:
> On 19 Oct, 13:54, h...@laterooms.com wrote:
>
>
>
> > Hello,

>
> > I've been designing a schema for a web app that will allow users to
> > create a weekly meal plan and shopping list.

>
> > At the heart of the design is the model for recipe data.

>
> > I currently have a hierarchy of:

>
> > Menu eg. Mozzarella Salad, Beef Casserole , Apple Flan w. Raspberry
> > cream.
> > Meal eg. Apple Flan w. raspberry cream
> > Dish eg Apple Flan
> > Recipe - eg pastry case, apple sauce, topping
> > Ingredient - eg flour

>
> > At the lowest level - ingredient, I also have:

>
> > Measurement
> > Method
> > Equipment tables

>
> > My question is, how do I connect these tables? I've created an
> > 'ingredient list' table, which links the ingredient, measurement and
> > recipe tables and contains:
> > recipe ID
> > Quantity
> > Measurement ID
> > Ingredient ID

>
> > Do I need to create list tables to link every other set of tables up
> > the hierarchy?
> > How do other systems deal with hierarchies?
> > Can you ?

>
> > Thanks you for your .

>
> > Hugo

>
> http://del.icio.us/Captain_Paralytic/hierarchical


Thank you for that, it's really interesting, and is making me question
whether what I'm trying to do is actually to create a hierarchy...

I think that the hierarchies I will be creating will be so varied they
would almost be considered dynamic.

For example

I can have a menu of meal 1, meal 2, meal 3. and another menu of meal
4, meal 5, meal 6. but we can also have a menu of meal 1, meal 4 and
meal 3.

So should I be looking at relating the tables rather than looking at
storing the information hierarchically?

Thanks again for your .

Cheers,

Hugo

  Réponse avec citation
Vieux 19/10/2007, 15h43   #4
lark
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Dealing with hierarchies - A novices question.

== Quote from hugo ( hugo@laterooms.com)'s article
> On Oct 19, 2:01 pm, Captain Paralytic <paul_laut...@yahoo.com> wrote:
> > On 19 Oct, 13:54, h...@laterooms.com wrote:
> >
> >
> >
> > > Hello,

> >
> > > I've been designing a schema for a web app that will allow users to
> > > create a weekly meal plan and shopping list.

> >
> > > At the heart of the design is the model for recipe data.

> >
> > > I currently have a hierarchy of:

> >
> > > Menu eg. Mozzarella Salad, Beef Casserole , Apple Flan w. Raspberry
> > > cream.
> > > Meal eg. Apple Flan w. raspberry cream
> > > Dish eg Apple Flan
> > > Recipe - eg pastry case, apple sauce, topping
> > > Ingredient - eg flour

> >
> > > At the lowest level - ingredient, I also have:

> >
> > > Measurement
> > > Method
> > > Equipment tables

> >
> > > My question is, how do I connect these tables? I've created an
> > > 'ingredient list' table, which links the ingredient, measurement and
> > > recipe tables and contains:
> > > recipe ID
> > > Quantity
> > > Measurement ID
> > > Ingredient ID

> >
> > > Do I need to create list tables to link every other set of tables up
> > > the hierarchy?
> > > How do other systems deal with hierarchies?
> > > Can you ?

> >
> > > Thanks you for your .

> >
> > > Hugo

> >
> > http://del.icio.us/Captain_Paralytic/hierarchical

> Thank you for that, it's really interesting, and is making me question
> whether what I'm trying to do is actually to create a hierarchy...
> I think that the hierarchies I will be creating will be so varied they
> would almost be considered dynamic.
> For example
> I can have a menu of meal 1, meal 2, meal 3. and another menu of meal
> 4, meal 5, meal 6. but we can also have a menu of meal 1, meal 4 and
> meal 3.
> So should I be looking at relating the tables rather than looking at
> storing the information hierarchically?
> Thanks again for your .
> Cheers,
> Hugo


sounds like you need to be looking at relating the tables. if you do this right,
then you'd be able to create meals dynamically and you wouldn't be limited to any
structures.

--
POST BY: lark with PHP News Reader ;o)
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 01h10.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,11751 seconds with 12 queries