Data Modeling Overview
DB 210 Data Modeling
Modeling
Discussion – Mind Map of Model
Less Not real Easy to
expensiv use
e
Can be Can
thrown occupy
away less space
Professional Can be a
Is a poor
handling not reasonable
substitute
required substitute
Discussion – Examples
• Examples of real models
– Aircraft model
– Building model
– Fashion models too!
• Examples of abstract models
– Financial Models
– Data Models
– Simulation Models
Discussion – Why models?
There are many reasons why we need models
•Real entities are not available
– Dinosaurs!
•Real entities are expensive to
build
– Aircrafts
•Real entities are voluminous
– Databases
•Real entities do not even exist
– Financial Models
Models in Software
• Analysis Models
– Example: Data Flow Diagrams
• Design Models
– Example: Structure Charts, State Diagrams
• Execution Models
– Call graphs, coverage analysis,
performance charts
• Infrastructure Models
– Example: Network diagrams
Modeling Summary
• Modeling is the process of
abstracting reality
• Modeling is imperative to tackle large
problems as the real problem may be
too large to comprehend in its
entirety
• Visual Modeling is the process
abstracting reality in the form of
pictures
Data Modeling
Data Modeling Example
AsiaPac Chennai
2574 A12
Chennai
2574 Bangalore
7 EMEA jdoe Software Engineer
36 He11o! John Doe we1c0me!
A17
Dane Doe Bangalore
3 42
janedoe
Data Modeling Example
EMPLOYEE
ID Name Age Office Home Grade Domain Userid Password
2574 John Doe 36 35 Cochin A12 Asia jdoe He11o!
1364 Dane Doe 42 21 Chennai A17 EMEA ddoe We1c0me!
This way of abstracting data using
meaningful concepts from the domain
and structuring them using specific
notations is called data modeling.
Key Data Modeling Concepts
Database
Abstraction
Design
Database
Data Model
Schema
Mapping
Key Data Modeling Concepts
• Data Model is a
collection of concepts
(notations,
terminology, etc.) that
Data Model help model data
Key Data Modeling Concepts
• The key idea behind
data modeling is to
avoid dealing with
data directly as much
as possible
Abstraction • This is achieved by
choosing relevant
terminology and
notation depending
upon the data model
Key Data Modeling Concepts
• Structural description
of data created using
the notations and
concepts defined in a
Schema particular data model
– Example: A relational
schema uses the
notations and concepts
of the relational data
model
Note: The terms Schema and Data Model are often used interchangeably
as in “The ER Model for this application is given below…”
Key Data Modeling Concepts
• Database design is
realized using a
schema
Database • Schema is only one
Design but a very significant
component of
database design
Key Data Modeling Concepts
• Database is the
repository that stores
data
Database • The structure of the
repository conforms
with a particular
database design
Key Data Modeling Concepts
• Mapping means
transforming a schema
defined using one
model into a schema
Mapping
defined using another
model
– Example: Mapping
between an ER schema
and a relational schema
A simplified meta-model
Data Model provides Abstraction
Defines-rules-for
instantiates
Mapping creates Schema Part-of DB Design
organizes
Database
Elements of Data Models - 1
• Define the terminology and semantics for
structuring entities, attributes and related
meta-data
– E.g., “Relation”, “Attribute”, “Primary Key”,
“Foreign Key”, etc.
• Define the mechanism for manipulating
the data using the data model
– Data Definition Language (DDL)
– Data Manipulation Language (DML)
• Define a set of rules for mapping from one
model to another (e.g., ER to relational)
Elements of Data Models - 2
• Enable multiple levels of abstraction
(e.g., physical, logical, conceptual)
• Enable compact, efficient and secure
implementations
Why not
one
universal
data model?
Who is it for, anyway?
Business To get a view of what business data
user / Owner is available without getting bogged
down with large data dumps
Software To be able to design applications
Designer that access the data
Software To be able to build software
Developer programs that help business users
manipulate the data
Software To easily understand any issues
Maintenance with data or underlying software
Engineer without getting bogged down with
actual data representations
So what is the big deal?!
• Lets discuss issues with data modeling in
the following domains
– Employee Information
– Organization hierarchy
– Network infrastructure
– Engine design (Aircraft, automobile, etc.)
– Building plan
– Road infrastructure
Think again
– Genetics Would one size
– Rich media fit all?
A Quick Review of DB Layers
External Schema
Logical Schema
Physical Schema
Note: We will revisiting this important concept as we go along
The Big Picture – Enterprise Architecture
What How Where Who When Why
Contextual Contextual
Conceptual Conceptual
Logical Logical
Physical Physical
As Built As Built
Functioning Functioning
What How Where Who When Why
Source: The Zachman Framework