There are 2 entities. One is admin. The task of admin is to define slots for appointments which will be taken by applicants.
The admin will choose a default time for the appointments like 10am to 2pm and then 3pm to 5pm.
Now the confusion how to save this information in database.
- In a single row which contains start date and time and end date and time and number of applicants allowed for that time slot.
- Create multiple rows with each date and time slot. Like if there are 2 slots for 15 days then
day 1 10a - 2p
day 1 3p - 5p
day 2 10a - 2p
day 2 3p - 5p
Which will be a better way to save the appointments?
The second way offers flexibility to edit the appointments but will take multiple rows.
The first way saves rows but is complicated when editing and adding or deleting special slots.