SQL and Normalization
It's a design decision that I'd like some advice with really. I'm
attempting to record employees' staff breaks. Also, employees may take
many breaks in any one given day. What tactics should I employ?
My thoughts originally were an employee may take many breaks and a single
break would be for one employee. One to many.
However, it's also possible (in theory) for an employee to take many
breaks and a single break being taken by many employees - many-to-many.
For instance John and Fred take a break at 12.00pm say and return at
1.00pm.
We get down to splitting hairs though with me inclined to go for the
one-to-many. For instance John goes on a break at 12.01pm say, Fred leaves
at 12.00pm with them both returning at different time slots, 1.05pm and
1.03pm say.
Can you offer some good database design practices for this type of
scenario? Ideas in pictures below:
many to many one to many
No comments:
Post a Comment