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

Module 4 Lecture

Chapter 4 of the document focuses on data modeling and the Entity-Relationship (E-R) model, outlining the basic steps of systems analysis and design, and the stages of database development. It covers the components of the E-R model, including entities, attributes, identifiers, and relationships, as well as the concepts of weak entities and their relationships. The chapter also explains how to create E-R diagrams and interpret various modeling techniques.

Uploaded by

samerelking3
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views

Module 4 Lecture

Chapter 4 of the document focuses on data modeling and the Entity-Relationship (E-R) model, outlining the basic steps of systems analysis and design, and the stages of database development. It covers the components of the E-R model, including entities, attributes, identifiers, and relationships, as well as the concepts of weak entities and their relationships. The chapter also explains how to create E-R diagrams and interpret various modeling techniques.

Uploaded by

samerelking3
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 59

Database Concepts

Ninth Edition

Chapter 4
Data Modeling and the Entity-
Relationship Model

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Learning Objectives (1 of 2)
2

• Learn the basic steps of systems analysis and design


• Learn the basic stages of database development
• Understand the purpose and role of a data model
• Know the principle components of the E-R data model
• Understand how to interpret traditional E-R diagrams
• Understand how to interpret the Information Engineering (IE)
model’s Crow’s Foot E-R diagrams
• Learn to construct E-R diagrams
• Learn the purpose of a database management system (DBMS)
• Know how to represent 1:1, 1:N, N:M, and binary relationships
with the E-R model

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Learning Objectives (2 of 2)
3

• Understand two types of weak entities and how to use them


• Understand nonidentifying and identifying relationships and
know how to use them
• Know how to represent subtype entities with the E-R model
• Know how to represent recursive relationships with the E-R
model
• Learn how to create an E-R diagram from source documents

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Data and Information
4

Learn the basic steps of system analysis and


design
• Data is defined as recorded facts and numbers
• Information is defined as:
– Knowledge derived from data
– Data presented in a meaningful context
– Data processed by summing, ordering, averaging,
grouping, comparing, or other similar operations

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
What is an Information System?
5

Learn the basic steps of system analysis and


design
• A System is defined as a set of components that interact to
achieve some purpose or goal
• An information system is a system that has the goal of
producing information and is composed of the following
components:
– Hardware
– Software
– Data
– Procedures
– People

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Figure 4.1 The Five-Component
6

Information System Framework

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Figure 4.2 A Generalized Business
7

Process
A business process is a set of activities that transform input into
outputs

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Figure 4.3 The Manufacturing
8

Process

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Figure 4.4 The Manufacturing
9

Process with Supporting Information


System

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Systems Analysis and Design
10

Learn the basic steps of system analysis and


design
• Systems analysis and design is the process of creating and
maintaining information systems.
• The classic methodology used in systems analysis and design
to developed information systems is called the systems
development life cycle (SDLC) and is composed of the
following steps:
– Systems definition
– Requirements analysis
– Component design
– Implementation
– System maintenance

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Figure 4.5 The SDLC in Use
11

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
The System Definition Step
12

Learn the basic steps of system analysis and


design
• The system definition step is a process that starts with the
need for an information system to support a business process
as its input and produces a plan as its output.
• This step includes:
– Define the information system project goals and scope
– Assess the feasibility of the project (cost, schedule,
technical, organizational)
– Form the project team
– Plan the project (specify tasks, assign personnel,
determine task dependencies, set schedules)
• The deliverable is the project plan
Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
The Requirements Analysis Step
13

Learn the basic steps of system analysis and


design
• The requirements analysis step is a process that starts with the
project plan as its input and produces a set of approved user
requirements as its output
• This step includes:
– Conduct user interviews
– Evaluate existing systems
– Determine needed new forms/reports/queries
– Identify needed new applications features and functions
– Consider security
– Consider the five components of an information system –
hardware, software, data, procedures, people
• The deliverable is the approved user requirements
Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
The Component Design Step
14

Learn the basic steps of system analysis and


design
• The component design step is a process that starts with
the approved user requirements as its input and produces
a final system design as its output.
• This step includes:
– Determine hardware specifications
– Determine program (software) specifications
– Create the database design
– Design business procedures
– Create job descriptions for business personnel
• The deliverable is the documented system design
Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
The Implementation Step
15

Learn the basic steps of system analysis and


design
• The Implementation step is a process that starts with the final
system design as its input and produces a final system as its
output.
• This step includes:
– Build system components
– Conduct component tests
– Integrate the components
– Conduct integrated component tests
– Convert to the new system
• The deliverable is the installed and functioning information
system.
Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Figure 4.6 The SDLC Design and
16

