I know that it has been told almost anything related to time table modeling in RDBS, but i can not find any well written documentation about available techniques to store time tables in DB.
My case:
- I have table witch holds available places, and table with actual classes.
- Each place has it's own unique schedule
- Each class can be scheduled in any place, and any time, with few exceptions:
- One class can take one time-slot (Example: If class A is scheduled in place P1 at 12:00 for 1hour duration, next occurrence of class A can only be placed before 12:00 or after 13:00, in any place, witch has free time-slot; It's forbidden to schedule class A in one time in two places)
- In one place it can be one class with time-slot
- Model should support versioning/history of scheduled classes
Now, how i can represent this data model in an SQL DB?
I'm not looking ready-to-use exact schema, rather i will be glad if anyone can write available modeling techniques and their comparison, witch i can use to solve this task
For example: For tree-structure/hierarchical data, there is well documented "modified preorder tree traversal algorithm", is there some similar algorithm/technique to deal with time-slots?