Scheduling application
I need help on design in class scheduling application for my university. The data is taken from xml file which is a database transformation to xml.
My classes reflect xml file:
Instructor, Course, Department, Room, Semester, Schedule.
Schedule is an entity that has instructor, course, room, semester, start time, end time and some other things. So class Schedule has references to instance of Course, Room, Instructor.
On the other hand Instructor should know about all his schedules, so for example when I try create a new Schedule object I would ask if Instructor hasn't been scheduled for other course at the same time.
So I am going to end up with circular references, when Schedule has Instructor, Instructor has schedules, etc.
Note, since that the data is taken from database each object will have an id. So another approach is to store only id's. For example Instructor will have a list of id's of schedules. This way I will have to create external class where I can put application logic. For example, given an instructor id and time find if this instructor hasn't been scheduled at this time already.
My question is where to put application logic, inside all this classes having circular references or to put it in external class(es).
Sergey.

