You are on page 1of 2

Database Design

5-2: Relationship Types


Practice Activities
Objectives
• Recognize and give examples of a one-to-one relationship
• Recognize and give examples of a one-to-many relationship
• Recognize and give examples of a many-to-many relationship
• Recognize redundant relationships and remove them from the ERD

Vocabulary
Identify the vocabulary word for each definition below.
A relationship where each record in Table A can be related to
one-to-one relationship one, and only one, record in Table B, and each record in Table B
relates to one, and only one, record in Table A.
A relationship where a single record in Table A can be related to
one-to-many relationship. one or more records in Table B, but a single record in Table B
can only be related to one record in Table A.
Many-to-many relationship. A relationship in which many records in one table match many
records in another table
Unnecessarily repetitive
Redundant.

Try It / Solve It
1. Identify the relationship types of the statements below

Type Statement
A snowboard instructor may instruct one or more
1:M
snowboarders
1:1 A bicycle may be owned by a child
M:M Classroom crayons may be used by students in a classroom
1:1 A passport belongs to a person
1:1 A female elephant gives birth to an elephant

Copyright © 2020, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
2. Provide two examples for each relationship type.

Relationship Type Example


One-to-one A person has only one driver license, and a license belongs to only one person.

One-to-one A student has only one student ID, and a student ID belongs to only one student.

One-to-many A department has many employees, but an employee can belong to only one department.

One-to-many A blog post can have many comments, but a comment belongs to only one blog post.

Many-to-many A student can enroll in many courses, and a course can have many students enrolled.

Many-to-many A musician can play in many bands, and a band can have many musicians.

3. Draw an entity relationship diagram to represent the following:

a. Each CLUB must be assigned to one and only one DEPARTMENT


b. Each DEPARTMENT may be responsible for one or more CLUBs
c. Each STUDENT may join one or more CLUBs
d. Each CLUB may be composed of one or more STUDENTs

Copyright © 2020, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

You might also like