Re: How many fields in a table are too many

From: "Mike Mascari" <mascarm(at)mascari(dot)com>
To: "MT" <m_tessier(at)sympatico(dot)ca>, "GENERAL" <pgsql-general(at)postgresql(dot)org>
Subject: Re: How many fields in a table are too many
Date: 2003-06-26 05:02:06
Message-ID: 001101c33ba0$179d5960$0102a8c0@mascari.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> Hi,
>
> Just a quick question, not unrelated to my
> previous question, which I don't think will
> get answered. I have a table with 13 fields.
> Is that too many fields for one table.

Mathematically, a binary relation represents the relevant cross
product of two domains, x and f(x):

squares table:

x f(x)
--------
0 | 0
1 | 1
2 | 4
3 | 9
...

The relational model of data just leverages this along with
predicate logic to guarantee logical consistency and extends the
traditional view of a relation to n-dimensions. So, in your
relation (table), you should have a field which represents the
"x". The "x" should have a unique index associated with it.
After all, it wouldn't make sense in the above example to have
two records for "x". The other non-key fields should represent
the f(x), g(x), h(x). IOW, they should be dependent upon the
key, the whole key, and nothing but the key. If that is not the
case, you have some normalizing to do...

Hope that helps,

Mike Mascari
mascarm(at)mascari(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Kallol Nandi 2003-06-26 05:05:34 Re:
Previous Message Maksim Likharev 2003-06-26 03:45:55 Re: Query plan question