D
D
DBarkoVW2018-11-17 14:09:08
Database design
DBarkoVW, 2018-11-17 14:09:08

How to store schedule in DB for easy editing?

Hello.
There are several tours. Each tour has a seasonal schedule for 6 months. The duration of the tour is 7 days, indicated by the start and end dates.
Let's say:
TOUR No. 1 05/01/2019 - 05/07/2019, 05/09/2019 - 05/16/2019 ... etc. The timetable is approximately 6 months. Because there are organizational nuances, it is desirable that the start or end date of the tour falls on a day off. Therefore, the schedule of tours is compiled with an interval of 1 - 2 or 3 days.
At this stage, I store the schedule in the database table like this: id, id_tour, date_begin, date_end, that is, one row in the table is one period. Accompanying this is extremely inconvenient. Adding or changing a tour date somewhere in the middle of the schedule will change the entire schedule. It is necessary to edit all records of the required tour in the schedule table. Is there a more convenient way to store schedule periods in a database? How can I do it right? Thank you.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question