Re: Re: Normalization is always good? - Mailing list pgsql-sql

From Josh Berkus
Subject Re: Re: Normalization is always good?
Date
Msg-id web-25728@davinci.ethosmedia.com
Whole thread Raw
In response to Re: Normalization is always good?  (jkakar@expressus.com)
List 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
informationtechnology      josh@agliodbs.com  and data management solutions       (415) 565-7293 for law firms, small
businesses       fax 621-2533   and non-profit organizations.      San Francisco
 


pgsql-sql by date:

Previous
From: Christof Glaser
Date:
Subject: Re: Re: Normalization is always good?
Next
From: Richard H
Date:
Subject: Re: List Concatination