Re: Searching array fields - or should I redesign? - Mailing list pgsql-general

From Vincent Veyron
Subject Re: Searching array fields - or should I redesign?
Date
Msg-id 1292543562.2397.66.camel@asus-1001PX.home
Whole thread Raw
In response to Re: Searching array fields - or should I redesign?  (Bryan Montgomery <monty@english.net>)
List pgsql-general
Le jeudi 16 décembre 2010 à 15:18 -0500, Bryan Montgomery a écrit :
> Thanks for the comments. Just to clarify, I gave these two values as
> examples. The readings could be between a handful for one vehicle type
> up to 40 or more for another type of vehicle.
>

Not sure what you call a reading? do you mean like a parameter? if so
give it its own column with an appropriate type. Your table would then
have 40 columns, some of them being empty for some type of vehicle.

If a reading really is a record, then you want a subclass, with a
foreign key referencing the primary key of your vehicle table. You can
then have un unlimited number of records (again, each record having a
column for each of the parameters/characteristics measured) .


--
Vincent Veyron
http://marica.fr/
Progiciel de gestion des dossiers de contentieux et d'assurance pour le service juridique


pgsql-general by date:

Previous
From: Alex Hunsaker
Date:
Subject: Re: Plperl caching prepared queries and cleanup
Next
From: "Edmundo Robles L."
Date:
Subject: PANIC: ERRORDATA_STACK_SIZE exceeded