Re: Re: Normalization is always good?

From: "Josh Berkus" <josh(at)agliodbs(dot)com>
To: jkakar(at)expressus(dot)com, Josh Berkus <josh(at)agliodbs(dot)com>
Cc: sqllist <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Re: Normalization is always good?
Date: 2001-03-16 04:18:52
Message-ID: web-25728@davinci.ethosmedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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(at)agliodbs(dot)com
and data management solutions (415) 565-7293
for law firms, small businesses fax 621-2533
and non-profit organizations. San Francisco

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Roberto Mello 2001-03-16 08:23:20 Re: [SQL] Contribute to the PL/pgSQL CookBook !!
Previous Message yves 2001-03-16 01:28:46 Re: Re: [SQL] Re: why the DB file size does not reduce when 'delete'the data in DB?