Re: A form of inheritance with PostgreSQL
От | Richard Broersma Jr |
---|---|
Тема | Re: A form of inheritance with PostgreSQL |
Дата | |
Msg-id | 956922.95469.qm@web31812.mail.mud.yahoo.com обсуждение исходный текст |
Ответ на | A form of inheritance with PostgreSQL (Greg Toombs <greg.toombs@bluebottle.com>) |
Список | 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 по дате отправления: