U
U
uurg2022-02-18 17:36:22
Database design
uurg, 2022-02-18 17:36:22

How to design a class calendar?

Good afternoon!
There is a calendar of this kind
620fadae33b48433837999.png

. And the question is, how can you organize a database for this?
There are different types of classes, and I would like to set a specific date for each of them, but this may not be right, since there are one-time events, and conditional trainings are repeated every week for some time.
Also, each lesson still has a specific time

. And if with ready-made data I can figure out how to present them to the user, then there are no ideas at all about how to store them. I thought about a separate table for types of classes, and a separate table for each class (with a date), but again the question arises about the appropriateness of such a solution, since then a lot of data is obtained.
In any case, I will be glad for any help.

The database can be either MySql or MongoDb if that matters

. Any help would be appreciated anyway,
Thanks in advance

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Michael, 2022-02-18
@Akela_wolf

A table for the types of activities (if you need one): training, meeting, visit to the doctor, etc.
Table for specific classes - contains a link to the type of lesson and a specific date and time
Table for the schedule of recurring classes - contains a link to the type of lesson and schedule (every Monday, every third Wednesday, etc.)
According to the table with schedules + according to the table of specific classes and build this chart. As an option, according to the schedule table, records can be created in the table of specific classes - it is convenient to see that on Wednesdays you have a visit to your parents, and on Fridays - training (but this particular Friday - a date). But there are both pluses and minuses in creating specific recordings on a schedule.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question