Table Definitions and Relationships

The database diagram is very common to the class diagram of the RadScheduleView interfaces:

radscheduleview populating with data schedule View Data Base Diagram

Table Definitions

We have table definitions in the database according for the following types in the RadScheduleView:

Class Diagram Table Definition
IAppointment & IExtendedAppointment
radscheduleview populating with data IAppointment
radscheduleview populating with data IExtended Appointment
SqlAppointments
radscheduleview populating with data Sql Appointments
IResource
radscheduleview populating with data IResource
SqlResources
radscheduleview populating with data Sql Resources
IExceptionOccurrence
radscheduleview populating with data IException Occurence
SqlExceptionOccurrences
radscheduleview populating with data Sql Exception Occurrences
IResourceType
radscheduleview populating with data IResource Type
SqlResourceTypes
radscheduleview populating with data Sql Resource Types
ICategory
radscheduleview populating with data ICategory
Categories
radscheduleview populating with data Categories
ITimeMarker
radscheduleview populating with data ITime Marker
TimeMarkers
radscheduleview populating with data Time Markers

Relationships

Here are some explanations about the keys and the relationships in the data tables:

Name Between Type Update/delete rule
FK_SqlResources_SqlResourceTypes SqlResourceTypes - SqlResources One-to-many No Action
FK_SqlAppointmentResources_SqlResource SqlResources - SqlAppointmentResources One-to-many Cascade
FK_SqlExceptionResources_SqlResource SqlResources - SqlExceptionResources One-to-many Cascade
FK_SqlExceptionOccurrences_SqlAppointments SqlAppointments - SqlExceptionOccurrences One-to-many Cascade
FK_SqlExceptionAppointments_SqlExceptionOccurrences SqlExceptionOccurrences - SqlExceptionAppointments One-to-many Cascade
  • There is no table definition for the IRecurrenceRule type because we don’t need it. Storing the RecurrencePattern is enough to generate the recurrence rules at run-time.
  • We cannot save the Brush type into the database directly, that’s why we can save a string that represents the color and convert the string to SolidColerBrush object when the TimeMarkers & Categories are loaded.
  • The SqlAppointmentResource and SqlExceptionResources are cross-tables between:
    • SqlAppointments & SqlResources
    • SqlExceptionAppointments & SqlResources
In this article