Re: Arrays and "goodness" in RDBMSs (was Re: join of array) - Mailing list pgsql-general

From Matthew D. Fuller
Subject Re: Arrays and "goodness" in RDBMSs (was Re: join of array)
Date
Msg-id 20030817054854.GD51860@over-yonder.net
Whole thread Raw
In response to Re: Arrays and "goodness" in RDBMSs (was Re: join of array)  ("Andrew L. Gould" <algould@datawok.com>)
List pgsql-general
On Fri, Aug 15, 2003 at 01:37:50PM -0500 I heard the voice of
Andrew L. Gould, and lo! it spake thus:
> On Friday 15 August 2003 01:13 pm, Ron Johnson wrote:
> >
> > Why are arrays even mentioned in the the same breath wrt relations
> > DBMSs?  Aren't they an anathema to all we know and love?
>
> This gives rise to a couple of good questions:
>
> When and why would you want to use arrays instead of a relational model?

When it's appropriate    8-}

I've found it to be extremely rare, but it DOES happen.  For instance, in
one project, I needed a bit of data in a record, which could store
between 1 and 7 (integer) values in it.  Never less than 1, never more
than 7, and the ordering of them was essential to preserve.  I *COULD* do
it in another table, with an order column (which would have to be
maintained 'manually' in the code), and, if one were neurotic, a seperate
constraint to keep from somehow getting too many records for each item in
the other table....  but it was far easier to just slap it in an array.

Now, any time ordering isn't important, OR a field can grow without
realistic bounds, arrays naturally aren't important.  For instance, if
I'd needed 15 entries, I might well have gone ahead and referenced
another table, just because it would get too irritating dealing with the
arrays.



--
Matthew Fuller     (MF4839)   |  fullermd@over-yonder.net
Systems/Network Administrator |  http://www.over-yonder.net/~fullermd/

"The only reason I'm burning my candle at both ends, is because I
      haven't figured out how to light the middle yet"

pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: PostgreSQL
Next
From: Gianni Mariani
Date:
Subject: Database modelling question for version management of data