inheritance

From: Udo Zubel <mariorr88(at)yahoo(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: inheritance
Date: 2006-12-19 10:20:35
Message-ID: 20061219102035.56803.qmail@web26002.mail.ukl.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Lars Heidieker 2006-12-19 10:22:10 Re: Stored Procedure and Trigger they puzzle me
Previous Message Oleg Bartunov 2006-12-19 10:13:16 Re: Let's play bash the search engine