Re: Data model question regarding usage of arrays.

Поиск
Список
Период
Сортировка
От Ricebot
Тема Re: Data model question regarding usage of arrays.
Дата
Msg-id 1143507957.734467.324970@v46g2000cwv.googlegroups.com
обсуждение исходный текст
Ответ на Data model question regarding usage of arrays.  ("Ricebot" <test985@hotmail.com>)
Ответы Re: Data model question regarding usage of arrays.  ("Ricebot" <test985@hotmail.com>)
Список pgsql-general
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 be unique for each recipe, rows in
bridge table are a row per recipe per ingredient in that recipe.


В списке pgsql-general по дате отправления:

Предыдущее
От: Douglas McNaught
Дата:
Сообщение: Re: FAQ 1.1
Следующее
От: "Ricebot"
Дата:
Сообщение: Re: Data model question regarding usage of arrays.