You are on page 1of 3

www.oracle.

com/academy

Database Design
9-3: Relationship Mapping
Practice Activities Objectives
• Apply the rule of relationship mapping to correctly transform 1:M and barred
relationships
• Apply the rule of relationship mapping to correctly transform M:M relationships
• Transform 1:1 relationships
• Apply the rule of relationship mapping to correctly transform relationships in an arc

Vocabulary
Identify the vocabulary word for each definition below.
Nontransferable A relationship in a database where the foreign key column in the
Relationship database table cannot be updated
Cascade Barred A series of relationships implying that the unique identifier of each
relationship entity in the chain is carried down to the entity on the next level
Intersecting entity The product of the resolution of a many to many relationship.

Try It / Solve It
The following entities were mapped to tables in a previous lesson: SHIFT, REGULAR MENU,
PROMOTIONAL MENU, FREQUENT DINER CARD.

Refer to the completed Global Fast Foods model and map the following entities:

FOOD ITEM
ORDER
ORDER LINE

1. Transform relationships into foreign-key columns.

Use as many rows as necessary in a table similar to the one in the diagram.

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.
This study source was downloaded by 100000833626226 from CourseHero.com on 09-22-2022 22:51:56 GMT -05:00

https://www.coursehero.com/file/22667171/Gordon-Matthew-DD-9-3-Practice/
Key Type Optionality (“*” or Column
( pk, uk, “o”) Name
fk)
SHIFT
Pk * Code
* Description
MENU
PK * Code
* Name
* Start_date
o End_date
o Giveaway
FREQUENT
DINER
CARD
PK * Id
* First_Name
* Last_Name
* Address
* City
* State
* Zip

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.
This study source was downloaded by 100000833626226 from CourseHero.com on 09-22-2022 22:51:56 GMT -05:00

https://www.coursehero.com/file/22667171/Gordon-Matthew-DD-9-3-Practice/
3

2. Indicate if a check constraint or additional programming is needed to enforce the


relationship in the database. Under each table diagram, write the conditions that the check
constraint or program has to ensure.

For example:

“To enforce exclusive relationships, a check constraint is needed to make sure that
(column A is not null and column B is null) OR (column A is null and column B is not
null).”

“To enforce a nontransferable relationship, additional programming is needed to make


sure that the <foreign key column> cannot be updated.”

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.
This study source was downloaded by 100000833626226 from CourseHero.com on 09-22-2022 22:51:56 GMT -05:00

https://www.coursehero.com/file/22667171/Gordon-Matthew-DD-9-3-Practice/
Powered by TCPDF (www.tcpdf.org)

You might also like