Data model for SQL-based data providers
The following picture depicts (a slightly simplified version of) the MyTimetable data model. It can be used during development of custom data providers. These data providers can provide data to MyTimetable through a web service or a database. In case of a database, we currently prefer a PostgreSQL database, but Microsoft SQL Server or MySQL are possible as well.
Events
The base entity of MyTimetable is an Event, which represent one activity in the timetable. Each activity optionally has a type, department, zero or more locations, zero or more staff members, zero or more students and zero or more student sets attached to it. The type, department, locations, staff members, student and student sets can also be kept in a denormalised format in the same table as the events, to further simplify the data model.
Timetables
Events are grouped in timetables. Each timetable represents an entry the user can choose themselves in the interface (e.g., 'add timetable of class B' ), or represents a student or staff member (in case of personalised timetables). For some data providers, timetables are automatically formed from the locations or staff members attached to the events.
Identifiers
Every entity requires a unique identifier (ID), which should be the same identifier at all times. This ID may be used to save certain user settings, so changing or non-unique IDs are not possible and will cause problems.
Keys
Every entity can have a key, which represent a system identifier (e.g., student number or staff login name). A unique value is strongly recommended.