M
M
Mikhail Tchervonnko2013-12-03 15:58:34
SQL
Mikhail Tchervonnko, 2013-12-03 15:58:34

How to organize the table structure for scheduling time resources?

Good time of the day!
Next task. It is necessary to plan meetings of employees with clients.
Boundary conditions A certain worker cannot have 2 appointments at the same time.
Just like a client cannot have 2 meetings with other employees at the same time.
(the task is simplified but the essence is about the same)
2 options for organizing the table of temporary resources come to mind.
1. Option in the table 4 fields id of the employee and client and the time of the beginning and end of the meeting.
2. An option in table 3 is the employee and client id fields and the start time of the time cycle, for example, 10 minutes. (if the client made an appointment at 15:00 and wants to continue it for 30 minutes, then 3 records will be written to the table with the time of 15:00, 15:10 and 15:20.
What is the second option for? in order to conveniently organize the choice of free time intervals in the program. For example, a person enters the mask and marks in a row with checkboxes respectively. time intervals. And intervals that are already occupied do not have checkboxes.
In the case of the first option, limiting the visual selection to free time intervals is more difficult (in my opinion).
Perhaps I have not yet come up with a good idea how best to implement such a task. Ultimately, everything depends on the visual implementation of free and busy time and the prevention of setting busy time intervals. I would not like to fully implement the Gann chart component with similar functions myself.
Please share your idea if anyone has it. (I will have to implement it in 2 versions, one on Delphi XE2 the second on PHP.
Thanks for the links and advice.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey, 2013-12-04
@HaJIuBauKa

The first option is preferable to choosing checkboxes.
In terms of implementation and business logic, too.
But the addition of the meeting period can be made discrete (adjustable) +10 (15) minutes.
What is the problem with the implementation of the algorithm? Describe your vision for this.
https://www.google.com/calendar/ - as an interface example :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question