I almost always like to have a single column DB generated primary key...

Seems to make things easier down the track... could still have a  
secondary index on the fields mentioned if that would aid performance.

I don't know your application, but how "fine" are the time stamps  
generated from the system, is there even the remotest possibility that  
two events could occur on the same sensor at the same time in terms of  
the resolution of the equipment measuring the time (seconds,  
milliseconds?)?

Even if not, I would probably still have another DB generated primary  
key column as mentioned above.

Just another 2 cents worth.

Regards
Colin


On 12/06/2008, at 11:42 PM, Chris Stebbing wrote:

> At 06:03 PM 12/06/08, Marcin Bury wrote:
>
>> Chris
>>
>> The answer is ONE table - perfomance is the matter of proper  
>> indexes...
>>
>> I would recommend  create compund primary key for this table -  
>> SENSOR_ID,
>> UNIQUE_COLUMN
>
> Hi Marcin,
>
> thanks for your response.  The current primary key is timestamp,  
> sensor_id but sensorid, timestamp would work just as well and may  
> prove a little better I suspect.
>
> Cheers,
> Chris.
>
> _______________________________________________
> Delphi-DB mailing list
> Delphi-DB@elists.org
> http://lists.elists.org/cgi-bin/mailman/listinfo/delphi-db


#####################################################################################

Attention:

The information in this email and in any attachments is confidential. If you 
are not 
the intended recipient then please do not distribute, copy or use this 
information. 
Please notify us immediately by return email and then delete the message from 
your 
computer. Any views or opinions presented are solely those of the author.

####################################################################################
_______________________________________________
Delphi-DB mailing list
Delphi-DB@elists.org
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi-db

Reply via email to