datetime - What to use as foreign key if no match in the other table - MySQL -


I am working on the presence / overtime module for a scheduled web app. The idea is that there is a table in the change MySQL, each shift has a start and end time, the manager will select a change and an entry in the attendance table, specifying that the employee was left early / late / / Overtime had worked The entry in the presence table is important for Shift ID # (which is just an enumerated key).

But if someone stops in their day, what is a good system to use for those keys? Ccan I set up a conditional calculation? And how do I avoid the risk of overlap with a change ID? Adding overtime changes back to the original schedule DB is not an option.

Like your previous question, if there is no data, then NULL is appropriate. In this case, the work is not related to any particular change, so what can you do there? And then the situation should be shown to it.


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -