Professional Documents
Culture Documents
5 Many To Many
5 Many To Many
Objectives
This lesson covers the following objectives:
Identify attributes which belong to many-to-many
relationships
Demonstrate the steps to resolve a many-to-many
relationship using an intersection entity
Identify the UID of an intersection entity and represent it
in the entity relationship diagram
Purpose
This lesson will help you complete your model -- you may
need to create new entities or new relationships based on
the business needs.
It will also help you define the scope of your data model -you only model what is of importance to the business.
PARTNER
# id
* first name
* last name
EVENT PLANNER
* expertise
DJ
* specialty
MANAGER
o authorized
expense limit
work on
worked on
by
EVENT
# id
* name
* date
o description
* cost
When an EVENT
PLANNER, a DJ, or a
PROJECT MANAGER
works on an EVENT, we
want him to record the
status of the job.
PARTNER
# id
* first name
* last name
EVENT PLANNER
* expertise
DJ
* specialty
MANAGER
o authorized
expense limit
work on
worked on
by
EVENT
# id
* name
* date
o description
* cost
Intersection Entity
JOB ASSIGNMENT
o status
An intersection entity
JOB
ASSIGNMENT has
been added,
including the status
attribute. The original
M:M relationship has
become two 1:M
relationships. What
would be the UID of
the intersection
entity?
7
for
for
PARTNER
# id
* first name
* last name
EVENT PLANNER
* expertise
DJ
* specialty
MANAGER
o authorized
expense limit
responsible
for
the source of
EVENT
# id
* name
* date
o description
* cost
JOB ASSIGNMENT
Barred Relationships
JOB ASSIGNMENT
o status
for
for
PARTNER
# id
* first name
* last name
responsible
for
the source of
EVENT
# id
* name
* date
o description
* cost
EVENT PLANNER
* expertise
DJ
* specialty
MANAGER
o authorized
expense limit
JOB ASSIGNMENT
watched by
TV SHOW
watch
Resolution of M:M
for
on
TV SHOW
PERSON
VIEWING
RECORD
for
on
PERSON
CLEANING SERVICES
Resolution of M:M
for
on
CLEANING
COMPANY
Copyright 2013, Oracle and/or its affiliates. All rights
reserved.
CLEANING
SERVICE
provided by
Each cleaning
service may be
provided by one or
more companies.
10
provide
CLEANING
COMPANY
CLEANING
SCHEDULE
for
on
CLEANING
SERVICE
Terminology
Key terms used in this lesson included:
Barred relationship
Intersection entity
11
Summary
In this lesson, you should have learned how to:
Identify attributes which belong to many-to-many
relationships
Demonstrate the steps to resolve a many-to-many
relationship using an intersection entity
Identify the UID of an intersection entity and represent it
in the entity relationship diagram
12