module School { struct Address { string street; string city; string state; short zip; }; class Person ( extent Persons key ssn ) { attribute long ssn; attribute string name; attribute Address address; }; typedef set Degrees; class Instructor extends Person ( extent Instructors ) { attribute long salary; attribute string rank; attribute Degrees degrees; attribute list
alternative_locations; attribute list< set > publication_history; relationship Department dept inverse Department::instructors; relationship set teaches inverse Course::taught_by; long works_for (); short courses ( in string dept_name ); void print (); }; class Department ( extent Departments keys dno, name ) { attribute long dno; attribute string name; attribute Instructor head; relationship set instructors inverse Instructor::dept; relationship set courses_offered inverse Course::offered_by; long avg_salary (); set courses (); void print (); }; class Course ( extent Courses keys code, name ) { attribute string code; attribute string name; relationship Department offered_by inverse Department::courses_offered; relationship Instructor taught_by inverse Instructor::teaches; relationship set is_prerequisite_for inverse Course::has_prerequisites; relationship set has_prerequisites inverse Course::is_prerequisite_for; set all_prereqs (); }; };