0% found this document useful (0 votes)
79 views

Tutorial4 Sol

This document contains a summary of Tutorial #4 for CSCC43 given by TA Shobhit Jain on 2/2/2012. It outlines 3 problems involving designing ER diagrams for database scenarios. Problem 1 involves modeling teaching relationships between professors and courses. Problem 2 involves modeling employees, departments, and children of employees. Problem 3 involves modeling the driver licensing process administered by the Motor Vehicle Branch.

Uploaded by

brm1shubha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views

Tutorial4 Sol

This document contains a summary of Tutorial #4 for CSCC43 given by TA Shobhit Jain on 2/2/2012. It outlines 3 problems involving designing ER diagrams for database scenarios. Problem 1 involves modeling teaching relationships between professors and courses. Problem 2 involves modeling employees, departments, and children of employees. Problem 3 involves modeling the driver licensing process administered by the Motor Vehicle Branch.

Uploaded by

brm1shubha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

CSCC43: Tutorial #4

TA: Shobhit Jain


(2/2/2012)

Problem 1
A university database contains information about professors (identied by social security number, or SSN) and
courses (identied by courseid). Professors teach courses; each of the following situations concerns the Teaches
relationship set. For each situation, draw an ER diagram that describes it (assuming no further constraints hold).
1. Professors can teach the same course in several semesters, and each oering must be recorded
2. Professors can teach the same course in several semesters, and only the most recent such oering needs to be
recorded (Assume this condition applies in all subsequent questions)
3. Every professor must teach some course
4. Every professor teaches exactly one course (no more, no less)
5. Every professor teaches exactly one course (no more, no less), and every course must be taught by some
professor
6. Now suppose that certain courses can be taught by a team of professors jointly, but it is possible that no
one professor in a team can teach the course. Model this situation, introducing additional entity sets and
relationship sets if necessary

Problem 2
A company database needs to store information about employees (identied by ssn, with salary and phone as attributes), departments (identied by dno, with dname and budget as attributes), and children of employees (with
name and age as attributes). Employees work in departments; each department is managed by an employee; a child
must be identied uniquely by name when the parent (who is an employee; assume that only one parent works for
the company) is known. We are not interested in information about a child once the parent leaves the company.
Draw an ER diagram that captures this information (only major attribures shown).

Problem 3
The Motor Vehicle Branch administers driving tests and issues driver's licenses. Any person who wants a driver's
license must rst take a learner's exam at any Motor Vehicle Branch in the province. If he/she fails the exam, he
can take the exam again any time after a week of the failed exam date, at any branch. If he passes the exam, he is
issued a license (type = learner's) with a unique license number. A learner's license may contain a single restriction
on it. The person may take his driver's exam at any branch any time before the learner's license expiry date (which
is usually set at six months after the license issue date). If he passes the exam, the branch issues him a driver's
license. A driver's license must also record if the driver has completed driver's education, for insurance purposes.
Draw an ER diagram that captures this information (only major attributes shown).

You might also like