Lecture 1b Data Models: Reference Textbook: An Introduction To Database Systems Eighth Edition C.J.Date
Lecture 1b Data Models: Reference Textbook: An Introduction To Database Systems Eighth Edition C.J.Date
Data Models
Definitions
Evolution of Data Models
2
Data Models
Data model is an abstract model that describes how data is represented and
used
OR
Data model is a collection of logical constructs used to represent the data
structure and the data relationships found within the database.
Two Categories of Database Models:
– Logical or Conceptual models focus on the logical nature of the data
representation. They are concerned with what is represented rather than
how it is represented.
– Physical or Implementation models place the emphasis on how the
data are represented in the database or on how the data structures are
implemented.
3
Data Models
Numerous logical data models have been proposed,
under two main groups:
- Object-based models
entity-relationship, object-oriented, semantic,
functional, ...
4
The Evolution of Data Models
5
The Hierarchical Model—Evolution
Developed in the 1960s to manage large
amounts of data for manufacturing projects
6
Hierarchical Structure-Characteristics
7
A Hierarchical Structure
8
Hierarchical Databases
Customer Data
Name Address Phone Pointer to Checking Pointer to Auto
Acct. Data Loan Data
Maria Chavez 1441 Adams Court 605-777-8992
John Severson 8988 Grover Road 605-898-2314
Harold Brown 3511 Pluto Drive 605-666-3298
9
Hierarchical Model
Advantages
– Conceptual simplicity
– Database security and integrity
– Data independence
– Efficiency
Disadvantages
– Complex implementation
– Difficult to manage
– Lack of standards
– Lacks structural independence
– Relationships do not conform to 1:M form
10 – No standards for how to implement
Child with Multiple Parents
11
Network Model
• Created to represent complex data relationships more effectively
• Improve database performance
• Impose a database standard
Resembles hierarchical model
– Record may have more than one parent
Collection of records in 1:M relationships
Each record can have multiple parents
– Composed of sets
– Each set has owner record and member record
– Member may have several owners
12
A Network Data Model
13
Network Data Model
Advantages
– Conceptual simplicity
– Handles more relationship types
– Data access flexibility
– Promotes database integrity
– Data independence
– Conformance to standards
Disadvantages
– System complexity
– Lack of ad hoc query capability placed burden on programmers to
generate code for reports
– Structural change in the database could produce havoc in all
application programs
14
Relational Model
15
Relational Data Models – Basic Structure
16
Linking Relational Tables
17
A Relational Schema
18
Relational Model (continued)
– User interface
Allows end user to interact with data
– Set of tables stored in database
Each table is independent from another
Rows in different tables related based on common
values in common attributes
– SQL “engine”
Executes all queries
19
Relational Model
– Advantages
Structural independence
Improved conceptual simplicity
Easier database design, implementation, management, and use
Ad hoc query capability (SQL)
Powerful database management system
– Disadvantages
Substantial hardware and system software overhead
Possibility of poor design and implementation
Potential “islands of information” problems
20
Entity-Relationship Data Model
21
Entity Relationship Model - Basic Structure
22
Entity and Relationships
– Types of Relationships:
One-to-many relationships (1:M)
– A painter paints many different paintings, but each one of them is
painted by only that painter.
PAINTER (1) paints PAINTING (M)
Many-to-many relationships (M:N)
– An employee might learn many job skills, and each job skill might
be learned by many employees.
EMPLOYEE (M) learns SKILL (N)
One-to-one relationships (1:1)
– Each store is managed by a single employee and each store
manager (employee) only manages a single store.
EMPLOYEE (1) manages STORE (1)
23
Relationship Depiction: The ERD
24
Relationship Depiction: The Crow’s Foot
25
E-R Data Models
– Advantages
Exceptional conceptual simplicity
Visual representation
Effective communication tool
Integrated with relational database model
– Disadvantages
Limited constraint representation
Limited relationship representation
No data manipulation language
26
Object-Oriented (OO) Model
27
Object Oriented Data Model - Basic Structure
OODM
28
29
Object Oriented Model
Advantages
– Adds semantic content
– Visual presentation includes semantic content
– Database integrity
– Both structural and data independence
Disadvantages
– Slow pace of OODM standards development
– Complex navigational data access
– Steep learning curve
– High system overhead slows transactions
– Lack of market penetration
30
The Development of Data Models
31
Data Models: Summary
32
33