Chapter 02
Chapter 02
Chapter 2
Data Models
Database Systems:
Design, Implementation, and Management,
Seventh Edition, Rob and Coronel
1
2
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 2
2
• Data models
– Relatively simple representations, usually
graphical, of complex real-world data
structures
– Facilitate interaction among the designer, the
applications programmer, and the end user
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 3
2
The Importance of Data Models
(continued)
• End-users have different views and needs for
data
• Data model organizes data for various users
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 4
2
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 5
2
Business Rules
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 6
2
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 8
2
Translating Business Rules into Data
Model Components
• Standardize company’s view of data
• Constitute a communications tool between users and
designers
• Allow designer to understand the nature, role, and
scope of data
• Allow designer to understand business processes
• Allow designer to develop appropriate relationship
participation rules and constraints
• Promote creation of an accurate data model
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 9
2
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 10
2
The Evolution of Data Models
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 11
2
• Hierarchical
• Network
• Relational
• Entity relationship
• Object oriented (OO)
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 12
2
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 13
2
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 14
2
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 15
2
• Advantages
– Many of the hierarchical data model’s features
formed the foundation for current data models
– Its database application advantages are
replicated, albeit in a different form, in current
database environments
– Generated a large installed (mainframe) base,
created a pool of programmers who developed
numerous tried-and-true business applications
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 16
2
• Disadvantages
– Complex to implement
– Difficult to manage
– Lacks structural independence
– Implementation limitations
– Lack of standards
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 17
2
• Created to
– Represent complex data relationships more
effectively
– Improve database performance
– Impose a database standard
• Conference on Data Systems Languages
(CODASYL)
• Database Task Group (DBTG)
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 18
2
• Schema
– Conceptual organization of entire database as viewed
by the database administrator
• Subschema
– Defines database portion “seen” by the application
programs that actually produce the desired information
from data contained within the database
• Data Management Language (DML)
– Defines the environment in which data can be
managed
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 19
2
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 20
2
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 21
2
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 22
2
• Disadvantages
– Too cumbersome
– The lack of ad hoc query capability put heavy
pressure on programmers
– Any structural change in the database could
produce havoc in all application programs that
drew data from the database
– Many database old-timers can recall the
interminable information delays
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 23
2
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 25
2
• Table (relations)
– Matrix consisting of a series of row/column
intersections
– Related to each other through sharing a
common entity characteristic
• Relational diagram
– Representation of relational database’s
entities, attributes within those entities, and
relationships between those entities
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 26
2
• 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
– This property became the source of a real
database revolution
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 27
2
The Relational Model (continued)
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 28
2
The Relational Model (continued)
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 29
2
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 30
2
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 31
2
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 32
2
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 33
2
The Entity Relationship Model (continued)
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 34
2
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 35
2
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 36
2
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 37
2
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 38
2
Other Models
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 39
2
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 40
2
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 41
2
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 42
2
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 43
2
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 44
2
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 45
2
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 46
2
The External Model (continued)
• Advantages:
– Easy to identify specific data required to
support each business unit’s operations
– Facilitates designer’s job by providing
feedback about the model’s adequacy
– Creation of external models helps to ensure
security constraints in the database design
– Simplifies application program development
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 47
2
The External Model (continued)
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 48
2
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 49
2
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 50
2
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 51
2
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 52
2
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 53
2
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 54
2
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 55
2
Summary
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 56
2
Summary (continued)
• Hierarchical model
– Depicts a set of one-to-many (1:M) relationships
between a parent and its children segments
• Network data model
– Uses sets to represent 1:M relationships between
record types
• Relational model
– Current database implementation standard
– ER model is a popular graphical tool for data modeling
that complements the relational model
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 57
2
Summary (continued)
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 58