On Mon, Mar 27, 2006 at 05:08:58PM -0800, Ricebot wrote:
> Wait, nm,
>
> no need for uid_bridge in recipes
Sure there is. If one recipe can contain several ingredients and an
ingredient can be in more than one recipe, you need that join table :)
Cheers,
D (who isn't going to try to design a coo
Wait, nm,
no need for uid_bridge in recipes
---(end of broadcast)---
TIP 6: explain analyze is your friend
Solution
CREATE TABLE ingredients
(
uid integer,
... -- nutritional info
)
CREATE TABLE recipes
(
uid integer,
uid_bridge integer -- uids in bridge table
)
CREATE TABLE bridge
(
uid integer,
uid_ingredients integer -- uids in table ingredients
)
rows in recipes table can
Hi,
I'm looking at a very simple database that contains a table
of recipes and a table of ingredients with nutritional content.
I'd defined the schema as such
CREATE TABLE ingredients
(
uid integer,
... -- nutritional info
)
CREATE TABLE recipes
(
uid integer,
ingredients inte