From: | Richard Broersma Jr <rabroersma(at)yahoo(dot)com> |
---|---|
To: | Greg Toombs <greg(dot)toombs(at)bluebottle(dot)com>, pgsql-sql(at)postgresql(dot)org |
Subject: | Re: A form of inheritance with PostgreSQL |
Date: | 2007-03-08 20:05:05 |
Message-ID: | 956922.95469.qm@web31812.mail.mud.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
> I want to design the foreign key scheme such that there are relationsbetween
> fruit and apple, and fruit and orange, that imply that apple isa fruit,
> and orange is a fruit.
Sometime in the future, you will be able to achieve this beautifully and easily using postgresql's
feature known as table-inheritance. Right now it can already support hierchey between different
types of fruit, however it does not allow for foreign key relationships.
However, I figured out a work-around using seperate a table for each entity of the heirchey. And
then I rolled up these entities using views made update-able with the Postgresql rule system.
Here is a link were I present how it is done.
http://archives.postgresql.org/pgsql-general/2006-12/msg00913.php
Let me know if you have any questions.
Regards,
Richard Broersma Jr.
From | Date | Subject | |
---|---|---|---|
Next Message | chester c young | 2007-03-08 20:25:07 | Re: inheritance |
Previous Message | Richard Huxton | 2007-03-08 19:58:54 | Re: A form of inheritance with PostgreSQL |