Please replace Polyhedra with PostgreSQL in the last paragraph of my previous mail. Sorry for the inconvenience.
Sagar.
-----Original Message-----
From: Vidyasagara Guntaka
Sent: Monday, September 20, 2004 3:44 PM
To: jao@geophile.com; Thomas F.O'Connell
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Any reason not to use inheritance?
I thought that this would be useful to this mailing list:
Our company uses Polyhedra in memory database for storing our object model. We have roughly around 250 C++ classes
thatneed to be persisted. The object model is very complicated involving inheritance hierarchies, associations and
aggregations(all kinds of relations that are defined using UML). Polyhedra does not confirm to SQL95 standards but, it
hasgood support for inheritance.
Some time ago I was working on to replace Polyhedra in our product with PostgreSQL. Though PostgreSQL does not support
automaticallypropagating constraints, uniqueness of indexes etc to derived tables, I could achieve same functionality
bysetting up alter table statements and triggers.
It will be definitely good if Polyhedra directly supports inheriting constraints. It will make mapping the C++/Java
objectsmodels into PostgreSQL schema much easier.
Regards,
Sagar.
-----Original Message-----
From: jao@geophile.com [mailto:jao@geophile.com]
Sent: Monday, September 20, 2004 3:16 PM
To: Thomas F.O'Connell
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Any reason not to use inheritance?
Quoting "Thomas F.O'Connell" <tfo@sitening.com>:
> Just beware that inheritance is not a complete methodology in postgres.
> The implementation has limitations. For instance, indexes in parent
> tables will not be inherited by children.
>
> I've yet to encounter a scenario that actually required inheritance.
> I've used it a few times, but when I have, the end result always
> required a bit more work because of the incomplete aspects of the
> postgres implementation (namely constraints and indexes).
Could you expand on this?
All indexes and constraints would be declared on the child tables.
Nearly all table reference would be to the child tables. (So why use
inheritance at all? If for no other reason, all the common
columns would be declared in one place.)
Jack Orenstein
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?
http://archives.postgresql.org