Best way to store date in a CDM (Conceptual Data Model)?

63 views Asked by At

I'm currently retrieving data from a vehicle fleet (fuel used, distance traveled...) through the manufacturer API. For each set of data, there is the date when the metric has been mesured. I will retrieve the data everyday through a rcon call and store it in my DB. The purpose is to keep the history for each vehicle so that I could get every metrics mesured for a vehicle between X date and X date later on.

I first thought of this : enter image description here

But it doesn't seem right because of the "1,1" cardinality, so i transformed the 3 way relationship into 2 normal relationship : enter image description here

At this point i wondered wether i could not simply store the field date in the metric entity (because I noticed the API would give me a datetime, so it's very unlikely that two metrics will be mesured at the same time): enter image description here

And finally, i was wondering if putting everything in a data entity would not even be easier (but it feels kinda wrong): enter image description here

So i'm completely lost as to what would be the best way to do this. Could someone tell me which way is the best or even if there is a better way and why ?

0

There are 0 answers