0% found this document useful (0 votes)
14 views40 pages

Lect2 Data Models

The document discusses the evolution of data models, including hierarchical, network, and relational models, highlighting their structures, advantages, and disadvantages. It also covers the entity-relationship model and various levels of data abstraction, including conceptual, internal, external, and physical models. Each model's characteristics and implications for database design and management are examined.

Uploaded by

Fady ehab
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views40 pages

Lect2 Data Models

The document discusses the evolution of data models, including hierarchical, network, and relational models, highlighting their structures, advantages, and disadvantages. It also covers the entity-relationship model and various levels of data abstraction, including conceptual, internal, external, and physical models. Each model's characteristics and implications for database design and management are examined.

Uploaded by

Fady ehab
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

2

Lecture 2

Evolution of Data Models

1
2

[Link] Evolution of Data Models

• Hierarchical

• Network

• Relational

Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel 2
2
10(i).A Hierarchical Structure

Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel 3
2

10. Hierarchical Database Example

Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel 4
2

10. Hierarchical Database Example

Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel 5
2
10(i).Hierarchical Structure—
Characteristics
• Fields and records and structured in nodes.
• Each parent node can have many children
nodes.
• Each child node has only one parent node
• Tree is defined by path that traces parent
segments to child segments, beginning from
the left
• Tree traversal: Preorder traversal, …etc

Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel 6
2

10(i).The Hierarchical Model


• Advantages

– Conceptual simplicity.

– Database security.

– Data independence.

– Easy to implement 1:1 and 1:M relationships.

Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel 7
2

10(i).The Hierarchical Model (continued)


• Disadvantages
– Complex implementation
– Difficult to manage
– Difficult to implement M:N relationships,
– Complex applications programming and use.

– If parent node is accidentally deleted, all children


nodes will be deleted.

– Lack of structural independence

Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel 8
2

10(ii).Network Model—Basic Structure


• Resembles hierarchical model.
• Collection of records in 1:M relationships.
• Each child may have many parents.
• Each parent can have many children.
• Owner
• Equivalent to the hierarchical model’s parent
• Member
• Equivalent to the hierarchical model’s child

Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel 9
2

10(ii). A Network Data Model

Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel 10
2

10(ii). The Network Data Model


• Advantages
– Conceptual simplicity.
– Handles more relationship types.
– Data access flexibility.

Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel 11
2

10(ii). The Network Data Model (continued)

• Disadvantages

– System complexity

– Lack of structural independence

Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel 12
2
10(iii).The Relational Model—Basic
Structure
• Relational Database Management System
(RDBMS)

• Performs same basic functions provided by


hierarchical and network DBMS systems, plus
other functions

• Most important advantage of the RDBMS is


its ability to let the user/designer operate in a
human logical environment

Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel 13
2
10(iii). The Relational Model—
Basic Structure (continued)
• Table (relations)
– Matrix consisting of a series of row/column
intersections
– Related to each other by sharing a common
entity characteristic
• Relational schema
– Visual representation of relational database’s
entities, attributes within those entities, and
relationships between those entities
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel 14
2
10(iii). A Relational Schema

Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel 15
Linking Relational Tables 2

Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel 16
2

10(iii). Relational Table


• Stores a collection of related entities
– Resembles a file
• Relational table is purely logical structure
– How data are physically stored in the
database is of no concern to the user or the
designer (Conceptual Representation)
– This property became the source of a real
database revolution

Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel 17
2

10(iii). The Relational Model


• Advantages
– Structural independence
– Improved conceptual simplicity
– Easier database design, implementation,
management, and use
– Ad hoc query capability
– Powerful database management system

Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel 18
2

10(iii). The Relational Model (continued)

• Disadvantages

– Substantial hardware and system software


overhead

– Can facilitate poor design and implementation

– May promote “islands of information” problems

Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel 19
2

[Link] Entity Relationship Model

• Widely accepted and adapted graphical tool


for data modeling

• Introduced by Chen in 1976

• Graphical representation of entities and their


relationships in a database structure

Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel 20
2
[Link] Entity Relationship Model—
Basic Structure
• Entity relationship diagram (ERD)
– Uses graphic representations to model
database components
– Entity is mapped to a relational table
• Entity instance (or occurrence) is row in table.
• Entity set is collection of like entities.
• Connectivity labels types of relationships
– Diamond connected to related entities through
a relationship line.
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel 21
2
Relationships: The Basic Chen ERD

Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel 22
2
Relationships:
The Basic Crow’s Foot ERD

Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel 23
2

[Link] Entity Relationship Model

• Advantages

– Exceptional conceptual simplicity

– Visual representation

– Effective communication tool

– Integrated with the relational data model

Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel 24
2
[Link] Entity Relationship Model
(continued)
• Disadvantages

– Limited constraint representation.

– No data manipulation language.

– Loss of information content.

Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel 25
2
The Development of Data Models

Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel 26
2

[Link] Abstraction
• Program-data independence: Program is
independent from how data is actually stored.

• Program-operation independence: Program


invokes operations regardless of how the
operations is actually implemented.

• The characteristic that allows Program-data


independence and Program-operation
independence is called Data Abstraction.

Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel 27
2

[Link] of Data Abstraction (continued)


• American National Standards Institute/Standards
Planning and Requirements Committee
(ANSI/SPARC)
• Classified data models according to their degree of
abstraction (1970s):
• Conceptual
• External
• Internal
• Physical

Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel 28
Data Abstraction Levels 2

Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel 29
2

12(i).The Conceptual Model


• Represents global view of the database

• Representation of data as viewed by high-


level managers

• Basis for identification and description of


main data objects, avoiding details

• Most widely used conceptual model is the


entity relationship (ER) model

Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel 30
A Conceptual Model for Tiny College 2

Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel 31
2

12(i).Advantages of Conceptual Model


• Provides a relatively easily understood macro
level view of data environment
• Independent of both software and hardware
– Does not depend on the DBMS software used
to implement the model
– Does not depend on the hardware used in the
implementation of the model
– Changes in either the hardware or the DBMS
software have no effect on the database
design at the conceptual level
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel 32
2

12(ii).The Internal Model


• Representation of the database as “seen” by
the DBMS

• Adapts the conceptual model to the DBMS

• Software dependent

• Hardware independent

Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel 33
2
12(iii).The External Model
• End users’ view of the data environment
• Requires that the modeler subdivides the set of
requirements and constraints into functional
modules that can be examined within the
framework of their external models
• Good design should:
– Consider such relationships between views
– Provide programmers with a set of restrictions
that govern common entities
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel 34
A Division of an Internal Model into 2
External Models

Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel 35
2

12(iii). Advantages of External Models


• Use of database subsets makes application
program development much simpler
– Facilitates designer’s task by making it easier
to identify specific data required to support
each business unit’s operations
– Provides feedback about the conceptual
model’s adequacy
• Creation of external models helps to ensure
security constraints in the database design
Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel 36
2

12(iii). The External Model

• DBMS dependent

• Hardware independent

Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel 37
The External Models for Tiny College 2

Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel 38
2

12(iv).The Physical Model


• Operates at lowest level of abstraction.

• Describing the way data are saved on


storage media such as disks or tapes

• Software and hardware dependent

• Requires that database designers have a


detailed knowledge of the hardware and
software used to implement database design

Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel 39
2
Levels of Data Abstraction

Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel 40

You might also like