Re: Q: data modeling with inheritance

From: David Fetter <david(at)fetter(dot)org>
To: Reece Hart <reece(at)harts(dot)net>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Q: data modeling with inheritance
Date: 2009-07-04 01:23:03
Message-ID: 20090704012303.GE17450@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Jul 03, 2009 at 05:37:20PM -0700, Reece Hart wrote:
> On Fri, 2009-07-03 at 11:29 -0700, David Fetter wrote:
>
> > I'm missing what you're doing here that foreign keys don't cover.
> > Could you send along your DDL?
>
> No DDL yet... I'm just in the thinking stages. FKs technically would
> do it, but would become unwieldy. The intention was to have
> subclasses of each of the variant, association, and phenotype
> tables. That leads to the polymorphic key problem.

How many (order of magnitude) are we talking about here?

> > Just generally, I've only found table inheritance useful for
> > partitioning. "Polymorphic" foreign key constraints can be
> > handled other ways such as the one sketched out below.
>
> That answers the question -- I do want polymorphic foreign keys.
> Dang.

It solved some real-world problems I had at the time, mostly from the
game space. My biology is a little rusty :/

Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Roseller A. Romanos 2009-07-04 04:02:58 Pls help
Previous Message Reece Hart 2009-07-04 00:51:19 Re: Q: data modeling with inheritance