> 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.


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to