Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: [GENERAL] postgresql table inheritance

From: Gregory Stark <stark(at)enterprisedb.com>
Date: Fri Nov 30 2007 - 11:06:38 EST

"Lincoln Yeoh" <lyeoh@pop.jaring.my> writes:

> The correct way to store types and subtypes in the database is to store them
> in the columns. In other words, choose attribute VALUES from a TYPE SYSTEM.
> Nothing else in the relational model needs to be changed. Something like
> this, in hypothetical SQL-like language:

That's what we call "denormalized" data in the database world. This is why there's such a big impedance mismatch between procedural languages and relational databases.

The natural place to end up in his world would be to have every table have precisely one column which is some kind of object. Then you access fields and methods on those objects.

The problem is that then you don't have a relational database since it's awfully hard to tell the database you have a foreign key from whatever this method returns here to whatever that method returns there for some record somewhere... And it's awfully hard to index and join between complex expressions picking data out from inside objects on both sides, etc.

-- 
  Gregory Stark
  EnterpriseDB          
http://www.enterprisedb.com
  Ask me about EnterpriseDB's PostGIS support!

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster
Received on Fri Nov 30 11:09:20 2007

This archive was generated by hypermail 2.1.8 : Mon Jun 16 2008 - 21:00:56 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library