I must develop a database for inputting information of the produced volume (hourly), quality and technical issues during this production. As the input of the production volume is made manually, the user must indicate for each time interval how many parts were produced (for instance from "6 a.m. to 7 a.m."). This time intervals are configured by an ADM user, who also indicates the speed of the production line (time/part) and the pauses programmed during the day. The points I just can't figure out how to do are:

  1. Should I save this time interval at the database, such as "start time:6 a.m. | end time: 7 a.m." ? Or use just like a string "Time interval: 6 a.m. - 7 a.m." ?

  2. When the line has broken down for example at 6:45 a.m. and the problem was solved only at 7:30 a.m., when inputting the production volume from 6-7 a.m. the user must indicate 15 minutes of lost due to line break down, and from 7-8 a.m. 30 minutes of production losses. The problem here is that I must be able to know that both losses were only one event, and not two separated ones.

If anyone have any tip for me, I would really appreciate. :)

Best regards!

closed as too broad by mustaccio, LowlyDBA, MDCCL, Colin 't Hart, Vérace Apr 14 at 20:57

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.