

































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


































-Relationships (interactions between entities)
Prof Student
Teaches
Mother (^1) Has N Child
“cardinalities”; N stands for “many”
Read this as: “A mother has many children” “A child has one mother”
Prof M Teaches N Student
Note: no good reason to use M and N (could just use N and N) except tradition
Note 2: This example demonstrates importance of context ; if we are talking about just this classroom, Teaches is one-to-many; at UF, it is many-to-many
Prof (^) Teaches Class
Means every class must have a prof to teach it
Office
Room #
Building SQ Ft.
Window?
Prof
Name
Fname Lname MI
SSN
Age Rank
Salary
Class Taken By Student
Grade
N M
Office
Room #
Building SQ Ft.
Window?
Prof
Name
Fname Lname MI
SSN
Age Rank
Salary
Office
Room #
SQ Ft.
Window?
Building
In Address
#Rooms Age
#Floors
Street Name Number 1
N
To figure out the key for a weak entity, start with all of the attributes in the partial key, then “chase” the IDing relationsip(s)
Person
Name
Fname Lname SSN MI
Age
Student Prof
D
Staff
Grad Date Rank
Salary Job Desc.
So, all people have an SSN, Age, Name, and a home town, but only Profs have a Sal- ary and Rank
“D” means that a Per- son can only be a Stu- dent, a Staff, or a Prof, never more than one
City (^) From (^1) N
Person
Name
Fname Lname SSN MI
Age
Student Prof
D
Staff
Grad Date Rank
Salary Job Desc.
If we are modeling a university, this means that a Person has to be either a Student, a Prof, or on the Staff; there are no generic “People” who are not in a sub- class