Re: A form of inheritance with PostgreSQL - Mailing list pgsql-sql

From Richard Broersma Jr
Subject Re: A form of inheritance with PostgreSQL
Date
Msg-id 956922.95469.qm@web31812.mail.mud.yahoo.com
Whole thread Raw
In response to A form of inheritance with PostgreSQL  (Greg Toombs <greg.toombs@bluebottle.com>)
List 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.



pgsql-sql by date:

Previous
From: Richard Huxton
Date:
Subject: Re: A form of inheritance with PostgreSQL
Next
From: chester c young
Date:
Subject: Re: inheritance