Re: Database about food recipes

From: ^Bart <gabriele1NOSPAM_at_hotmail.com>
Date: Tue, 18 Jun 2019 22:49:37 +0200
Message-ID: <qebip0$19ds$1_at_gioia.aioe.org>


[Quoted] I can give you more informations and with them you'll understand why I think (they are just my thoughts!!!) I don't need other tables!

This database will translate restaurants menu' where you can read recipes and ingredients but obviously you don't have units, etc.!

> table languages:
> lang_id, iso_code, name, local_name

It's ok!

> table units:
> unit_id, name
>
> table units_translation
> unit_id, lang_id, name

I think I don't need them!

> table ingredients:
> ingredient_id, name, needs_translation

[Quoted] This table will be the "master" so I'll put here just ingredients in english language?

> table ingredients_translation:
> ingredient_id, lang_id, name

[Quoted] I connect by FK this table to table ingredients?

> table recipes:
> recipe_id, name, needs_translation
>
> recipes_translation:
> recipe_id, lang_id, name

[Quoted] I think in a menu' you can leave the original version, it could be a good idea to have a translation but... it's quite impossibile to translate it by FK or maybe the restauran't owner could traslate it by himself but I think it's dangerous to enable him...

> recipes_ingredients:
> recipe_id, ingredient_id, amount, unit_id

[Quoted] I think I could link this table to the table ingredients so I could store here just english translation about ingredients and when the end user will select his language I could load a sql query to load them in his own language!

> The needs_translation I have suggested is just a bit, to tell you that
> you need to find the english name for something, as it's important for
> you to have the id and you don't really want to leave it empty (the
> name) so better to have it in Dutch, or Italian till you have figured it
> out what it's in English. Keep in mind same recipe in different
> languages may have different names, not all languages will have
> "pancakes", some may call it letut or pankakor...

[Quoted] I need or better... I think it's the best idea to start from english because everyone can "understand it" and after it every ingredients must be linked to this language, I know there isn't a complete translation of ingredients to english but I think it's more stressful and complicated to start with a local language (for example russian) and find the translation to another local language (for example italian)!

I think it's better to link everything to english!

> A bigger issue would be if pancake would be an ingredient too, then you
> would want to link to the recipe in the ingredient table.

I'll find a solution about it after I'll have a solution for languages! :)

Thanks... or better... THANKS for your replies!!! :)

^Bart Received on Tue Jun 18 2019 - 22:49:37 CEST

Original text of this message