Answer the question
In order to leave comments, you need to log in
Database organization
Probably a similar question has already been asked, but I do not know how to search correctly.
I decided to make a database of cocktails for myself.
The idea is very simple:
Plate A - the name of the cocktail, the text of the recipe, probably a picture.
Plate B - an ingredient, probably a picture, probably a description
And one more plate that allows you to see all the ingredients and their quantities for each cocktail.
Accordingly, the problem arises - how to properly store all its ingredients with quantities for a cocktail.
That is, a cocktail: ingredient 1: n1 ml, ingredient 2: n2 ml ...
I'm going to implement it on PostpresSQL, but if the choice is bad, then tell me which is better and I'll change my mind.
I write the shell in Java, I would like to use SpringRoo ...
Thank you very much for your attention.
Answer the question
In order to leave comments, you need to log in
Depends on resource overload.
— If up to a couple of thousand visitors a day, then you need a "classic" version:
+ "Cocktails" table: id, title, link to image, description.
+ Table "Ingredients": id, title, link to image, description.
+ Table "Composition": id, cocktail_id, ingredient_id, quantity.
- If the load is greater than in the first case, then I advise you to either actively use caching (if possible), or add a table of intermediate results to the first option (for example, with serialized selections for ingredients or generally complete data for cocktails) and create functions that form them.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question