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 integer[] -- uids in table ingredients
)
however I am reading that overall the usage of arrays in
data schema is frowned upon.
This seemed the lowest level @ which I could do things.
Is there a higher level SQL concept that would encapsulate
the "many to many" mapping of rows in the recipes table to
rows in the ingredients table?
Thanks,
- Eric