I would like suggestions/feedback on how you would handle this kind of data situation.
I have a jury management program that calculates the pay a juror is due. However, people who are public employees do not get paid for jury service because the public employers are required to allow employees to serve and must pay them, so the court does not. But if you are a public employee serving jury duty and you are at the court outside of your normal working hours then you DO get paid.
I'll be our example. I work from 7 am - 4 pm everyday. If I get called for jury service and I'm there:
Day 1: 3:30 pm - 5:30 pm (pay from 4:00 pm - 5:30 pm)
Day 2: 9:00 am - 11:00 am
Day 3: 2:00 pm - 7:00 pm (pay from 4:00 pm - 7:00 pm)
I would get a check for 4.5 hours that I worked on my own time.
Now this works well for those that work M-F 8 hour days. I run into real problems with firefighters and other emergency personnel. Let's say the fireman works two days on and two days off. Or someone who works from 8:00 pm - 5:00 am. or a weekend shift Saturday - Thursday. If they get called in on a Friday, they should get paid for all hours.
How would you structure the data?
I've thought of something like:
Or maybe have the day of week and indicate if they work:
Any other ideas/suggestions?
Thanks!
Leslie
Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual
Essential reading for database developers:
The Fundamentals of Relational Database Design
Understanding SQL Joins
I have a jury management program that calculates the pay a juror is due. However, people who are public employees do not get paid for jury service because the public employers are required to allow employees to serve and must pay them, so the court does not. But if you are a public employee serving jury duty and you are at the court outside of your normal working hours then you DO get paid.
I'll be our example. I work from 7 am - 4 pm everyday. If I get called for jury service and I'm there:
Day 1: 3:30 pm - 5:30 pm (pay from 4:00 pm - 5:30 pm)
Day 2: 9:00 am - 11:00 am
Day 3: 2:00 pm - 7:00 pm (pay from 4:00 pm - 7:00 pm)
I would get a check for 4.5 hours that I worked on my own time.
Now this works well for those that work M-F 8 hour days. I run into real problems with firefighters and other emergency personnel. Let's say the fireman works two days on and two days off. Or someone who works from 8:00 pm - 5:00 am. or a weekend shift Saturday - Thursday. If they get called in on a Friday, they should get paid for all hours.
How would you structure the data?
I've thought of something like:
Code:
DaysOfWork
MoTuWeThFr
Or maybe have the day of week and indicate if they work:
Code:
Mon Tue Wed Thur Fri Sat Sun
Y Y Y Y N N Y
Any other ideas/suggestions?
Thanks!
Leslie
Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual
Essential reading for database developers:
The Fundamentals of Relational Database Design
Understanding SQL Joins