From: | Andy Colson <andy(at)squeakycode(dot)net> |
---|---|
To: | Damir Dezeljin <damir(dot)dezeljin(at)dezo(dot)org>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Designing a DB for storing biological data |
Date: | 2014-06-15 15:31:46 |
Message-ID: | 539DBC62.6040409@squeakycode.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 06/14/2014 10:52 AM, Damir Dezeljin wrote:
> Hello.
>
<SNIP>
>
> *Finally, here is my dilemma* I am somewhat undecided what is the
> best way to implement the database and consequently what kind of
> queries to use. At above link a database model I am currently working
> on can be found. Looking to the diagram it becomes evident I am
> deciding if storing every measurement / determinant / depth triple as
> a separate record. The biggest dilemma I have is a query for a simple
> sample of pressure, temperature, salinity and oxygen would imply
> multiple joins. As far as I know, this will badly affect the
> performance; as well, it will harden codding the RESTful interface.
>
> Thanks and best regards, Damir
>
Normalizing the data into multiple tables ensures correctness. Worry about being correct before you worry about performance. Don't worry about multiple joins being slow, databases are designed to be fast with small tables with lots of rows and joining them together.
Correctness first. Don't worry about join performance, its fast.
-Andy
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce McAlister | 2014-06-16 12:56:23 | out of memory errors |
Previous Message | Mimiko | 2014-06-15 13:23:36 | Creating only static libpg libraries. |