Search Postgresql Archives

Data model question regarding usage of arrays.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux