Re: Database theory (was Re: one-to-one) - Mailing list pgsql-novice

From Josh Berkus
Subject Re: Database theory (was Re: one-to-one)
Date
Msg-id 200308211821.39106.josh@agliodbs.com
Whole thread Raw
In response to one-to-one  (Michael Grant <soft@bdanube.com>)
List pgsql-novice
Ron,

> God bless you, Tiny Tim!  I had a similar discussion on [general]
> last week regarding arrays.

<grin>  sure.  Although arrays can be atomic and thus properly relational; it
just depends on how they are used.   Examples:

array of ordered molicules making up a genome: atomic & relational

array of points making up a graph:  atomic & relational

array of languages spoken by a salesperson:  non-atomic, non-relational

array of products offered by a supplier: non-atomic, non-relational

The real question to ask oneself when using an array data type is: "is the
data I am representing an ordered set which does not have meaning as
individual elements, and does not have the same meaning in a different
order?"  If the answer is yes, then please use an array.  If the answer is
no, then you should be using a related "child" table instead.

--
-Josh Berkus
 Aglio Database Solutions
 San Francisco


pgsql-novice by date:

Previous
From: Michael Grant
Date:
Subject: Re: one-to-one
Next
From: Josh Berkus
Date:
Subject: Re: one-to-one