Implementation Steps for the Five


Information System Components

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
The System Maintenance Step
17

Learn the basic steps of system analysis and


design
• The system maintenance step is a process that starts with the
implemented system as its input and produces an updated
system or a request of system modification using the SDLC as
its output.
• This step includes:
– Update the system with patches, service packs, and new
software releases
– Record and prioritize requests for system changes of
enhancements
• The deliverable is an updated system and the start of a new
SDLC cycle to enhance the information system.

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
What are the Steps in the Database
18

Development Process?
Learn the basic stages of database
development
• The database development process is a subset of the SDLC
that consists of three major stages:
1. Requirements analysis
2. Component design
3. Implementation

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Figure 4.7 Sources of Requirements
19

for a Database Applications

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
The Entity-Relationship Data Model
20

Know the principle components of the E-R


model
• When you create a database, data requirements must first be
documented in a data model
• Data model is transformed into a database design in the design
stage
• A number of techniques can be used to create data models
– The most popular is the entity-relationship model created
by Peter Chen in 1976 (now interpreted as the extended
entity-relationship model)
§ The most important elements of the E-R model are
entities, attributes, identifiers, and relationships.

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Entities
21

Know the principle components of the E-R


model
• An entity is something that users want to track. Examples
include customers, purchases, products, etc.
• Entities of a given type are grouped into an entity class such
as EMPLOYEE (a collection of all EMPLOYEE entities) which
are shown in all caps.
• An entity instance of an entity class is the occurrence of a
particular entity, such as CUSTOMER 12345.

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Figure 4.8 The ITEM Entity and Two
22

Entity Instances

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Attributes
23

Know the principle components of the E-R


model
• Entities have attributes, which describe the entity’s
characteristics.
• Examples include EmployeeName, DateOfHire, and
JobSkillCode.
• Attributes are shown with the first letter of each word
capitalized as shown above.
• An attribute has a data type (character, numeric, date,
currency, etc.)

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Identifiers
24

Know the principle components of the E-R


model
• Entity instances have identifiers, which are attributes that
name, or identify, entity instances.
• Examples include ItemNumber identifying an instance of ITEM
and SocialSecurityNumber identifying an instance of
EMPLOYEE.
• Identifiers may be unique or nonunique
– Unique identifiers identifies one, and only one, entity
instance
– Nonunique identifiers identifies a set in instances
§ An example is EmployeeName is an example as there
may be more than one person with that name

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Figure 4.9 Levels of Entity Attribute
25

Display

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Relationships
26

Know the principle components of the E-R


model
• Entities can be associated with one another in relationships.
• The number of entity classes in the relationship is known as the
degree of the relationship as follows:
– degree 2 is a binary relationship
– degree 3 is a ternary relationship

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Figure 4.10 Example Relationships
27

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Figure 4.11 Three Types of Binary
28

Relationships

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Maximum Cardinality (1 of 2)
29

Know the principle components of the E-R


model
• Relationships are named and classified by their cardinality,
which is a word that means count.
• Each of the three types of binary relationships shown in the
previous slide have different maximum cardinalities.
• Maximum cardinality is the maximum number of entity
instances that may participate in a relationship instance.

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Maximum Cardinality (2 of 2)
30

Know the principle components of the E-R


model
• Minimum cardinality is the minimum number of entity
instances that must participate in a relationship instance.
• These values typically assume a value of zero (optional) or one
(mandatory).

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Figure 4.12 A Relationship with
31

Minimum Cardinalities

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
HAS-A Relationships
32

Understand how to interpret traditional E-R


diagrams
• The relationships in the previous slides are called HAS-A
relationships.
• The term is used because each entity instance has a
relationship to a second entity instance:
– an employee has a badge
– a badge has an employee

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Variations of the E-R Model
33

Understand how to interpret the Information


Engineering (IE) model’s Crow’s Foot E-R
Diagrams
• Information Engineering (IE) [James Martin 1990] It uses
“crow’s feet” to show the many sides of a relationship, and is
sometimes called the crow’s foot model.
• Integrated Definition 1, Extended (IDEFIX) is a version of the
E-R model that is a national standard.
• Unified Modeling Language (UML) is a set of structures and
techniques for modeling and designing object-oriented
programs (OOP) and applications.

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Figure 4.13 Two Versions of a 1:N
34

O-M Relationship

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Figure 4.14 Crow’s Foot Notation
35

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Figure 4.15 Two Versions of a N:M
36

O-M Relationship

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Weak Entities
37

Understand two types of weak entities and


know how to use them
• A weak entity is an entity that cannot exist in the database
without the existence of another entity.
• Any entity that is not a weak entity is called a strong entity.

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
ID-Dependent Weak Entities
38

Understand two types of weak entities and


know how to use them
• An ID-dependent weak entity is a weak entity that cannot
exist without its parent entity.
• An ID-dependent weak entity has a composite identifier:
– the first part of the identifier is the identifier for the strong
entity
– the second part of the identifier is the identifier for the weak
entity itself

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Weak Entity Relationships
39

Understand nonidentifying and identifying


relationships and how to use them
• The relationship between a strong and weak entity is termed an
identifying relationship if the weak entity is ID-dependent:
– represented by a solid line
• The relationship between a strong and weak entity is termed a
nonidentifying relationship if the weak entity is non-ID-
dependent:
– represented by a dashed line
– also used between strong entities

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Figure 4.16 Example ID-Dependent
40

Entities

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Non-ID-Dependent Weak Entities
41

Understand nonidentifying and identifying


relationships and how to use them
• All ID-dependent entities are weak entities, but there are other
entities that are weak but not ID-dependent.
• A non-ID-dependent weak entity may have a single or
composite identifier, but the identifier of the parent entity will be
a foreign key.

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Figure 4.17 Weak Entity Examples
42

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Figure 4.18 Examples of Required
43

Entities

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Associative Entities
44

Understand nonidentifying and identifying


relationships and how to use them
• An associative entity (also called an association entity) is
used whenever a pure N:M relationship cannot properly hold
attributes that are describing aspects of the relationship
between two entities.
• A new entity is then created to:
– link the two original entities
– hold the attributes

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Figure 4.19 The Associative Entity
45

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Subtype Entities
46

Know how to represent subtype entities with


the E-R model
• A subtype entity is a special case of another entity called
supertype.
• An attribute of the supertype indicates which of the subtypes is
appropriate for a given instance and is called a discriminator.
• Subtypes can be exclusive or inclusive:
– if exclusive, the supertype relates to at most one subtype
– if inclusive, the supertype can relate to one or more
subtypes

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Figure 4.20 Example Subtype Entities
47

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Subtype Entity Identifiers
48

Know how to represent subtype entities with


the E-R model
• The relationships that connect supertypes and subtypes are
called IS-A relationship because a subtype is the same entity
as the supertype.
• The identifier of a supertype and all of its subtypes is the same
attribute

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Figure 4.21 Example Recursive
49

Relationship
Know how to represent recursive relationships
with the E-R model
• It is possible for an entity to have a relationship to itself—this is
called a recursive relationship (also known as a unary
relationship)

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Developing an Example E-R Diagram
50

Learn how to create an E-R Diagram from


source documents
• Heather Sweeney Designs will be used as an on-going
example throughout Chapters 4, 5, 6, and 7:
– Heather Sweeney is an interior designer who specializes in
home kitchen design
– offers a variety of free seminars at home shows, kitchen
and appliance stores, and other public locations
– earns revenue by selling books and videos that instruct
people on kitchen design
– offers custom-design consulting services

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Figure 4.22 Example Seminar
51

Customer List

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Heather Sweeney Design Fact
52

Learn how to create an E-R diagram from


source documents
• Having missing facts is typical during the data modeling
process as there are a number of undetermined facts from the
Heather Sweeney design.
– It is not certain about the 1:N cardinality
– Neither is it know what to use for the identifier for each
entity
• Once all information is know, the initial E-R Diagram can be
created.

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Figure 4.23 Initial E-R Diagram for
53

Heather Sweeney Designs

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Figure 4.24 Heather Sweeney
54

Designs Customer Form Letter

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
55

Figure 4.25 Heather Sweeney Designs Data


Model with CONTACT

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Figure 4.26 Heather Sweeney
56

Designs Sales Invoice

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
57

Figure 4.27 The Final Data Model for Heather


Sweeney Designs

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Validating the Data Model
58

Learn how to create an E-R diagram from


source documents
• After the data model has been completed, it needs to be
validated:
– The most common way is to show it to the users and obtain
their feedback
– prototyping is commonly use to validate forms and reports
– A data model needs to be evaluated against all use cases

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved
Copyright
59

This work is protected by United States copyright laws and is


provided solely for the use of instructors in teaching their
courses and assessing student learning. Dissemination or sale of
any part of this work (including on the World Wide Web) will
destroy the integrity of the work and is not permitted. The work
and materials from it should never be made available to students
except by instructors using the accompanying text in their
classes. All recipients of this work are expected to abide by these
restrictions and to honor the intended pedagogical purposes and
the needs of other instructors who rely on these materials.

Copyright © 2020, 2017, 2015 Pearson Education, Inc. All Rights Reserved

You might also like