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
ofrows and joining them together.
Correctness first. Don't worry about join performance, its fast.
-Andy