0% found this document useful (0 votes)
14 views4 pages

Emt 1

Uploaded by

adham0n10ashraf
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)
14 views4 pages

Emt 1

Uploaded by

adham0n10ashraf
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

A university database contains information about professors (identified by social security number SSN) and

courses (identified by courseid). Professors also have a name, an address and a phone number. Courses have a
name and a number of credits. Professors teach courses. For each of the following situations, draw an ER
diagram that describes it (assuming no further constraints hold).
(a) Every professor must teach some course.
(b) Every professor teaches exactly one course (no more, no less).
(c) Every professor teaches exactly one course (no more, no less), and every course must be taught by
some professor.
(d) [630 students only] Modify the diagram from (a) such that a professor can have a set of addresses
(which are street-city-state triples) and a set of phones. Recall that in the E/R model there can be only
primitive data types (no sets).
(e) [630 students only] Modify the diagram from (d) such that professors can have a set of addresses, and
at each address there is a set of phones.
a)

pname
address cname
SSN

courseid credits
phone

Professors Teach Courses

b)

pname
address cname
SSN
courseid credits
phone

Professors Teach Courses

c)

pname
address cname
SSN

courseid credits
phone

Professors Teach Courses


d)

pname

SSN cname
credits
courseid

Professors Teach Courses

Reachable
Lives
At
At

Address Phone

city
state
number
street
e)

pname

SSN cname
credits
courseid

Professors Teach Courses

Lives
At

Address Has

city
Phone
state

street
number

You might also like