The organization database


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
7 views
Probably similar question was already asked, but do not know how to look.

Decided to make a database for cocktails.
The idea is very simple:
Sign A — the name of the cocktail, the text of the recipe, probably picture.
Plate B — ingredient, probably a picture, perhaps description

And another plate, which allows for each cocktail to watch all the cocktail ingredients and their quantity.
Accordingly, there is a problem — how to store for a cocktail all his ingredients with the quantities.

That is, the cocktail: ingredient 1: n1 ml ингридиент2: n2 ml...

Implement while going on PostпresSQL, but if the choice is bad, then tell me what is better and I'll change my mind.
Shell I write in Java, I would like to use SpringRoo to...

Thank you very much for your attention.
by | 7 views

1 Answer

0 like 0 dislike
Depends on the congestion of the resource.
\r
— If to a couple thousand visitors a day, then You need the "classic" version:
+ Table "Cocktails": id, title, link, image, description.
+ Table "Ingredients": id, title, link, image, description.
+ Table Details: id, id_коктеля, id_индигриента, number.
\r
— If the load is more than in the first case, suggest, or actively use caching (if possible) or to the first option to add a table of intermediate results (e.g., with serialized samples in ingredients or even complete data for actelem) and create functions forming them.
by
110,608 questions
257,186 answers
0 comments
28,074 users