You are on page 1of 3

www.oracle.

com/academy

Database Design
3-1: Identifying Relationships
Practice Activities
Objectives
• Interpret and describe relationship optionality
• Interpret and describe relationship cardinality
• Relate entities by applying the rules of cardinality and optionality

Vocabulary
Identify the vocabulary word for each definition below.
Cardinality A property of an end of a relationship between X and Y that
describes how many of X is related to Y.
Relationship A connection or association between objects.

Optionality A property of an end of a relationship between X and Y that


describes whether X must be or may be related to Y.

Try It / Solve It
1. Read the given business scenario. Name the relationships between EMPLOYEE and
JOB. Include appropriate optionality and cardinality.

“We have a lot of employees who handle one or more different jobs. We’d like to keep
track of who is working on which job. Although employees can help each other, a job is
assigned to one employee and is the ultimate responsibility of that employee. All of our
employees have at least one job. However, jobs exist that are not yet assigned to anyone.”

Pegawai ke pekerjaan one to many dan one to many pekerjaan ke pegawai


Pegawai dapat memiliki banyak pekerjaan (Mandatory)
Pekerjaan dapat dilakukan banyak pegawai (Optional)

Copyright © 2015, 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

2. Read the given business scenario. Name the relationships between ORDER
and WAITER. Include the appropriate optionality and cardinality.

“We assign our waiters to certain areas, except for our trainees who just observe and are
not responsible for taking any orders yet. A waiter takes the orders for the tables in his ar-
ea. All areas have one assigned waiter. A customer places an order with a waiter. If the
customer has a question or wants to make a change to the order, he needs to request
this with the assigned waiter.”

Pelayan ke pelanggan one to many, pelanggan ke pelayan many to one


 Seorang pelayan dapat menerima banyak order di areanya (Mandatory)
 Order diambiloleh seorang pelayan (Mandatory)

3. Read the given business scenario. Name the relationships between PARENT and
CHILD. Include the appropriate optionality and cardinality.

“At the end of each day, parents need to pick up their children at our day-care center. All
children must be picked up by 6 p.m. A child may have two parents, but we need only one
of them to come and pick up the child. We cannot release a child to anyone but that
child’s parent.”

Orang tua harus menjemput anaknya ( One to one ) anaknya harus dijemput orang tua
( one to one)
 Anak harus dijemput orang tua
 Orang tua harus menjemput anaknya

4. Read the given business scenario. Name the relationships between TEACHER
and STUDENT. Include the appropriate optionality and cardinality.

“Some students request remedial help in certain subjects, such as math. We can assign a
tutor who can work with the student after class. Some of our teachers agree to be tutors.
If several students need tutoring in one subject, then we assign them to the same teach-
er. If a student needs tutoring in several subjects, then he will probably be assigned to
several different tutors.”
Satu guru dapat memberikan pelajaran ke banyak siswa (one to many) siswa dapat
menerima pelajaran dari banyak guru (many to many)
 Guru ke siswa mandatory
 Siswa ke guru mandatory

5. Draw two entities that you are familiar with from your own experience (use colored pens
and markers on hand). Write down the relationships between these two entities,
including cardinality and optionality. Share your entities with the class.
Copyright © 2015, 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