inheritance
От | Udo Zubel |
---|---|
Тема | inheritance |
Дата | |
Msg-id | 20061219102035.56803.qmail@web26002.mail.ukl.yahoo.com обсуждение исходный текст |
Ответы |
Re: inheritance
|
Список | pgsql-general |
Hi Im engineering a PG database with my workmate.
Unfortunately the inheritance feature seems not to be able to solve my problem.
I have a table "order" with an orderID, each order has 1 to n types of articles, like services and supply articles with the same PK.
The PK is order_number and position, the PK must be unique over all article-tables. All articles have 1 to n packages.
I have a table art as the "mother-table". All article-tables inherit the PK and some other columns from that table.
My problem is now that i dont know how i can make the PK on art unique and make a FK from packages to art.
At the moment im thinking about a workaround using triggers, but i wanted to know some other opinions on that matter first.
Thanks in advance,
Mario
NEU: Fragen stellen - Wissen, Meinungen und Erfahrungen teilen. Jetzt auf Yahoo! Clever.
Unfortunately the inheritance feature seems not to be able to solve my problem.
I have a table "order" with an orderID, each order has 1 to n types of articles, like services and supply articles with the same PK.
The PK is order_number and position, the PK must be unique over all article-tables. All articles have 1 to n packages.
I have a table art as the "mother-table". All article-tables inherit the PK and some other columns from that table.
My problem is now that i dont know how i can make the PK on art unique and make a FK from packages to art.
At the moment im thinking about a workaround using triggers, but i wanted to know some other opinions on that matter first.
Thanks in advance,
Mario
NEU: Fragen stellen - Wissen, Meinungen und Erfahrungen teilen. Jetzt auf Yahoo! Clever.
В списке pgsql-general по дате отправления: