Prak. Section 2 Transforming From Conceptual Model To Physical Model
Prak. Section 2 Transforming From Conceptual Model To Physical Model
Objectives
Define a primary key
Define a foreign key
Define a column-integrity rule
Identify row, column, primary key, unique key, and foreign key given a diagram of a table
containing these elements
Identify violations of data-integrity rules
Vocabulary
Identify the vocabulary word for each definition below
Try It / Solve It
1. Data Integrity in the DJs Database
Examine the sample data for these tables in the DJs on Demand database. Check for entity,
referential, and column integrity. Identify any data-integrity violations. Assume that all date
columns should have a date format and all amount (cost) columns should have a number format.
Section 2 Lesson 2: Basic Mapping: The Transformation Process
Objectives
Distinguish entity relationship models from database models
Describe the terminology mapping between a conceptual model and a physical model
Understand and apply the Oracle naming conventions for tables and columns used in physical
models
Transform an entity into a table diagram
Vocabulary
Identify the vocabulary word for each definition below.
Try It / Solve It
1. Transform the following entities into table definitions using suitable naming conventions
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.
Try It / Solve It
Relationship Mapping
The following entities were mapped to tables in the 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
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.”
Section 2 Lesson 4: Subtype Mapping
Objectives
State and apply the table, column, identifiers, relationship, and integrity constraint rules for
mapping:
o supertype implementations
o subtype implementations
o supertype and subtype arc implementations
Try It / Solve It
1. Transform the PARTNER supertype in the DJs model, using the supertype or single-table
implementation.
2. Transform the STAFF supertype in the Global Fast Foods model, using the subtype or two-table
implementation.
3. Identify the database rules for each part of the database implementations below.
Supertype implementations
Table
Column
Identifiers
Relationship
Integrity constraint rules
Subtype implementations
Table
Column
Identifiers
Relationship
Integrity constraint rules
Arc implementations
Table
Column
Identifiers
Relationship
Integrity constraint rules