Example 2 – Schemas ES1 and ES2 Student(studentId, name, address, tutorId) Staff(tutorId, name, deptName) Lecturer(lecturerId, name, deptName) Course(courseId, name, programme) Teaches(lecturerId, studentId) Department(deptName, deptHead) Course(courseId, courseName, units) Enrollment(studentId, year) Staff(staffId, name, deptName) Teaches(staffId, courseId) CourseEnrollments(studentId,year, courseId)
Example 2 – Schemas ES1 and ES2 Student(studentId, name, address, tutorId) Staff(tutorId, name, deptName) Lecturer(lecturerId, name, deptName) Course(courseId, name, programme) Teaches(lecturerId, studentId) Department(deptName) Department(deptName, deptHead) Course(courseId, courseName, units) Enrollment(studentId, year) Staff(staffId, name, deptName) Teaches(staffId, courseId) CourseEnrollments(studentId,year, courseId)
Example 2 – Schemas ES1 and ES2 Student(studentId, name, address, tutorId) Staff(tutorId, name, deptName) Lecturer(lecturerId, name, deptName) Course(courseId, name, programme) Teaches(lecturerId, studentId) Department(deptName) Department(deptName, deptHead) Course(courseId, courseName, units) Enrollment(studentId, year) Lecturer(staffId, name, deptName) Teaches(staffId, courseId) CourseEnrollments(studentId,year, courseId)
Example 2 – Schemas ES1 and ES2 Student(studentId, name, address, tutorId) Staff(tutorId, name, deptName) Lecturer(lecturerId, name, deptName) Course(courseId, name, programme) Teaches(lecturerId, studentId) Department(deptName) Department(deptName, deptHead) Course(courseId, courseName, units) Enrollment(studentId, year) Lecturer(lecturerId, name, deptName) Teaches(lecturerId, courseId) CourseEnrollments(studentId,year, courseId)
Example 2 – Schemas ES1 and ES2 Student(studentId, name, address, tutorId) Staff(tutorId, name, deptName) Lecturer(lecturerId, name, deptName) Course(courseId, courseName, programme) Teaches(lecturerId, studentId) Department(deptName) Department(deptName, deptHead) Course(courseId, courseName, units) Enrollment(studentId, year) Lecturer(lecturerId, name, deptName) Teaches(lecturerId, courseId) CourseEnrollments(studentId,year, courseId)
Example 2 – Schemas ES1 and ES2 Student(studentId, name, address, tutorId) Staff(tutorId, name, deptName) Lecturer(lecturerId, name, deptName) Course(courseId, courseName, programme) TeachesStudents(lecturerId, studentId) Department(deptName) Department(deptName, deptHead) Course(courseId, courseName, units) Enrollment(studentId, year) Lecturer(lecturerId, name, deptName) Teaches(lecturerId, courseId) CourseEnrollments(studentId,year, courseId)
Merging ES1 and ES2 Student(studentId, name, address, tutorId) Staff(tutorId, name, deptName) Lecturer(lecturerId, name, deptName) Course(courseId, courseName, units, programme) TeachesStudents(lecturerId, studentId) Department(deptName, deptHead) Enrollment(studentId, year) Teaches(lecturerId, courseId) CourseEnrollments(studentId,year, courseId)
Improving the merged schema Student(studentId, name, address, tutorId) Staff(tutorId, name, deptName) Lecturer(lecturerId, name, deptName) Course(courseId, courseName, units, programme) TeachesStudents(lecturerId, studentId) Department(deptName, deptHead) Teaches(lecturerId, courseId) CourseEnrollments(studentId,year, courseId)
Improving the merged schema Student(studentId, name, address, tutorId) Staff(tutorId, name, deptName) Lecturer(lecturerId, name, deptName) Course(courseId, courseName, units, programme) Department(deptName, deptHead) Teaches(lecturerId, courseId) CourseEnrollments(studentId,year, courseId)