Question: E-R Model - Relationships Once the entities and attributes have been established, it is time to examine the relationships between the entities. A relationship exists

E-R Model - Relationships

Once the entities and attributes have been established, it is time to examine the relationships between the entities. A relationship exists between two entities and often goes in both directions.

Each direction of a relationship must have the following

a name, usually in lower-case letters. Some Useful pairs of relationship names: based on, defined by,responsible for, part of, run by, supplier of, represented by.

an optionality, which is either mandatory (continuous line) and is read "must be" or optional (dashed line) and is read "may be"

a degree or cardinality which is "one or more" indicated by a crowsfoot or "one and only one" indicated by the absence of the crowsfoot.

The name is positioned in the diagram close to the entity name. THe optionality is the line connection the two entity boxes and the degree is indicated at the point where the line meets each box. A picture is worth 1000 words, so let's look at some examples:

MEMBER

serving on

COMMITTEE

made up of

This relation is read left to right as "each MEMBER may be (dashed line - optionality) serving on (name) one or more (crowsfoot - degree)COMMITTEES". It can be read right to left as "Each COMMITTEE may be made up of one or more MEMBERS."

If an entity has a degree of "one or more", that entity should be on the left.

Student Exercise 5

Let's practice with a few examples:

------------------- (1) -------------------

STUDENT

enrolled in

COURSE

taken by

------------------- (2) -------------------

EMPLOYEE

assigned to

DEPARTMENT

responsible for

------------------- (3) -------------------

PAYCHECK

for

EMPLOYEE

the receiver of

Review E-R diagrams 1,2 and 3 above.

Reading diagram (1) from L to R; each STUDENT may be enrolled in one and only one COURSE

Reading diagram (1) from R to L: each COURSE may be taken by one or more STUDENTS. 3.(a) diagram (1) is a many-to-one or one-to-many relationship

Browse to your notepad++ window with yourlastnameLab_Module9.txt open

Indicate how you would read diagram (2) from L to R

Indicate how you would read diagram (2) from R to L

Record what kind of relationship this is: one-to-one, one-to-many or many-to-many

Indicate how you would read diagram (3) from L to R

Indicate how you would read diagram (3) from R to L

Record what kind of relationship this is: one-to-one, one-to-many or many-to-many

Using the E-R graphics attached in this module, (or creating your own) build an E-R diagram that will describe the following relationship:

L to R: the bed frame must be supporting one and only one matress R to L: the matress must be resting on one and only one bedframe

Record what kind of relationship this is: one-to-one, one-to-many or many-to-many

Using the E-R graphics attached in this module, (or creating your own) build an E-R diagram that will describe the following relationship:

L to R: A book can be written by one or more authors R to L: An author can write one or more books

Record what kind of relationship this is: one-to-one, one-to-many or many-to-many

Using the E-R graphics attached in this module, (or creating your own) build an E-R diagram that will describe the following relationship:

L to R: a Client may be treated by one and only one therapist R to L: a therapist may be a counselor of one or more clients

Record what kind of relationship this is: one-to-one, one-to-many or many-to-many

Samples: Student <-------------------------course

Employee<_______________ _ _ _ _Department

Paycheck<_______________ _ _ _ _Employee

Note the < symbol should be three lines instead of the <

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!