Professional Documents
Culture Documents
com
Vocabulary
Identify the vocabulary word for each definition below.
A relationship in a database where the foreign key column in the
database table cannot be updated
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
Copyright © 2019, 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.
1. Transform relationships into foreign-key columns.
Use as many rows as necessary in a table similar to the one in the diagram.
Copyright © 2019, 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.
FOOD ITEMS
Key Type Optionality (“*” or Column Name
( pk, uk, “o”)
fk)
PK * Food_ID
FK * RGR_ID
* Description
* Price
ORDERS
Key Type Optionality (“*” or Column Name
( pk, uk, “o”)
fk)
PK * Order_ID
FK * Prom_ID
FK * Staff_ID
* Date
* Time
Orders Lines
Key Type Optionality (“*” or Column Name
( pk, uk, “o”)
fk)
PK,FK * Order_ID
* QTY
FK * FDR_ID
Copyright © 2019, 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. 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).”
Copyright © 2019, 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.