I'm trying to design a drink database and need some help with the design.
I created the following tables: an ingredients table that lists all possible ingredients (i.e. rum, coke, vodka and orange juice). A drinks table with a list of all possible drinks (i.e. "rum & coke", "screwdriver"). Finally a Recipes tables describes how to make the drink, so for "rum & coke" there are two entires one with the ingredients ID for rum and one for ingredients ID for coke both with a foreign key to the same drink id.
What I want to do is given a list of available ingredients id - 1(rum), 2(coke) and 3(vodka) I want to come up with a list of drinks that are possible to make. So I can make rum & coke but not a screw driver because I don't have orange juice.
Any suggestions on how to write such a select statement or how to better design the tables?
Thanks