Information générale
Catégorie:
Programmation Orientée Object
>>>The meter reading is identifyed by the AssetId field. All tables that relate to equipment use the AssetId field as the relation. I have a seperate meter reading table that has the AssetId and date and the meter reading for each time the meters are read.
>>>
>>>Are you saying that I could have a seperate field for meter adjustments in the equipment table and that I add or subtract (as needed) the value in the meter adjustment field??? Sounds good to me as I think about it. So if the meter adjustment field is 0 (ie. the meter has never been replaced) the calculations do nothing... If there is a value there then if I need total hours I add that value to the current reading... What do you think?
>>>
>>>Thanks
>>
>>That sounds fine - as long as you allow for more than one "breakage" some how if necessary.
>>My point was essentially that when things get complex like this, as they always do in real life, a simple table structure rarely copes - a separate date/time-based table for the meters themselves will give you a basis for doing more accurate calculations, and give you a history of your meters.
>>Regards
>
>Hi David,
>
>I don't think that I understand what you mean by a separate date/time based table for the meters? Can you re-describe that? I have a table that records each time the meter is read along with the date/time of the reading.
>
>Thanks
Oh - I just meant a table like:
Meterid
Location
DatetimeInstalled
Startreading
Endreading
DatetimeRemoved
where meterid and location form the primary key. So a meter could be re-used after servicing perhaps.
depends on whether you need this sort of info and how it fits in with your data model.
HTH
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement