0% found this document useful (0 votes)
57 views

Lecture 1b Data Models: Reference Textbook: An Introduction To Database Systems Eighth Edition C.J.Date

This document provides an overview of data models and their evolution. It discusses hierarchical, network, relational, entity-relationship, and object-oriented data models. The hierarchical model was developed in the 1960s and formed the basis for current data models. The network model improved on the hierarchical model by allowing a record to have multiple parents. The relational model, developed by Codd, represents data as tables and relates tables using common attributes. The entity-relationship model graphically represents entities and relationships. The object-oriented model stores data and relationships in objects.

Uploaded by

dpriya84
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views

Lecture 1b Data Models: Reference Textbook: An Introduction To Database Systems Eighth Edition C.J.Date

This document provides an overview of data models and their evolution. It discusses hierarchical, network, relational, entity-relationship, and object-oriented data models. The hierarchical model was developed in the 1960s and formed the basis for current data models. The network model improved on the hierarchical model by allowing a record to have multiple parents. The relational model, developed by Codd, represents data as tables and relates tables using common attributes. The entity-relationship model graphically represents entities and relationships. The object-oriented model stores data and relationships in objects.

Uploaded by

dpriya84
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 33

Lecture 1b

Data Models

Reference Textbook: An Introduction to Database


Systems
Eighth Edition
C.J.Date
Lecture 1b – Overview

 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, ...

- Record based models


relational, network, hierarchical, ...

4
The Evolution of Data Models

5
The Hierarchical Model—Evolution
 Developed in the 1960s to manage large
amounts of data for manufacturing projects

Information Management System (IMS)


– World’s leading mainframe hierarchical database
system in the 1970s and early 1980s

6
Hierarchical Structure-Characteristics

 Logically represented by an upside down tree


– Each parent can have many children
– Each child has only one parent
 Tree is defined by path that traces parent segments to
child segments, beginning from the left
 Hierarchical path
– Ordered sequencing of segments tracing hierarchical structure
 Preorder traversal or hierarchic sequence
– “Left-list” path

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

Checking Account Data


Acct. Number Current Balance Date Last
Transaction
986-335 445.11 07/11/03
988-310 2988.44 07/01/03
355-822 898.14 06/15/03

Auto Loan Data


Acct. Number Current Balance Date Last Pmt
100988 5676 06/15/03
101732 1545.33 07/01/03

9
Hierarchical Model

 Foundation for current data models

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

 Developed by Codd (IBM) in 1970


 Considered ingenious but impractical in 1970
 Conceptually simple
 Computers lacked power to implement the relational model
 Today, microcomputers can run sophisticated relational
database software

15
Relational Data Models – Basic Structure

 Relational database is perceived as collection of tables.


 Each table consists of series of row/column intersections.
 Tables (or relations) are related to each other by sharing a
common entity characteristic.
 Relationship type is often shown in a relational schema.
 Table yields complete data and structural independence.

16
Linking Relational Tables

17
A Relational Schema

18
Relational Model (continued)

 SQL-based relational database application involves three parts:

– 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

– Introduced by Chen in 1976


– One of the most widely accepted graphical data
modeling tools.
– Graphically represents data as entities and their
relationships in database structure.
– Complements the relational data model concepts.

21
Entity Relationship Model - Basic Structure

 Entity-Relationship model represented as entity/relationship(E/R)


diagram (see fig. 1.6, page 12)

 An entity is represented by a rectangle:


- Entity is an object represented in a database (for example1.6,
Employees, Projects, Departments and so on are various objects)
- Each entity is described by a set of properties (Properties
describes particular characteristics of the entity)
- Relationship is represented by a diamond connected to the
related entities.

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

 Semantic data model (SDM) developed by Hammer


and McLeod in 1981
 Data and their relationships contained in a single
structure known as an object
 Basis of object oriented data model (OODM)
 OODM becomes the basis for the object oriented
database management system (OODBMS)

27
Object Oriented Data Model - Basic Structure
OODM

 Objects or abstractions of real-world entities are


stored:
– Attributes describe properties
– Collection of similar objects is a class
 Methods represent real world actions of classes
 Classes are organized in a class hierarchy
– Inheritance is ability of object to inherit attributes and
methods of classes above it
 UML based on OO concepts that describe
diagrams and symbols
– Used to graphically model a system

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

Data Models and their Tasks:


 Conceptual models (E-R Model): better suited for high-
level data modeling
 Implementation models (Network, & Hierarchical Models):
better for managing stored data for implementation
purposes
 Relational, & OODM: can be used as both conceptual &
implementation models

32
33

You might also like