You are on page 1of 27

Database Analysis and Design

Lesson 2: Introduction to Data Model

1
Plan
• Notion of Data Model
• Uses of Data Model
• Different Kind of Data Model

2
Keywords
Keyword Description
A description of observed or predicted behavior of some
system, simplified by ignoring certain details. Models allow
complex systems, both existent and merely specified, to be
Model
understood and their behavior predicted. A model may give
incorrect descriptions and predictions for situations outside
the realm of its intended use.
A collection of persistent data that is used by information
system or applications in a company (C. J. Date).
Database
A collection of information (data) which is arranged in
individual records and is searchable.
Database A computer-based software system used to establish and
Management manage data.
System

3
Notion of Data Model
• Definition
– Model is the representation of the real thing. It
simplify the real thing by ignoring some detail, for
example a construction plan is representation (model)
of a house (real thing).
• Visualize the whole system
• Clarify and trace out problems before development of the
real system
• Plan for the development
– Data model is a collection of high‐level data
description constructs that hide many low‐level
storage details.
– Data model describes and standardizes how data
elements relate to each other.
4
3 levels of data model
1. Conceptual
• Comprehensible by non‐technical person
• Describe data description, semantic of data and relation
between data
• It is close to real world. It shows business view of data.
2. Physical
• For technical person and DBMS.
• Storage detail and is close to machine
• Method for retrieval enhancement, such as indexing
3. External
• To customize conceptual view of database for a specific
group of user, and allows data access to be customized at
the level of individual user or group of user.
5
Uses of Data Model
1. As a plan for building database
– Conceptual data modeling
• Identify needed data to be stored
• Build logical structure of data
– Physical data model
• Build physical structure of data: file organizing and
index
– Constraints of database are defined in both data
models

6
Uses of Data Model
2. As the support for the communication during design phase of
a system
– Data model is understandable for both technical and non‐technical
stakeholders
– Support for communication between end users and modelers: validate
the result of modeling
– Support for communication between modelers and developers: design
the system
3. As the support for auto‐generating of code provided by some
developing tools
– As the schema for auto‐generating database
– As the schema for auto‐generating code.

7
Different Kind of Data Models
• Network (CODASYL): 1970’s
• Hierarchical (IMS): late 1960’s and 1970’s
• Relational: 1970’s and early 1980’s
• Entity‐Relationship: 1970’s
• Extended Relational: 1980’s
• Semantic: late 1970’s and 1980’s
• Object‐oriented: late 1980’s and early 1990’s
• Semi‐structured (XML): late 1990’s to the
present
8
Different Kind of Data Model
• Network data model
– Released in 1970s by CODASYL (Committee on Data
System Language)
– Structure:
• Directed graph oriented
• The node of the graph is record. A node can have many
parents.
• Relation between node are Parent‐Child relation: Next, Prior,
Direct.
– Constraint: identifier for each node, mechanism for
differentiate each node.
– Manipulation: network routing.

9
Different Kind of Data Model
• Network data model

10
Network Model
• Example: Network model for GIC Courses

11
Network Model
• Example: Network model for selling products

Sale

Sales‐man Customer

Invoice Payment

12
Hierarchical Model
– Release in 1968 by IBM
• A Tree structure. The root of
the tree is the parent
followed by child nodes.
• A parent can have many child
nodes. A child node can have
only one parent.
• The node of the tree is the
record type.
• The record type is
characterize by named fields.

13
Hierarchical Model
• Example: Hierarchical model for Shoes

14
Relational Model
• Relational model
– Structure
• Set of relation.
• Relation is in the form of two dimension table.
• Relation is set of tuples.
• Relation is characterized by named field.
• Named field are listed in the header of table.
– Constraint
• Primary key is identifier of tuple
• Foreign key is the link between relation
– Manipulation:
• Query language: Relational Algebra, Relational Calculus, SQL

15
Relational Model
• Example of Relational model

Header

Value

16
Example of a relational model

17
Object model

• Object oriented programming


– Structure
• Graph oriented
• Object is instance of class.
• Class is characterized by attributes, and its performance is defined by
method.
• Relationship between class is inheritance.
– Constraint: object identifier, reference between object
– Manipulation
• Query language: extension of SQL, OSQL, OQL.

18
Object Model
• Example of Object Model

19
Entity relationship model
ER Model is used to model the logical view of the
system from data perspective.
• Set of entity and relationship between relation
• Entity : object with a physical or conceptual existence
Ex: student, car, house, company,
job , course

• Entity is characterized by attributes.


• Is used as a design tool of conceptual data model

20
Entity relationship model
• Example of ER model

21
Semi‐structured model
• Semi‐structured model (XML)
– Structure
• Tree like graph oriented.
• Present data by hierarchical nested tag elements.
• Tags are similar to the header of table in relational model.
– Constraint
• Data type of value of tags
• Appearing rule of tags: order and number
– Manipulation: browse element to access sub‐element
• The widely used data model is relational model.

22
Semi‐structured model
• Example: Movie data as XML

23
24
25
26
Summary
No Topic Summary
Definition Data model is the representation of data of the real world in the
comprehensible form. It hides the storage detail of data. The
1 components of data model are structure, constraint and query
language of data. The levels of data model are conceptual model
and physical model
Uses of Data Model Data model is used as the plan for implementing database. It is
used as the support for communication during the design phase
2
of a system. It is also used as the support for auto-generating
database and programming code.
Different Type of Data There are different type of data model:
Model •Network data model
•Hierarchical Model
•Relational model
3
•Deductive model
•Object model
•Entity relationship model
•Semi-structure model (XML)
27

You might also like