Re: Question concerning arrays

From: Jorge Godoy <jgodoy(at)gmail(dot)com>
To: "Christian Rengstl" <Christian(dot)Rengstl(at)klinik(dot)uni-regensburg(dot)de>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Question concerning arrays
Date: 2006-06-27 12:53:03
Message-ID: 87sllqvjyo.fsf@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Christian Rengstl" <Christian(dot)Rengstl(at)klinik(dot)uni-regensburg(dot)de> writes:

> i am in the middle of breaking my head over designing a database and came to
> the following question/problem: i have persons whose values (integer) have to
> be entered in the db, but per person the amount of values ranges from 10 to
> around 50. Now my question is if it makes sense, concerning performance, to
> store these integer values in arrays or if it is better to change the design
> so that the values are stored separately in fields in tables. I have to add,
> that it is not unlikely (or at least it won't happen very often) that select
> queries will try to find one of those specific values, but rather something
> like select * from persons where person_id=...

When I had a similar problem I decided on using arrays. But in my case I'm
never going to search for individual values for every row -- after retrieving
one row I may look for some specific value, though, but then I already have
it.

I'd also like to know what would be the best design for this when it is needed
to search for individual values...

In my case I had concentration and measured values in the form of key=value
(conc=measured), both numeric and in variable quantities for each specific
test (minimum of 3, maximum of ... I don't know :-)).

--
Jorge Godoy <jgodoy(at)gmail(dot)com>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Franz.Rasper 2006-06-27 13:05:17 Re: RAID + PostgreSQL?
Previous Message dananrg 2006-06-27 12:51:07 Re: Best open source tool for database design / ERDs?