Re: [SQL] arrays

From: Stephen Davies <scldad(at)sdc(dot)com(dot)au>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-sql(at)postgreSQL(dot)org, Marcin Mazurek - Multinet SA - Poznan <m(dot)mazurek(at)multinet(dot)pl>
Subject: Re: [SQL] arrays
Date: 1999-12-04 09:31:58
Message-ID: 199912040931.UAA01301@mustang.sdc.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Arrays do have a role in life: even in a "proper relational" world.

The classical examples are publications with multiple authors, ISBns,
subjects, keywords etc.

Trying to fully normalise attributes like these leads to nonsensical and
unusable database designs.

Cheers,
Stephen.

Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> Don't use arrays. They look very promising but they aren't. Most of these
> kind of questions can be resolved by designing a proper relational
> database schema.
>
> On 1999-12-01, Marcin Mazurek - Multinet SA - Poznan mentioned:
>
> > Hi,
> > I have a table: orders (id int, val INT4[][]);. The question is how to
> > select in separate rows values from particular id?
> >
> > example:
> > insert into orders values(1,'{{1,1},{1,4},{2,3}}');
> > select val from orders where id=1; gives me:
> > val
> > -------------------
> > {{1,2},{1,4},{2,3}}
> >
> > How can I make from it to columned table with first and second int
> > separated?
> >
> > mazek
> >
> >
> >
> > ************
> >
> >
>
> --
> Peter Eisentraut Sernanders väg 10:115
> peter_e(at)gmx(dot)net 75262 Uppsala
> http://yi.org/peter-e/ Sweden
>
>
>
> ************

--
========================================================================
Stephen Davies Consulting scldad(at)sdc(dot)com(dot)au
Adelaide, South Australia. Voice: 08-8177 1595
Computing & Network solutions. Fax: 08-8177 0133

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message John M. Flinchbaugh 1999-12-04 14:02:13 Re: [SQL] arrays
Previous Message Peter Eisentraut 1999-12-04 02:23:30 Re: [SQL] arrays