Oracle Data Modeling and Relational Database Design - 9-2010 - Volume II • Student Guide-D56497GC10-Edition 1.0-September 2010-D67008 x
Oracle Data Modeling and Relational Database Design - 9-2010 - Volume II • Student Guide-D56497GC10-Edition 1.0-September 2010-D67008 x
D56497GC10
Edition 1.0
September 2010
D67008
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
violation of Oracle copyright. All WDP students must receive an eKit watermarked with their name and email. Contact
[email protected] if you have not received your personalized eKit.
Author Copyright © 2010, Oracle and/or it affiliates. All rights reserved.
Editors
Daniel Milne
Vijayalakshmi Narasimhan
Graphic Designer
Rajiv Chandrabhanu
Publishers
Shaik Basha
Jayanthy Keshavamurthy
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
violation of Oracle copyright. All WDP students must receive an eKit watermarked with their name and email. Contact
[email protected] if you have not received your personalized eKit.
Contents
O Course Overview
Course Objectives O-2
1 Introduction to Modeling
Objectives 1-2
Why Model? 1-3
Why Model: A Practical Example 1-4
Database and Application Development Life Cycle 1-5
Process Modeling 1-6
Logical Data Modeling 1-8
Database Design 1-10
Database Generation 1-11
Data Type Model 1-12
Multidimensional Model 1-13
Quiz 1-15
Approaches to Modeling 1-17
Top-Down Modeling 1-18
Bottom-Up Modeling 1-19
Targeted Modeling 1-20
Quiz 1-21
Summary 1-23
Practice 1-1 Overview: Identify the Modeling Approach 1-24
iii
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
violation of Oracle copyright. All WDP students must receive an eKit watermarked with their name and email. Contact
[email protected] if you have not received your personalized eKit.
Components of a Business Direction Statement 2-4
Business Objectives 2-5
Assumptions 2-6
Critical Success Factors 2-7
Key Performance Indicators 2-8
Problems 2-9
Devising Business Direction Objectives and Actions 2-10
II Representing the Flow of Data by Using a Process Model (Data Flow Diagram)
Overview II-2
4 Using Oracle SQL Developer Data Modeler to Create Your Data Flow Diagram
Objectives 4-2
Oracle SQL Developer Data Modeler 4-3
Oracle SQL Developer Data Modeler Main Window 4-5
Specifying General Options: General 4-6
Specifying General Options: Model 4-7
Specifying General Options: Diagram 4-8
Specifying General Options: Naming Standard 4-9
Building a Data Flow Diagram 4-10
Editing the Diagram Layout 4-16
iv
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
violation of Oracle copyright. All WDP students must receive an eKit watermarked with their name and email. Contact
[email protected] if you have not received your personalized eKit.
Adding and Reusing Process Events 4-20
Opening and Saving Your Model 4-21
Summary 4-22
Practice 4-1 Overview: Build a Data Flow Diagram in Oracle SQL Developer Data
Modeler 4-23
v
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
violation of Oracle copyright. All WDP students must receive an eKit watermarked with their name and email. Contact
[email protected] if you have not received your personalized eKit.
Practice 6-1 Overview: Identify Entities and Attributes 6-16
Practice 6-2 Overview: Identify Entities and Attributes 6-17
7 Identifying Relationships
Objectives 7-2
Relationships 7-3
Components of a Relationship 7-4
vi
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
violation of Oracle copyright. All WDP students must receive an eKit watermarked with their name and email. Contact
[email protected] if you have not received your personalized eKit.
9 Using Oracle SQL Developer Data Modeler to Create an Entity Relationship
Diagram
Objectives 9-2
Building an Entity Relationship Diagram 9-3
Specifying Logical Model General Option 9-9
Specifying Logical Model Diagram Defaults 9-10
vii
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
violation of Oracle copyright. All WDP students must receive an eKit watermarked with their name and email. Contact
[email protected] if you have not received your personalized eKit.
Quiz 10-19
Summary 10-21
Practice 10-1 Overview: Develop and Validate Your ERD 10-22
12 Validating Relationships
Objectives 12-2
Resolving M:M Relationships 12-3
Quiz 12-6
Modeling Hierarchical Data 12-7
Examining Recursive Relationships 12-8
Resolving a M:M Recursive Relationships 12-11
Quiz 12-12
Modeling Exclusive Relationships 12-13
Creating an Exclusive Relationship in Oracle SQL Developer Data Modeler 12-14
Quiz 12-16
Entity Type Hierarchies 12-17
Modeling Subtypes in Oracle SQL Developer Data Modeler 12-19
Representing Entity Type Hierarchies 12-20
Changing Preference for Box-in-Box Presentation 12-21
Quiz 12-22
Model Data Over Time 12-23
Quiz 12-28
Summary 12-29
viii
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
violation of Oracle copyright. All WDP students must receive an eKit watermarked with their name and email. Contact
[email protected] if you have not received your personalized eKit.
Practice 12-1 Overview: Resolve M:M Relationships 12-30
Practice 12-2 Overview: Model Hierarchical Data 12-31
Practice 12-3 Overview: Model Hierarchical Data and Recursive Relationships 12-32
Practice 12-4 Overview: Examine Exclusive Relationships 12-33
Practice 12-5 Overview: Examine Exclusive Relationships 12-34
ix
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
violation of Oracle copyright. All WDP students must receive an eKit watermarked with their name and email. Contact
[email protected] if you have not received your personalized eKit.
Naming Conventions 15-7
Naming Restrictions with Oracle 15-11
Ensuring That Your Logical Data Model Is Complete 15-12
Mapping Simple Entities 15-13
Naming Entities 15-14
Engineering Entities 15-15
Mapping Attributes to Columns 15-16
x
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
violation of Oracle copyright. All WDP students must receive an eKit watermarked with their name and email. Contact
[email protected] if you have not received your personalized eKit.
VI Evaluating Your Design for Database Creation
Overview VI-2
xi
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
violation of Oracle copyright. All WDP students must receive an eKit watermarked with their name and email. Contact
[email protected] if you have not received your personalized eKit.
18 Defining Your Physical Model
Objectives 18-2
What Is a Physical Model? 18-3
Creating a Physical Model 18-4
RDBMS Administration 18-5
RDBMS Administration: Changing the Default RDBMS Sites 18-6
Creating Physical Model Objects 18-7
xii
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
violation of Oracle copyright. All WDP students must receive an eKit watermarked with their name and email. Contact
[email protected] if you have not received your personalized eKit.
Using Import 20-4
Importing an Existing Database 20-6
Importing Domains 20-11
Quiz 20-12
Creating a Logical Data Model from Your Relational Model 20-13
Reviewing and Making Changes to Your Logical Model 20-14
Checking Design Rules 20-15
xiii
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
violation of Oracle copyright. All WDP students must receive an eKit watermarked with their name and email. Contact
[email protected] if you have not received your personalized eKit.
Steps to Build a Multidimensional Model in Oracle SQL Developer Data
Modeler 21-17
Importing a Database with Dimensions 21-18
Reverse Engineering Your Model 21-21
Creating Your Multidimensional Model 21-23
Reviewing Your Multidimensional Model 21-24
Reviewing Multidimensional Object Properties 21-25
xiv
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
violation of Oracle copyright. All WDP students must receive an eKit watermarked with their name and email. Contact
[email protected] if you have not received your personalized eKit.
Oracle University and Bridge Human Skills Developments,GCC use onlyฺ
Transforming Your Logical Model to a
Relational Design
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
violation of Oracle copyright. All WDP students must receive an eKit watermarked with their name and email. Contact
[email protected] if you have not received your personalized eKit.
Oracle University and Bridge Human Skills Developments,GCC use onlyฺ
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
violation of Oracle copyright. All WDP students must receive an eKit watermarked with their name and email. Contact
[email protected] if you have not received your personalized eKit.
Oracle University and Bridge Human Skills Developments,GCC use onlyฺ
Mapping Your Entity Relationship Diagram to
a Relational Database Design
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
violation of Oracle copyright. All WDP students must receive an eKit watermarked with their name and email. Contact
[email protected] if you have not received your personalized eKit.
Objectives
Objectives
In this lesson, you learn how to use the Oracle SQL Developer Data Modeler engineering tool to
engineer your logical model to a relational model, and how logical objects map to relational
objects.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 -2
Contact
[email protected] if you have not received your personalized eKit.
Why Create a Relational Model?
• A relational model:
– Is closer to the implementation solution
– Facilitates discussion
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 -3
Contact
[email protected] if you have not received your personalized eKit.
REVIEW: Database Design
Logical Data
Modeling
Database
Generation
Database
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students and
must receive Relational
an eKit watermarkedDatabase Design
with their name 1-4
and email. Contact
[email protected] if you have not received your personalized eKit.
Relational Database Overview
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 -5
Contact
[email protected] if you have not received your personalized eKit.
Terminology Mapping
ANALYSIS DESIGN
Logical model Relational model
Terminology Mapping
Changing from one world to another also means changing terminology. The mappings are as
follows:
• An entity creates a table.
• An attribute becomes a column in a table
• A primary unique identifier becomes a primary key for the table.
• A secondary unique identifier creates a unique constraint
• A relationship is mapped into a foreign key and foreign key columns.
• Constraints are the rules with which the database must be defined to be consistent. Some of
the business rules are translated into check constraints, other complex rules require
additional programming.
This initial mapping is limited to the design of tables, columns, and constraints that can be
declared. A declarative constraint is a business constraint that can be ensured at the server level
by using only database language statements; a declarative constraint requires no coding.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 -6
Contact
[email protected] if you have not received your personalized eKit.
Naming Conventions
Naming Conventions
Before transforming the logical data model, you must define a naming convention so that project
members use the same standards and produce the same model from the same source. This
lesson explains naming conventions used within Oracle, however, they are not the only ones that
you can use.
There are many ways to define naming standards in Oracle SQL Developer Data Modeler. In the
diagram in the slide, you see there are two models: Logical and Relational. You can enforce
naming standards in the following ways:
Using a Glossary: Allows you to define words and abbreviations and identify what type of word
they represent (Primary, Class, Modified, and Qualifier)
Using Naming Templates: Allows you to define the way in which the name will be generated. For
example, the primary key name will always have a suffix of _PK, and therefore the template would
be set to {table}_PK.
Using Name Restrictions: Allows you to restrict naming during engineering. For example, if you
want entity and attribute names to all be lowercase, you can set this restriction in the Model
Properties.
Using Name Translation: Allows you to utilize the naming rules that you already set up, such as
the glossary or preferred abbreviations for an object
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 -7
Contact
[email protected] if you have not received your personalized eKit.
Naming Conventions (continued)
Using Name Formatter: Allows you to invoke naming rules that utilize name abbreviations or
templates
Using Design Rule Validations: Allows you to check your model to make sure objects are
complete from a modeling perspective
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 -8
Contact
[email protected] if you have not received your personalized eKit.
Naming Conventions
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 - 10
Contact
[email protected] if you have not received your personalized eKit.
Naming Restrictions with Oracle
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 - 11
Contact
[email protected] if you have not received your personalized eKit.
Ensuring That Your Logical Data Model Is
Complete
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 - 12
Contact
[email protected] if you have not received your personalized eKit.
Mapping Simple Entities
Entities
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 - 13
Contact
[email protected] if you have not received your personalized eKit.
Naming Entities
Naming Entities
In the Sort Name field, define a short name for an entity. The short name will be engineer as a
table abbreviation. Use the Preferred Abbreviation field to define the preferred abbreviation, which
can be engineered as the table name.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 - 14
Contact
[email protected] if you have not received your personalized eKit.
Engineering Entities
Engineering Entities
After your design rules have been verified and your naming parameters specified, you can
engineer your logical model to a relational model. Select the Engineer icon in your toolbar. The
Engineering window appears. To view the objects that will be engineered, expand the object type
in either the Logical or Relational side of the window. Notice in this case that two tables will be
created in the Relational model.
To apply the naming standards that you have set, select the General Options tab and select
“Apply name translation.” Notice that the “Use preferred abbreviations” check box is then
highlighted and checked by default.
Click Engineer to engineer your model.
Note: If you do not like the results that you see, click Cancel, make changes, and re-run the
engineering step.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 - 15
Contact
[email protected] if you have not received your personalized eKit.
Mapping Attributes to Columns
Entities
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 - 16
Contact
[email protected] if you have not received your personalized eKit.
Mapping Attributes to Columns: Column Names
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 - 17
Contact
[email protected] if you have not received your personalized eKit.
Engineering Attributes
Engineering Attributes
When engineering attributes to columns, you can view the list of attributes that will be engineered
to columns from the engineering page. Notice the Add icon for each column that will be created.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 - 18
Contact
[email protected] if you have not received your personalized eKit.
Reviewing the Glossary
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 - 19
Contact
[email protected] if you have not received your personalized eKit.
Adding the Glossary as the Naming Standard
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 - 20
Contact
[email protected] if you have not received your personalized eKit.
Mapping Attributes to Columns with the Glossary
Entities
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 - 21
Contact
[email protected] if you have not received your personalized eKit.
Applying Name Abbreviations
1 3
5
4
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 - 22
Contact
[email protected] if you have not received your personalized eKit.
Mapping Unique Identifiers to Primary Keys
Entities
Unique
identifier
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 - 23
Contact
[email protected] if you have not received your personalized eKit.
Engineering Unique Identifiers
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 - 24
Contact
[email protected] if you have not received your personalized eKit.
Mapping Relationships to Foreign Keys
Entities
Tables
Foreign
key
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 - 25
Contact
[email protected] if you have not received your personalized eKit.
Mapping Relationships to Foreign Keys
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 - 26
Contact
[email protected] if you have not received your personalized eKit.
Defining Naming Templates
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 - 27
Contact
[email protected] if you have not received your personalized eKit.
Defining Naming Templates
Examples:
• Table name: ADMIN
• Model name: ORACLEDEMO
IX_SUBSTR(7,4,FRONT,{model})_SUBSTR IX_DEMO_ADM_1
(1,3,FRONT,{table})_{seq nr}
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 - 28
Contact
[email protected] if you have not received your personalized eKit.
Applying Templates to One Table
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 - 29
Contact
[email protected] if you have not received your personalized eKit.
Applying Templates to the Relational Model
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 - 30
Contact
[email protected] if you have not received your personalized eKit.
Managing Prefixes
Managing Prefixes
Often prefixes are added to the names of objects in order to represent different aspects of their life
cycle, ownership, or usage. Two alternatives are available: to permanently change or to
temporarily change the object names.
Permanently changing the object name: In some cases, you may want to replace or add a prefix to
objects in the design. You can apply these changes to tables or views, (columns and indexes also
are supported) represented in a specific subview, or to objects in an entire relational model in
which you either add a new prefix or replace an existing prefix.
Temporarily change the name of the object when you generate the DDL script (discussed in a
later lesson). In this case, define the old_prefix and then apply the name substitution during the
DDL generation. This approach has no impact on the names of the objects in the models.
To add a prefix to your model, perform the following:
1. Right-click the Relational model and select Change Object Names Prefix.
2. Specify a new prefix, click “Add new prefix,” select the objects that you want to apply it to,
and click Apply.
3. A message dialog box appears, indicating how many names have changed. Click OK.
4. Note that the names of the tables now have the prefix.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 - 31
Contact
[email protected] if you have not received your personalized eKit.
Quiz
Answer: a
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 - 32
Contact
[email protected] if you have not received your personalized eKit.
Quiz
Answer: b, d
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 - 33
Contact
[email protected] if you have not received your personalized eKit.
Practice 15-1 Overview: Create an Initial
Relational Model
This practice covers the following topics:
1. Creating a glossary
2. Engineering the model to a relational model.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 - 34
Contact
[email protected] if you have not received your personalized eKit.
Mapping Exclusive Relationships to Foreign Keys
Entities
Exclusive
Foreign
keys
Tables
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 - 35
Contact
[email protected] if you have not received your personalized eKit.
Engineering Exclusive Relationships
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 - 36
Contact
[email protected] if you have not received your personalized eKit.
Mapping Subtypes to Tables
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 - 37
Contact
[email protected] if you have not received your personalized eKit.
Engineering Subtypes
Engineering Subtypes
The default engineering strategy for an entity type hierarchy is to create a single table. When you
engineer with the default strategy the subtypes attributes will be added to the super type table. In
the example in the slide, the EXEMPT EMPLOYEE and NON-EXEMPT EMPLOYEE subtype
entities and all their attributes will be engineered into the EMPLOYEES table.
To determine which forward engineering strategy to use, the designer should look at the DFD or
business needs/ application requirements and also at the data access requirements. The DFD,
crosschecked with the ERD, will show whether, for example, the super type is generally queried
and updated (a one-table design is the better choice), or whether there is an emphasis on using
subtype info by itself (separate table design).
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 - 38
Contact
[email protected] if you have not received your personalized eKit.
Mapping Subtypes to a Single Table
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 - 39
Contact
[email protected] if you have not received your personalized eKit.
Changing the FWD Engineering Strategy
“Table per child” produces two tables for each of the subtypes.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 - 40
Contact
[email protected] if you have not received your personalized eKit.
Engineering Subtypes to Table per Child
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 - 41
Contact
[email protected] if you have not received your personalized eKit.
Mapping Subtypes for a Table per Child
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 - 42
Contact
[email protected] if you have not received your personalized eKit.
Changing the FWD Engineering Strategy
“Table for each entity” produces three tables: one for the super
type, and one for each subtype.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 - 43
Contact
[email protected] if you have not received your personalized eKit.
Mapping Subtypes for a Table for Each Entity
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 - 44
Contact
[email protected] if you have not received your personalized eKit.
Quiz
Answer: d
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 - 45
Contact
[email protected] if you have not received your personalized eKit.
Applying General Options
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 - 46
Contact
[email protected] if you have not received your personalized eKit.
Setting Compare/Copy Options
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 - 47
Contact
[email protected] if you have not received your personalized eKit.
Viewing the Mapping Comparison
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 - 48
Contact
[email protected] if you have not received your personalized eKit.
Synchronizing Deleted Objects
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 - 49
Contact
[email protected] if you have not received your personalized eKit.
Identifying Overlapping and Folding Keys
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 - 50
Contact
[email protected] if you have not received your personalized eKit.
Identifying Overlapping and Folding Keys
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 - 51
Contact
[email protected] if you have not received your personalized eKit.
Summary
Summary
In this lesson, you should have learned how to use the Oracle SQL Developer Data Modeler
engineering tool to engineer your logical model to a relational model, and how logical objects map
to relational objects.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 - 52
Contact
[email protected] if you have not received your personalized eKit.
Practice 15-2 Overview: Forward
Engineer a Model
This practice covers the following topics:
1. Defining the FWD engineering strategy for an entity type
hierarchy
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.15 - 53
Contact
[email protected] if you have not received your personalized eKit.
Oracle University and Bridge Human Skills Developments,GCC use onlyฺ
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
violation of Oracle copyright. All WDP students must receive an eKit watermarked with their name and email. Contact
[email protected] if you have not received your personalized eKit.
Oracle University and Bridge Human Skills Developments,GCC use onlyฺ
Evaluating Your Design for Database Creation
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
violation of Oracle copyright. All WDP students must receive an eKit watermarked with their name and email. Contact
[email protected] if you have not received your personalized eKit.
Overview
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name VI - 2
and email. Contact
[email protected] if you have not received your personalized eKit.
Oracle University and Bridge Human Skills Developments,GCC use onlyฺ
Analyzing Your Relational Model
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
violation of Oracle copyright. All WDP students must receive an eKit watermarked with their name and email. Contact
[email protected] if you have not received your personalized eKit.
Objectives
Objectives
In this lesson, you learn how to modify table properties and when to create an index or view.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.16 -2
Contact
[email protected] if you have not received your personalized eKit.
General Options: Relational Diagram
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.16 -3
Contact
[email protected] if you have not received your personalized eKit.
Reviewing Table Properties
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.16 -4
Contact
[email protected] if you have not received your personalized eKit.
Previewing the DDL for a Table
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.16 -5
Contact
[email protected] if you have not received your personalized eKit.
General Options: Classification Types
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.16 -6
Contact
[email protected] if you have not received your personalized eKit.
Assigning a Classification Type to One Table
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.16 -7
Contact
[email protected] if you have not received your personalized eKit.
Changing the Color for Classified Tables
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.16 -8
Contact
[email protected] if you have not received your personalized eKit.
Changing the Prefix for Classified Tables
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.16 -9
Contact
[email protected] if you have not received your personalized eKit.
Assigning Classification Types to Multiple Tables
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.16 - 10
Contact
[email protected] if you have not received your personalized eKit.
Reviewing Column Properties
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.16 - 11
Contact
[email protected] if you have not received your personalized eKit.
Defining a Unique Constraint
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.16 - 12
Contact
[email protected] if you have not received your personalized eKit.
Defining Indexes
Defining Indexes
Indexes are database structures that are stored separately from the tables that they reference.
Indexes provide quick access to rows of data and help to avoid full table scans. Indexes facilitate
table joins, and ensure the uniqueness of a value if it is defined as unique. Indexes are used
automatically when referenced in the WHERE clause of a query if the column is not modified.
Types of indexes:
• B-Tree: An ordered list of values divided into ranges. By associating a key with a row or
range of rows, B-trees provide excellent retrieval performance for a wide range of queries,
including exact match and range searches. The example in the slide shows an index on the
department_id column, which is a foreign key column in the employees table. B-tree indexes
have the following subtypes: index-organized tables, reverse key indexes, descending
indexes, or B-tree cluster indexes. Use B-Tree indexes for:
- Columns used in join conditions to improve performance on joins
- Columns that contain a wide range of values
- Columns that are often used in the WHERE clause of a query
- Columns that are often used in an ORDER BY clause of a query
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.16 - 13
Contact
[email protected] if you have not received your personalized eKit.
Defining Indexes (continued)
• Bitmap: An index entry uses a bitmap to point to multiple rows. In contrast, a B-tree index entry
points to a single row. A bitmap join index is a bitmap index for the join of two or more tables. In
a bitmap index, the database stores a bitmap for each index key. In a conventional B-tree
index, one index entry points to a single row. In a bitmap index, each index key stores pointers
to multiple rows. Bitmap indexes are primarily designed for data warehousing or environments
in which queries reference many columns in an ad hoc fashion. Use bitmap indexing when
columns have few distinct values (for example, when a column containing indicator values
(Y/N), or when a column is used for gender).
• Function Based: Includes columns that are either transformed by a function, such as the
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.16 - 14
Contact
[email protected] if you have not received your personalized eKit.
Defining a Table-Level Constraint
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.16 - 15
Contact
[email protected] if you have not received your personalized eKit.
Specifying Volume Properties
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.16 - 16
Contact
[email protected] if you have not received your personalized eKit.
Defining Spatial Properties
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.16 - 17
Contact
[email protected] if you have not received your personalized eKit.
Defining Spatial Properties
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.16 - 18
Contact
[email protected] if you have not received your personalized eKit.
Defining Spatial Properties
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.16 - 19
Contact
[email protected] if you have not received your personalized eKit.
Defining Spatial Properties
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.16 - 20
Contact
[email protected] if you have not received your personalized eKit.
Defining Column Groups
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.16 - 21
Contact
[email protected] if you have not received your personalized eKit.
Analyzing Your View
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.16 - 22
Contact
[email protected] if you have not received your personalized eKit.
Analyzing Your View (continued)
Disadvantages include:
• Views are somewhat slower, because the parse time is slightly longer. After a table and its
columns are found, the query can be immediately executed.
• You cannot insert, update, or delete directly into a view.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.16 - 23
Contact
[email protected] if you have not received your personalized eKit.
Quiz
You have a table that is very large and you want to increase
query access performance. Which of the following would you
do to handle this requirement?
Answer: c
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.16 - 24
Contact
[email protected] if you have not received your personalized eKit.
Quiz
Answer: d
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.16 - 25
Contact
[email protected] if you have not received your personalized eKit.
Summary
Summary
In this lesson, you should have learned how to modify table properties and when to create an
index or view.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.16 - 26
Contact
[email protected] if you have not received your personalized eKit.
Practice 16-1 Overview: Analyze Your Relational
Model
This practice covers the following topics:
• Evaluating your relational model
• Adding additional design components based on a set of
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.16 - 27
Contact
[email protected] if you have not received your personalized eKit.
Oracle University and Bridge Human Skills Developments,GCC use onlyฺ
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
violation of Oracle copyright. All WDP students must receive an eKit watermarked with their name and email. Contact
[email protected] if you have not received your personalized eKit.
Oracle University and Bridge Human Skills Developments,GCC use onlyฺ
Denormalizing Your Design to Increase
Performance
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
violation of Oracle copyright. All WDP students must receive an eKit watermarked with their name and email. Contact
[email protected] if you have not received your personalized eKit.
Objectives
Objectives
In this lesson, you learn some denormalization techniques that can optimize your relational model.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.17 -2
Contact
[email protected] if you have not received your personalized eKit.
What Is Denormalization?
• Denormalization:
– Is the process of adding redundancy to the data to improve
performance
What Is Denormalization?
Denormalization aids the process of systematically adding redundancy to the database to improve
performance after other possibilities, such as indexing, have failed. Denormalization can improve
certain types of data access dramatically, but there is no success guaranteed and there is always
a cost. The data model becomes less robust, and it will always slow Data Manipulation Language
(DML) down. It complicates processing and introduces the possibility of data integrity problems. It
always requires additional programming to maintain the denormalized data.
Hints for Denormalizing
• Always create a conceptual data model that is completely normalized.
• Consider denormalization as the last option to boost performance. Never presume that
denormalization is required.
• Do denormalization during the database design.
• After performance objectives have been met, do not implement any further denormalization.
• Fully document all denormalization, stating what was done to the tables, and what
application code was added to compensate for the denormalization.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.17 -3
Contact
[email protected] if you have not received your personalized eKit.
Storing Derivable Values
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.17 -4
Contact
[email protected] if you have not received your personalized eKit.
Pre-Joining Tables
Pre-join the
PRODUCT_INFORMATION
Pre-Joining Tables
You can pre-join tables by including a nonkey column in a table, when the actual value of the
primary key, and consequentially the foreign key, has no business meaning. By including a
nonkey column that has business meaning, you can avoid joining tables, thus speeding up specific
queries.
You must include application code that updates the denormalized column each time that the
“master” column value changes in the referenced record.
This denormalizing technique is appropriate when:
• Frequent queries against many tables are required.
• Slightly stale data is acceptable.
Advantages for using this technique include:
• Time-consuming joins can be avoided.
• Updates may be postponed when stale data is acceptable.
Disadvantages for using this technique include:
• Extra DML is needed to update the original nondenormalized column.
• Extra columns and possibly larger indexes require more working and disk space.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.17 -5
Contact
[email protected] if you have not received your personalized eKit.
Hard-Coded Values
Remove the foreign key and hard code the allowable values in
a check constraint.
Hard-Coded Values
If a reference or lookup table contains records that remain constant, you can consider hard-coding
those values into the application code. This will mean that you will not need to join tables to
retrieve the list or reference values. This is a special type of denormalization, when values are
kept outside the table in the database. In the example in the slide, the PRODUCT_STATUS
column contains values that are constant. In this case, you can create a check constraint on the
PRODUCT_STATUS column that will validate the values. Note that a check constraint, though it
resides in the database, is still a form of hard coding. Whenever a new value of
PRODUCT_STATUS is needed the constraint must be modified.
This denormalizing technique is appropriate when:
• The set of allowable values can reasonably be considered to be static during the life cycle of
the system
• The set of possible values is small, perhaps less than 30.
Advantages for using this technique include:
• Implementing a look-up table is not necessary.
• Joins to a look-up table are not necessary.
Disadvantages for using this technique include:
• Changing look-up values requires recoding and retesting.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.17 -6
Contact
[email protected] if you have not received your personalized eKit.
Hard-Coded Values
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.17 -7
Contact
[email protected] if you have not received your personalized eKit.
Keeping Details with the Master Table
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.17 -8
Contact
[email protected] if you have not received your personalized eKit.
Repeating Current Detail with the Master Table
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.17 -9
Contact
[email protected] if you have not received your personalized eKit.
End Date Columns
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.17 - 10
Contact
[email protected] if you have not received your personalized eKit.
Current Indicator Column
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.17 - 11
Contact
[email protected] if you have not received your personalized eKit.
Hierarchy Level Indicator
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.17 - 12
Contact
[email protected] if you have not received your personalized eKit.
Short Circuit Keys
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.17 - 13
Contact
[email protected] if you have not received your personalized eKit.
Quiz
Answer: b
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.17 - 14
Contact
[email protected] if you have not received your personalized eKit.
Quiz
Answer: a
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.17 - 15
Contact
[email protected] if you have not received your personalized eKit.
Summary
Summary
In this lesson, you should have learned some denormalization techniques and when to use them.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.17 - 16
Contact
[email protected] if you have not received your personalized eKit.
Practice 17-1 Overview: Denormalize Your
Relational Model
This practice covers the following topics:
• Evaluating a relational model and denormalizing it based
on a set of requirements
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.17 - 17
Contact
[email protected] if you have not received your personalized eKit.
Oracle University and Bridge Human Skills Developments,GCC use onlyฺ
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
violation of Oracle copyright. All WDP students must receive an eKit watermarked with their name and email. Contact
[email protected] if you have not received your personalized eKit.
Oracle University and Bridge Human Skills Developments,GCC use onlyฺ
Defining Your Physical Model
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
violation of Oracle copyright. All WDP students must receive an eKit watermarked with their name and email. Contact
[email protected] if you have not received your personalized eKit.
Objectives
Objectives
In this lesson, you learn how to explain what a physical model is and how to create objects in the
physical model.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.18 -2
Contact
[email protected] if you have not received your personalized eKit.
What Is a Physical Model?
• A physical model:
– Is an extension of a relational model that describes how the
objects should be implemented in specific database
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.18 -3
Contact
[email protected] if you have not received your personalized eKit.
Creating a Physical Model
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.18 -4
Contact
[email protected] if you have not received your personalized eKit.
RDBMS Administration
RDBMS Administration
Each physical model is based on an RDBMS site object. An RDBMS site is a name associated
with a type of database supported by Oracle SQL Developer Data Modeler. Several RDBMS sites
are predefined (for example, for Oracle Database 11g and Microsoft SQL Server 2005). You can
also use the RDBMS Site Editor to create user-defined RDBMS sites as aliases for supported
types of databases; for example, you might create sites named Test and Production, so that you
will be able to generate different physical models and then modify them.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.18 -5
Contact
[email protected] if you have not received your personalized eKit.
RDBMS Administration:
Changing the Default RDBMS Sites
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.18 -6
Contact
[email protected] if you have not received your personalized eKit.
Creating Physical Model Objects
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.18 -7
Contact
[email protected] if you have not received your personalized eKit.
Creating Physical Model Objects (continued)
• Disk Groups: A group of disks that Oracle Database manages as a logical unit, evenly
spreading each file across the disks to balance I/O. Oracle Database also automatically
distributes database files across all available disks in disk groups and rebalances storage
automatically whenever the storage configuration changes.
• External Tables: A table that is stored outside the database but is available for access as
though it were a table in the database
• Roles: A set of privileges that can be granted to users or to other roles. You can use roles to
administer database privileges. You can add privileges to a role and then grant the role to a
user. The user can then enable the role and exercise the privileges granted by the role.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.18 -8
Contact
[email protected] if you have not received your personalized eKit.
Adding a User
Adding a User
In order to generate the relational model objects into a particular user schema, you need to create
the user in Oracle SQL Developer Data Modeler. In the example in the slide, a new user,
DMUSER, is created and the tablespace created in the previous slide is selected in the
Tablespace field. You can specify any roles or privileges here and then click OK to create the
user.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.18 -9
Contact
[email protected] if you have not received your personalized eKit.
Adding Segment Templates (Storage)
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.18 - 10
Contact
[email protected] if you have not received your personalized eKit.
Associating Physical Objects with Your Table
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.18 - 11
Contact
[email protected] if you have not received your personalized eKit.
Propagating Properties to Other Physical Objects
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.18 - 12
Contact
[email protected] if you have not received your personalized eKit.
Partitioning a Table
Partitioning a Table
Partitioning a table improves data load and retrieval performance for large tables. In the example
in the slide, you may want to partition the EMPLOYEES table on the HIREDATE column so that
you can retrieve employee information for a range of dates on which employees were hired.
To create a partitioned table, perform the following steps:
1. In the Table Properties window, select Yes for Partitioned.
2. Click the Partitioning tab.
3. Select the type of partitioning that you want to perform from the drop-down list. In the
example in the slide, you select RANGE.
4. Select the column that you want to partition and click Add.
5. Click OK.
These steps create the definition of the partition. In the next slide, you determine the partition
definitions themselves.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.18 - 13
Contact
[email protected] if you have not received your personalized eKit.
Partitioning a Table
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.18 - 14
Contact
[email protected] if you have not received your personalized eKit.
Creating a Materialized View
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.18 - 15
Contact
[email protected] if you have not received your personalized eKit.
Cloning a Database
3
1
Cloning a Database
If you want to upgrade a database or copy a database to another physical model (that, for
example, you want to use for development [versus production] purposes), you can clone your
physical model to another physical model so that it has all the same physical objects. In Oracle
SQL Developer Data Modeler, this is called cloning your database. To clone a database, you
perform the following tasks:
1. Create your physical model as discussed previously in this lesson. Right-click your physical
model and select Save.
2. You must create a new RDBMS site. Select Tools > RDBMS Site Administration. Click Add,
enter a name, select the RDBMS type, and click OK.
3. Right-click Physical Model in your object browser.
4. Select the RDBMS that you just created, and click OK.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.18 - 16
Contact
[email protected] if you have not received your personalized eKit.
Cloning a Database
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.18 - 17
Contact
[email protected] if you have not received your personalized eKit.
Quiz
Answer: b, c, d
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.18 - 18
Contact
[email protected] if you have not received your personalized eKit.
Summary
Summary
In this lesson, you should have learned how to create a physical model, create some physical
model objects, and refine some relational model objects in the physical model.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.18 - 19
Contact
[email protected] if you have not received your personalized eKit.
Practice 18-1 Overview: Create a Physical Model
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.18 - 20
Contact
[email protected] if you have not received your personalized eKit.
Oracle University and Bridge Human Skills Developments,GCC use onlyฺ
Generating Your Database
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
violation of Oracle copyright. All WDP students must receive an eKit watermarked with their name and email. Contact
[email protected] if you have not received your personalized eKit.
Objectives
Objectives
In this lesson, you generate DDL for your database.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.19 -2
Contact
[email protected] if you have not received your personalized eKit.
Database Generation
SQL Script
CREATE TABLE DEPARTMENTS
Information Requirements (
ID NUMBER (6) NOT NULL ,
Name VARCHAR2 (50)
Logical Data );
ALTER TABLE DEPARTMENTS
Database Generation
The Database Generation process involves completing the physical model and generating the
SQL script that will contain the SQL statements necessary to create the database. The purpose of
the physical model is to describe a database in terms of Oracle Database objects (tablespaces,
tables, views, triggers, and so on) that are based on a relational model. Each relational model can
have one or more physical models. Each physical model is based on an RDBMS site object. An
RDBMS site is a name associated with a type of database supported by data modeling such as
the Oracle Database 11g.
You will Oracle SQL Developer Data Modeler to generate the SQL script that you use to generate
your database. In the slide is a portion of the SQL script that was generated for the
DEPARTMENTS and EMPLOYEES tables.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.19 -3
Contact
[email protected] if you have not received your personalized eKit.
Generating DDL:
Selecting a Database
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.19 -4
Contact
[email protected] if you have not received your personalized eKit.
Generating DDL:
‘Create’ Selection
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.19 -5
Contact
[email protected] if you have not received your personalized eKit.
Generating DDL:
DDL Script
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.19 -6
Contact
[email protected] if you have not received your personalized eKit.
Generating DDL:
Assigned to Users
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.19 -7
Contact
[email protected] if you have not received your personalized eKit.
Generating DDL:
“Drop” Selection
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.19 -8
Contact
[email protected] if you have not received your personalized eKit.
Generating DDL:
Name Substitution
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.19 -9
Contact
[email protected] if you have not received your personalized eKit.
Generating DDL:
Including Table Scripts
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.19 - 10
Contact
[email protected] if you have not received your personalized eKit.
Generating DDL:
Masking Oracle Errors
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.19 - 11
Contact
[email protected] if you have not received your personalized eKit.
Generating DDL:
Masking Oracle Errors
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.19 - 12
Contact
[email protected] if you have not received your personalized eKit.
Generating DDL:
Using Find
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.19 - 13
Contact
[email protected] if you have not received your personalized eKit.
DDL General Options
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.19 - 14
Contact
[email protected] if you have not received your personalized eKit.
DDL General Options (continued)
• Use 'Data Type Kind' property in Compare functionality: Controls whether the data type
kind (such as domain, logical type, or distinct type) should be considered to prevent types of
different kinds from generating the same native data type (for example, preventing a domain
and a logical type from resulting in Number(7,2))
• Use “Schema” property in Compare functionality
• Case sensitive names in Compare functionality
• Generate short form of NOT NULL constraint
• Use quoted identifiers
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.19 - 15
Contact
[email protected] if you have not received your personalized eKit.
DDL General Options
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.19 - 16
Contact
[email protected] if you have not received your personalized eKit.
DDL/Migration General Options
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.19 - 17
Contact
[email protected] if you have not received your personalized eKit.
Summary
Summary
In this lesson, you should have learned how to generate the DDL for your database from a model.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.19 - 18
Contact
[email protected] if you have not received your personalized eKit.
Practice 19-1 Overview: Generate DDL
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.19 - 19
Contact
[email protected] if you have not received your personalized eKit.
Oracle University and Bridge Human Skills Developments,GCC use onlyฺ
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
violation of Oracle copyright. All WDP students must receive an eKit watermarked with their name and email. Contact
[email protected] if you have not received your personalized eKit.
Oracle University and Bridge Human Skills Developments,GCC use onlyฺ
Other Needs for Modeling
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
violation of Oracle copyright. All WDP students must receive an eKit watermarked with their name and email. Contact
[email protected] if you have not received your personalized eKit.
Overview
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. All Data Modeling
WDP students andanRelational
must receive Database
eKit watermarked Design
with their name VII - 2
and email. Contact
[email protected] if you have not received your personalized eKit.
Oracle University and Bridge Human Skills Developments,GCC use onlyฺ
Altering an Existing Design
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
violation of Oracle copyright. All WDP students must receive an eKit watermarked with their name and email. Contact
[email protected] if you have not received your personalized eKit.
Objectives
Objectives
In this lesson, you learn how to import an existing database, reverse engineer to create the logical
model, compare and merge models, export your model, and analyze your model within SQL
Developer.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.20 -2
Contact
[email protected] if you have not received your personalized eKit.
Approaches to Modeling
Approaches to Modeling
The bottom-up modeling approach modifies an existing database definition. Bottom-up modeling
builds a database design based on either metadata extracted from an existing database or a file
with DDL code that implements an existing database. The resulting database is represented as a
relational model and a physical model, and you reverse engineer the logical model from the
relational model. Bottom-up modeling can involve the steps listed in the slide, but you can
abbreviate or skip some steps as appropriate for your needs.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.20 -3
Contact
[email protected] if you have not received your personalized eKit.
Using Import
Using Import
There are a number of objects that can be imported to create a model. These include:
• DDL File: Create a relational model based on a DDL file. DDL files can originate from any
supported database type and version. The file to be imported usually has the extension .ddl
or .sql. The import process creates a new relational model with the name of the imported
DDL file and opens a physical model reflecting the source site.
• Cube Views Metadata: Creates a multidimensional model based on an existing
implementation, as reflected in a specified XML file
• VAR File: Creates a logical and/or relational model based on an exported Bachman
formatted metadata file
• From Microsoft XMLA: Creates a multidimensional model stored in the Microsoft XMLA file
format
• ERwin 4.x File: Captures logical and relational models from the ERwin modeling tool.
Specify the XML file containing definitions of the models to be imported.
• Data Dictionary: Creates a relational model and a physical model based on an existing
database implementation. The data dictionary can be from any supported database type and
version.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.20 -4
Contact
[email protected] if you have not received your personalized eKit.
Using Import (continued)
• Oracle Designer Model: Creates a relational model and a physical model based on an
existing Oracle Designer model
• Data Modeler Design: Captures the logical model and any relational and data type models
from a design previously exported from Oracle SQL Developer Data Modeler
• Domains: Creates domains based on a domain file
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.20 -5
Contact
[email protected] if you have not received your personalized eKit.
Importing an Existing Database
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.20 -6
Contact
[email protected] if you have not received your personalized eKit.
Importing an Existing Database
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.20 -7
Contact
[email protected] if you have not received your personalized eKit.
Importing an Existing Database
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.20 -8
Contact
[email protected] if you have not received your personalized eKit.
Importing an Existing Database
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.20 -9
Contact
[email protected] if you have not received your personalized eKit.
Importing an Existing Database
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.20 - 10
Contact
[email protected] if you have not received your personalized eKit.
Importing Domains
Importing Domains
You can establish a standard domain file that you use to specify the data type for each column or
attribute. The file is created from the Tools > Domains Administration page. To import the file,
perform the following steps:
1. Select File > Import > Domains.
2. Click Open Domain File
3. Select the .xml file that has all the domains, and click Open.
4. You see the list of domains and a comparison of what will be created in the model you are
importing them into. In the example in the slide, the untitled model is empty so the two
domains will be created.
5. Click Import.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.20 - 11
Contact
[email protected] if you have not received your personalized eKit.
Quiz
Answer: c, d
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.20 - 12
Contact
[email protected] if you have not received your personalized eKit.
Creating a Logical Data Model from Your
Relational Model
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.20 - 13
Contact
[email protected] if you have not received your personalized eKit.
Reviewing and Making Changes to Your Logical
Model
Example changes:
• Added a new
DEPENDENT entity and
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.20 - 14
Contact
[email protected] if you have not received your personalized eKit.
Checking Design Rules
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.20 - 15
Contact
[email protected] if you have not received your personalized eKit.
Forward Engineering to a New Relational Model
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.20 - 16
Contact
[email protected] if you have not received your personalized eKit.
Forward Engineering to a New Relational Model
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.20 - 17
Contact
[email protected] if you have not received your personalized eKit.
Comparing Your Relational Model Changes with
What Is in the Database
Import from the data dictionary.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.20 - 18
Contact
[email protected] if you have not received your personalized eKit.
Comparing Your Relational Model Changes with
What Is in the Database
Swap the target model, and select the modified relational model.
Comparing Your Relational Model Changes with What Is in the Database (continued)
1. Select the schema that contains the objects that you want to compare, and click Next.
2. Select the schema objects that you want to compare, and click Next.
3. In the Generate Design window (step 4 of the wizard), select the relational_2 model from the
drop-down list. This is the changed model that you want to compare against.
4. Select the “Swap target model” check box to set the target model to be the database, the
one you are importing.
5. Click Finish.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.20 - 19
Contact
[email protected] if you have not received your personalized eKit.
Comparing Your Relational Model Changes with
What Is in the Database
• New COST_CENTER
column in the
DEPARTMENTS table
Comparing Your Relational Model Changes with What Is in the Database (continued)
The Compare Models window appears. You can now see what will happen to the database based
on the changes that you made to the relational model.
• The COST_CENTER column will be added to the DEPARTMENTS table.
• A new DEPENDENT table will be created.
• A new NAME column in the EMPLOYEES table will replace the FIRST_NAME and
LAST_NAME columns that were deleted.
• The columns in the EMPLOYEES table will be reordered so that HIRE_DATE appears after
the new NAME column.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.20 - 20
Contact
[email protected] if you have not received your personalized eKit.
Mapping to an Existing Column
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.20 - 21
Contact
[email protected] if you have not received your personalized eKit.
Compare Mapping
Compare Mapping
Because you have mapped the existing columns, when you run the comparison the next time and
click Compare Mapping, the mapping will be displayed.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.20 - 22
Contact
[email protected] if you have not received your personalized eKit.
Previewing the DDL
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.20 - 23
Contact
[email protected] if you have not received your personalized eKit.
Comparing and Merging Two Models
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.20 - 24
Contact
[email protected] if you have not received your personalized eKit.
Comparing and Merging Two Models
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.20 - 25
Contact
[email protected] if you have not received your personalized eKit.
Comparing and Merging Two Models
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.20 - 26
Contact
[email protected] if you have not received your personalized eKit.
Comparing and Merging Two Models
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.20 - 27
Contact
[email protected] if you have not received your personalized eKit.
Exporting Your Model
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.20 - 28
Contact
[email protected] if you have not received your personalized eKit.
Exporting to a Data Modeling Design
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.20 - 29
Contact
[email protected] if you have not received your personalized eKit.
Producing Data Modeling Metadata Reports
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.20 - 30
Contact
[email protected] if you have not received your personalized eKit.
Steps to Produce Data Modeler Reports
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.20 - 31
Contact
[email protected] if you have not received your personalized eKit.
Creating a SYSTEM Connection
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.20 - 32
Contact
[email protected] if you have not received your personalized eKit.
Creating a New User for Reporting
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.20 - 33
Contact
[email protected] if you have not received your personalized eKit.
Creating a Connection for the New Reporting User
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.20 - 34
Contact
[email protected] if you have not received your personalized eKit.
Exporting Your Model to the Reporting Schema
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.20 - 35
Contact
[email protected] if you have not received your personalized eKit.
Exporting Your Model to the Reporting Schema
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.20 - 36
Contact
[email protected] if you have not received your personalized eKit.
Running Data Modeler Reports
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.20 - 37
Contact
[email protected] if you have not received your personalized eKit.
Running Data Modeler Reports
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.20 - 38
Contact
[email protected] if you have not received your personalized eKit.
Running Data Modeler Reports
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.20 - 39
Contact
[email protected] if you have not received your personalized eKit.
Running Data Modeler Reports
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.20 - 40
Contact
[email protected] if you have not received your personalized eKit.
Quiz
Answer: a, b, c, d
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.20 - 41
Contact
[email protected] if you have not received your personalized eKit.
Summary
Summary
In this lesson, you learned how to re-engineer and existing database using import, reverse
engineer, compare/merge, export and generating data modeler reports.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.20 - 42
Contact
[email protected] if you have not received your personalized eKit.
Practice 20-1 Overview: Re-Engineer the HR
Schema
This practice covers the following topics:
• Importing the HR schema from the data dictionary
• Reverse engineering the model to create a logical data
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.20 - 43
Contact
[email protected] if you have not received your personalized eKit.
Oracle University and Bridge Human Skills Developments,GCC use onlyฺ
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
violation of Oracle copyright. All WDP students must receive an eKit watermarked with their name and email. Contact
[email protected] if you have not received your personalized eKit.
Oracle University and Bridge Human Skills Developments,GCC use onlyฺ
Creating a Multidimensional Model
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
violation of Oracle copyright. All WDP students must receive an eKit watermarked with their name and email. Contact
[email protected] if you have not received your personalized eKit.
Objectives
Objectives
In this lesson, you examine what each multidimensional object is and how to generate a
multidimensional model by using an existing DDL file.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.21 -2
Contact
[email protected] if you have not received your personalized eKit.
What Is a Multidimensional Model?
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.21 -3
Contact
[email protected] if you have not received your personalized eKit.
Measures
Measures
Measures represent factual data; they are sometimes called “facts.” Typical examples of
measures are sales, cost, profit, and margin.
Measures are organized by one or more dimensions. (Dimensions are defined following this topic.)
The image in the slide represents a generic measure that is organized by three dimensions.
Visualizing Measures
Many people visualize measures as being of a multidimensional shape, such as a cube, in which
the edges of the shape are the dimensions and the contents of the shape are the measure values.
In this context, the measure values populate the cells of a logical cube.
There is a tendency to draw three-dimensional (3D) shapes and refer to “cubes” (which are 3D)
simply because they are easy to visualize. Of course, measures in a dimensional model can have
1, 2, 3, 4, 5, 6, 7, or many more dimensions.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.21 -4
Contact
[email protected] if you have not received your personalized eKit.
Measure Types
Measure Types
Measures may be stored, or calculated at query time.
Stored Measures
Stored measures are loaded and stored at the leaf level. Commonly, there is also a percentage of
summary data that is stored. Summary data that is not stored is dynamically aggregated when
queried.
Calculated Measures
Calculated measures are measures whose values are calculated dynamically at query time. Only
the calculation rules are stored in the database.
Common calculations include measures such as ratios, differences, moving totals, and averages.
Calculations do not require disk storage space, and they do not extend the processing time
required for data maintenance.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.21 -5
Contact
[email protected] if you have not received your personalized eKit.
Dimensions
Dimensions:
• Form the “edges” of
the measure
Q1 Q2 Q3 Q4
Time
Dimensions
Dimensions provide meaning to the measure data. Dimensions are characterized by the following:
• They identify and categorize your measure data.
• They shape measures by forming the edges of the measures.
Examples of dimensions include product, geography, time, and distribution channel.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.21 -6
Contact
[email protected] if you have not received your personalized eKit.
Sharing Dimensions
Customer Customer
Time Time
Product COST
Time
Sharing Dimensions
One of the characteristics of the dimensional model is that the dimensions and their members are
shared by all measures, of whatever shape. In the example in the slide, there are three measures,
organized in two ways:
• Sales and Quantity (sold) have the same shape; they are both dimensioned by the
Customer, Product, and Time dimensions.
• The Cost measure is dimensioned by Product and Time only. It does not use the Customer
dimension because, in this example, the cost does not vary by customer. Therefore, the
Customer dimension is not used by the Cost measure.
Dimensions are stored once and are used repeatedly. That is, there is just one Product dimension
in this example, even though it appears three times in the diagram. This feature has many
benefits. For example, with only one list of products to manage, a security scope may be placed
on the product dimension, and all of its dependent objects are automatically scoped.
In addition, measures of different shapes that share dimensions may be combined to create new
measures. The new measure is organized by the super-set of the dimensions. For example, a
calculated measure named Profit may be created by combining Quantity, Cost, and Sales. The
Profit measure would be dimensioned by the Customer, Product, and Time dimensions.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.21 -7
Contact
[email protected] if you have not received your personalized eKit.
Hierarchy
Hierarchy
A hierarchy is a logical structure that groups like members of a dimension together for the purpose
of analysis.
For example:
• A Time dimension might have a hierarchy that describes how months are grouped together
to represent a quarter and how quarters are grouped together to represent a full year.
• An Organization dimension might have a hierarchy that makes it easy for you to identify the
direct reports of a specific manager.
Each dimension can have multiple hierarchies if required. For example, the time dimension can
have a hierarchy that represents the Julian calendar and another hierarchy that represents a fiscal
calendar.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.21 -8
Contact
[email protected] if you have not received your personalized eKit.
Hierarchy (continued)
A dimension’s structure is organized hierarchically based on parent-child relationships. These
relationships enable:
• Navigation between levels: Hierarchies on dimensions enable drilling down to lower levels or
navigating (rolling up) to higher levels. Drilling down on the Time dimension member 2005 will
likely navigate you to the quarters Q1 2005 through Q4 2005. In a calendar year hierarchy,
drilling down on Q1 2005 would navigate you to the months January 05 through March 05.
These kinds of relationships make it easy for users to navigate large volumes of
multidimensional data.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Data
All WDP Modeling
students andanRelational
must receive Database
eKit watermarked Design
with their name and email.21 -9
Contact
[email protected] if you have not received your personalized eKit.
Hierarchy: Example
• Hierarchies enable
you to navigate from
the lowest level to the Total Product
Hierarchy: Example
In this example, you can do the following in the Product hierarchy:
• Navigate up through each level in the hierarchy from the lowest level to the highest level
• Navigate down the hierarchy from the highest level to the lowest level
• Aggregate data from the lowest level (individual products) up through the hierarchy to the
highest level (total product)
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.21 - 10
Contact
[email protected] if you have not received your personalized eKit.
Level
Levels
Product
L1 L2 L3 Y1 Y2 Y3 …
Level
Each level represents a position in the hierarchy. The members at different levels have a one-to-
many parent-child relationship. A hierarchy typically contains several levels, and a single level can
be included in more than one hierarchy.
If data for the Sales measure is stored at the Product level, the higher levels of the product
dimension enable the sales data to be aggregated correctly into Subcategory, Category, and All
Products levels.
If there are multiple hierarchies built over a dimension, it may be that a level would appear in more
than one hierarchy or may exist in only one hierarchy.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.21 - 11
Contact
[email protected] if you have not received your personalized eKit.
Types of Hierarchy
Level-based Value-based
hierarchy hierarchy
VP Admin VP
Quarters
Types of Hierarchy
Level-Based
Most of the hierarchies are level-based, including the Product dimension hierarchy shown in the
previous slide and the Time dimension hierarchy shown in this slide. In the time hierarchy
example, there are Day, Month, Quarter, and Year levels in the hierarchy.
Sales forces also have a level-based structure, as in the following example:
• Representative > Area > Region > Country > Continent > World
Value-Based
Other dimensions may have hierarchies that are not strictly level-based. Typical examples include
Organizational, Financial, Cost Center, and Line Item hierarchies.
For example, there is clearly a hierarchy in an organization chart, but all the direct reports of the
President may not be at the same level. In the example, the two VPs (vice presidents) and the
President’s Admin (administrative assistant) are all direct reports of the President but are not at
the same level. The VPs are not at the Admin level, and the Admin is not at the VP level.
Note: In Oracle SQL Developer Data Modeler, value-based hierarchies are referred to as “ragged
hierarchy links.”
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.21 - 12
Contact
[email protected] if you have not received your personalized eKit.
Attributes
Attributes
Dimensions may also have attributes, which are used to provide more information about members
of the dimension.
Description
Unless dimension-member IDs themselves are meaningful to end users, it is usually the case that
each dimension has “description” attributes that store the user-visible identifiers for the dimension
members.
Data Selection
Attributes are also useful when filtering that dimension for analysis. They can be used for data
selection.
How Are Attributes Applied?
• Some attributes are valid for all the members of the dimension, regardless of level. For
example, all products at all levels have a description.
• Other attributes are valid for certain levels or certain hierarchies only. For example, only
individual product items have a color.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.21 - 13
Contact
[email protected] if you have not received your personalized eKit.
Dimensional Model Summarized
Product Share
Brand
Sales Year to Date
Time
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.21 - 14
Contact
[email protected] if you have not received your personalized eKit.
Quiz
Answer: b
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.21 - 15
Contact
[email protected] if you have not received your personalized eKit.
Quiz
Answer: b, c
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.21 - 16
Contact
[email protected] if you have not received your personalized eKit.
Steps to Build a Multidimensional Model in Oracle
SQL Developer Data Modeler
1. Import an existing database to create a relational model.
2. Reverse engineer to create a logical model.
3. Engineer from an Oracle model to create the
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.21 - 17
Contact
[email protected] if you have not received your personalized eKit.
Importing a Database with Dimensions
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.21 - 18
Contact
[email protected] if you have not received your personalized eKit.
Importing a Database with Dimensions
Objects will be
merged into an
empty model.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.21 - 19
Contact
[email protected] if you have not received your personalized eKit.
Importing a Database with Dimensions
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.21 - 20
Contact
[email protected] if you have not received your personalized eKit.
Reverse Engineering Your Model
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.21 - 21
Contact
[email protected] if you have not received your personalized eKit.
Reverse Engineering Your Model
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.21 - 22
Contact
[email protected] if you have not received your personalized eKit.
Creating Your Multidimensional Model
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.21 - 23
Contact
[email protected] if you have not received your personalized eKit.
Reviewing Your Multidimensional Model
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.21 - 24
Contact
[email protected] if you have not received your personalized eKit.
Reviewing Multidimensional Object Properties
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.21 - 25
Contact
[email protected] if you have not received your personalized eKit.
Modifying Properties for the Time Dimension
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.21 - 26
Contact
[email protected] if you have not received your personalized eKit.
Reviewing Properties of Multidimensional Object
Components
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.21 - 27
Contact
[email protected] if you have not received your personalized eKit.
Reviewing Detailed Properties of Object
Components
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.21 - 28
Contact
[email protected] if you have not received your personalized eKit.
Creating New Multidimensional Objects
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.21 - 29
Contact
[email protected] if you have not received your personalized eKit.
Impact Analysis
Impact Analysis
To see what impact a particular table has with respect to the dimensional model and its mapping
within the relational model, examine the table properties in the relational model. Select the
Relational model tab, double-click the table, and select the Impact Analysis property. Expand the
tree to see the details. In the example in the slide, for the sales table, you see that it maps to the
sales cube in the multidimensional_1 model.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.21 - 30
Contact
[email protected] if you have not received your personalized eKit.
Creating an Oracle AW
Creating an Oracle AW
After you build a multidimensional model by using Oracle SQL Developer Data Modeler, one of
the options available to you is the creation of an Oracle analytic workspace (AW). An Oracle AW is
the multidimensional array-based storage model for the Oracle OLAP option. The Oracle OLAP
option is the advanced multidimensional engine inside Oracle Database that interacts directly with
Oracle AWs.
You can review and modify an AW in Oracle Analytic Workspace Manager (AWM 11g). Perform
the following steps to produce the desired Oracle AW.
1. In Oracle SQL Developer, first create a user that will store the Oracle AW that is exported
from Oracle SQL Developer Data Modeler. This user must have the access privileges
indicated in the slide, as well as Select access on the tables in the schema that contains the
relational model.
2. After the user is created, export the multidimensional model from Oracle SQL Developer
Data Modeler to create an Oracle AW.
Note: The Oracle AW created is in OLAP 10g format. In order to obtain an OLAP 11g AW, you
must perform an upgrade, which is described later in this lesson.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.21 - 31
Contact
[email protected] if you have not received your personalized eKit.
Exporting the Multidimensional Model
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.21 - 32
Contact
[email protected] if you have not received your personalized eKit.
Upgrading Your Oracle AW by Using AWM 11g
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.21 - 33
Contact
[email protected] if you have not received your personalized eKit.
Summary
Summary
In this lesson, you examined multidimensional objects and generated a multidimensional model.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.21 - 34
Contact
[email protected] if you have not received your personalized eKit.
Practice 21-1 Overview: Build a Multidimensional
Model
This practice covers the following topics:
• Importing a DDL file that contains dimensions
• Reverse engineering to create the logical model
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
Oracle
violation of Oracle copyright. Datastudents
All WDP Modeling andanRelational
must receive Database
eKit watermarked Design
with their name and email.21 - 35
Contact
[email protected] if you have not received your personalized eKit.
Oracle University and Bridge Human Skills Developments,GCC use onlyฺ
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
violation of Oracle copyright. All WDP students must receive an eKit watermarked with their name and email. Contact
[email protected] if you have not received your personalized eKit.
Additional Information
Additional Information
The links in the slide provide you with additional information related to this lesson.
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
violation of Oracle copyright. All WDP students must receive an eKit watermarked with their name and email. Contact
[email protected] if you have not received your personalized eKit.
Oracle University and Bridge Human Skills Developments,GCC use onlyฺ
Development Program (WDP) eKit materials are provided for WDP in-class use only. Copying eKit materials is strictly prohibited and is in
violation of Oracle copyright. All WDP students must receive an eKit watermarked with their name and email. Contact
[email protected] if you have not received your personalized eKit.