Well, the standard answer is DEPENDS.
I would go with the one record that contains IN/Out time.
Here are some of the DEPENDS???
1. At the point of capture, what information are you getting?
ID#, Job Number, TimeStamp, Time Indicator (In vs Out)
2. If the In time was not entered can both In and Out be entered at data collection point, or does part of the information have to come after the fact with a different entry?
3. What, if any, edit checking can be done at data collection point?
You must be able to link the records at entry time, else your wide open for all kinds of errors.
Like what if I did not clock out at 5pm and had to consecutive 8AM entries for continues days? Did I work 24 hours or am I missing an entry?
With the single record per task (In and Out), if I am missing one, it is easier to correct errors after the fact.
A thought -( I’ve seen both ways and think the one row per event is better. ) – how many in/out combinations will
be allowed per row? ANd you will need a date/time column for each event (for each in and for each out). I suggest the one row per event approach.
I would also go with the one transaction type entry per row (i.e., transaction_datetime, transaction_type [in/out], person_id). When a person checks in, write a new row. When they check out, write a new row.
As noted, there are many opportunities for missed entries/exits. One transaction per row allows recording two (or more) successive transactions of the same type (in or out), and (IMHO) it is easier to write business logic to infer missing records than trying to reconcile bad data once written into a record.
The other advantage is that the transaction recording is much shorter and simpler: “insert into …” suffices. With in+out fields in the same row, the recording transaction needs to check for and handle a variety of conditions: no existing record with an “in” but no “out”; record with “in” but no “out” exists, but the “in” date is earlier than a subsequent “in” record, etc.
I prefer to keep the data recording transactions short, simple, and trouble-free.