pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: jkakar@expressus.com, Josh Berkus <josh@agliodbs.com>
Cc: sqllist <pgsql-sql@postgresql.org>
Subject: Re: Re: Normalization is always good?
Date: Thu, 15 Mar 2001 20:18:52 -0800
Message-ID: <web-25728@davinci.ethosmedia.com> (raw)
In-Reply-To: <20010315152819.B18169@expressus.com>

Jamu,

> Polymorphic sub-tables? =) Do you mean using, for example, one user
> table that stores different types of users and has some fields
> specific to only some kinds of users and other fields that are shared
> by all users?

Nope.  What you described is a "not normalized" table.  ;-)

One project contains a Notes table.  However, I want it to be
configurable to what records notes apply ... that is, my application has
an admin option that allows you to configure the system so that there
are or aren't Notes for Client Addresses, for example.

TO do this, I created a sequence that is generally available
('universal_sq'), and set 7-9 tables to automatically increment a value
from the 'universal_sq' (column 'usq') for each record.

The Notes table, thus, effectively has the 'usq' as a foriegn key for 2
to 7 other tables, depending on user configuration.  The wonderful
PostgreSQL sequence handler makes this possible.  Thanks, Tom & team!

I've done this with a couple of other tables.  Not relationally correct,
but I can't find anything wrong with the idea.

> Couldn't find the server... I wonder if it's still there.

I believe that Christof posted the correct URL.

-Josh Berkus

______AGLIO DATABASE SOLUTIONS___________________________
                                       Josh Berkus
  Complete information technology      josh@agliodbs.com
   and data management solutions       (415) 565-7293
  for law firms, small businesses        fax 621-2533
    and non-profit organizations.      San Francisco



view thread (4+ messages)

Message-ID: <web-25728@davinci.ethosmedia.com>
Permalink:  ../web-25728@davinci.ethosmedia.com/
Also on:    postgresql.org/message-id/web-25728@davinci.ethosmedia.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: josh@agliodbs.com
  Subject: Re: Normalization is always good?
  In-Reply-To: <web-25728@davinci.ethosmedia.com>
  References: <20010315152819.B18169@expressus.com> <web-25728@davinci.ethosmedia.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox