Modeling Time Series Data Columns vs Rows

I have two ideas as to how to model time series data for check in, check out times, however I don’t quite understand the performance/design implications of doing one over. I would be interested in understanding what Backendless considers as best practice.

User has a -> LoggedTimes(Table)
which is designed as such:

check_in | check_out | location               | hours_worked 
datetime | datetime   | dataObjRelation  | 5hrs   

where check_out and hours_worked would be null upon check_in(creation), and multiple checkin/outs can be made a day. I like this method because it aggregates your values in one row and calculates your hours worked upon check out, and is readable format.

However an alternative proposed is:
User !not have -> LoggedTime but instead it is a giant table connected to an Organization or Location

time        | event_type         | location
datetime | dataObjRelation | dataObjRelation

I consider this to be less descriptive due to the event type relation, and can quickly fill the table due to each event generating a new row. And would require a new table for hours worked.

What are your thoughts?

Hi, Ersin!

In most cases the most easy-to-read method is preferable since the performance is quite good anyway.
If you don’t reach your performance limit then it looks like the first method is a better fit for you.

Sounds good, thanks Anatolii.