CHAPTER 5 Slides
CHAPTER 5 Slides
Introduction
Systems Modeling
One way to structure unstructured problems is to draw models.
A model is a representation of reality. Just as a picture is worth
Systems Modeling
What are Physical Models?
Physical models show not only what a system ‘is’ or ‘does’,
Systems Modeling
Systems analysis activities tend to focus on the logical system
models for the following reasons:
Logical models remove biases that are the result of the way the
Systems Modeling
Data modeling is a technique for defining business requirements for a
database.
Data modeling is a technique for organizing and documenting a
Systems Modeling
Why is data modeling considered crucial? (continued)
Data structures and properties are reasonably permanent –
certainly a great deal more stable than the processes that use
the data. Often the data model of a current system is nearly
identical to that of the desired system.
Data models are much smaller than process and object models
CUSTOMER ORDER
sold
ORDERED PRODUCT
INVENTORY PRODUCT
Ordered Product ID (PK)
Product Number (PK)
sold as . Order Number (FK)
Product Name
. Product Number (FK)
Product Unit of Measure
Quantity Ordered
Product Unit Price
Unit Price at Time of Order
System Concepts
Most systems analysis techniques are strongly rooted in systems
thinking.
Systems thinking is the application of formal systems theory
Entities
All systems contain data.
STUDENT
Data describes ‘things’.
An entity
A concept to abstractly represent all instances of a group of
similar ‘things’ is called an entity.
An entity is something about which we want to store data.
Attributes
STUDENT
The pieces of data that we want to store about each instance of a
Name
. Last Name
given entity are called attributes.
. First Name
. Middle Initial
Address An attribute is a descriptive property or characteristic of an
. Street Address
. City
. State or Province
. Country
. Postal Code
entity. Synonyms include element, property, and field.
Phone Number
. Area Code
. Exchange Number
. Number Within Exchange
Some attributes can be logically grouped into super-attributes
Date of Birth
Gender
Race
called compound attributes.
Major
Grade Point Average
A compound attribute is one that actually consists of more
Attributes and
compound attributes primitive attributes. Synonyms in different data modeling
languages are numerous: concatenated attribute, composite
attribute, and data structure.
Attributes
Domains:
The values for each attribute are defined in terms of three properties:
YES/NO An attribute that can only assume one of these two values
VALUE SET A finite set of values. In most cases, a coding scheme would be
SR=senior, etc.)
{minimum - maximum}
{minimum.precision -
maximum.precision}
narrative restrictions.
on size or content.
- or - HHMM
A legal value from the For an instance of the attribute, if the user 0
domain (as described above) does not specify a value, then use this value. 1.00
FR
REQUIRED or NOT NULL For an instance of the attribute, require the REQUIRED
Attributes
Identification:
An entity typically has many instances; perhaps thousands or
Attributes
Identification:
Frequently, an entity may have more than one key.
Attributes
Identification:
Sometimes, it is also necessary to identify a subset of entity
Relationships
Conceptually, entities and attributes do not exist in isolation.
Entities interact with, and impact one another via relationships to
support the business mission.
A relationship is a natural business association that exists
relationship.
A verb phrase describes the relationship.
Relationships
Cardinality:
Each relationship on an ERD also depicts the complexity or
C a r d in a lit y M in im u m M a x im u m G r a p h ic N o t a t io n
I n t e r p r e t a t io n In sta n c e s In sta n c e s
E x a c t ly o n e 1 1
Z ero o r o n e 0 1
O n e o r m o re 1 m any ( > 1 )
M o re th a n o n e > 1 > 1
F ig u r e 5 .3
Relationships
Degree:
The degree of a relationship is the number of entities that
COURSE
has as a prerequisite
Relationships
Degree: (continued)
Relationships can also exist between more than two different
entities.
• These are sometimes called N-ary relationships.
• A relationship existing among three entities is called a 3-ary or
ternary relationship.
• An N-ary relationship maybe associated with an associative entity.
– An associative entity is an entity that inherits its primary key
from more than one other entity (parents). Each part of that
concatenated key points to one and only one instance of each
of the connecting entities.
meets as
is assigned to
SCHEDULED CLASS
is assigned to
ROOM
Classroom ID
. Building Abbreviation
. Room Number
Number of Seats
Relationships
Foreign Keys:
A relationship implies that instances of one entity are related to
primary key of one entity must be migrated into the other entity
as a foreign key.
• A foreign key is a primary key of one entity that is contributed to
(duplicated in) another entity for the purpose of identifying
instances of a relationship. A foreign key (always in a child entity)
always matches the primary key (in a parent entity).
CURRICULUM
Program of Study Code (Primary Key) DEPARTMENT
Title of Program Department Number (Primary Key)
offers is offered by
Type of Degree Awarded (Subsetting Criteria 1) Department Name
Department Number (Foreign Key)
Relationships
Foreign Keys: (continued)
When you have a relationship that you cannot differentiate
FIGURE(a)
STUDENT
Relationships
Generalization:
Generalization is an approach that seeks to discover and exploit
Relationships
Generalization: (continued)
• An entity subtype is an entity whose instances inherit some
common attributes from an entity supertype, and then add other
attributes that are unique to an instances of the subtype.
An entity can be both a supertype and subtype.
Through inheritance, the concept of generalization in data
models permits the the reduction of the number of attributes
through the careful sharing of common attributes (data yang
bersifat efektif dan efisien)
• The subtypes not only inherit the attributes, but also the data types,
domains, and defaults of those attributes.
• In addition to inheriting attributes, subtypes also inherit
relationships to other entities.
Prepared by Kevin C. Dittman for
ystems Analysis & Design Methods 4ed
by J. L. Whitten & L. D. Bentley Copyright Irwin/McGraw-Hill 1998
32
Data Modeling
PERSON
Personal ID Number (Primary Key)
Name
. Last Name can be
. First Name contacted ADDRESS
. Middle Initial at
Gender (Subsetting Criteria 1)
Race (Subsetting Criteria 2)
Marital Status (Subsetting Criteria 3)
is a
is a
EMPLOYEE
STUDENT
Personal ID Number = Social Security Number (Primary
Personal ID Number = Student Number (Primary Key)
Key) all attributes from PERSON plus
all attributes from PERSON Pension Plan Code is bound by CONTRACT
Life Insurance Plan Code
Medical Insurance Plan Code
Vacation Days Accumulated
Sick Days Acculumlated
PROSPECT
CURRENT STUDENT
FORMER STUDENT
ALUMNUS
specific.
The enterprise data model is usually stored in a corporate
repository.
objectives)
customer-no product-name
customer-name unit-of-measure
SYSTEM customer-rating unit-price
S balance-due quantity-available
USERS
Y
S
(requirements) ORDER
T order-no
order-date
E products-ordered
quantities-ordered Definition Phase
M
(establish and
A data models
N prioritize
A business system
L
Y requirements)
S
T SYSTEM
S DESIGNERS Reverse
(specification) Engineering
(optional)
SYSTEM
BUILDERS
(components)
Existing
Existing Interfaces Existing
Existing Applications and Networks
Databases and Technology and
and Technology Technology
Technology
following reasons:
• Data models help analysts to quickly identify business vocabulary
more completely than process models.
• Data models are almost always built more quickly than process
models.
• A complete data model can be fit on a single sheet of paper.
Process models often require dozens of sheets of paper.
• Process modelers too easily get hung up on unnecessary detail.
Discover the system What are the subjects of the business? In other words, what
entities types of persons, organizations, organizational units, places,
things, materials, or events are used in, or interact with this
system, about which data must be captured or maintained?
How many instances of each subject exist?
Discover the entity keys What unique characteristic (or characteristics) distinguishes an
instance of each subject from other instances of the same
subject? Are there any plans to change this identification
scheme in the future?
Discover entity subsetting Are there any characteristics of a subject that divide all
criteria instances of the subject into useful subsets? Are there any
subsets of the above subjects for which you have no convenient
way to group instances?
Discover attributes and What characteristics describe each subject? For each of these
domains characteristics: (1) what type of data is stored? (2) who is
responsible for defining legitimate values for the data? (3) what
are the legitimate values for the data? (4) is a value required?
and (5) is there any default value that should be assigned if you
don’t specify otherwise?
Discover security and Are there any restrictions on who can see or use the data? Who
control needs is allowed to create the data? Who is allowed to update the
data? Who is allowed to delete the data?
Discover data timing How often does the data change? Over what period of time is
needs the data of value to the business? How long should we keep the
data? Do you need historical data or trends? If a characteristic
changes, must you know the former values?
Discover generalization Are all instances of each subject the same? That is, are there
hierarchies special types of each subject that are described or handled
differently? Can any of the data be consolidated for sharing?
Discover relationships What events occur that imply associations between subjects?
and degrees What business activities or transactions require involve
handling or changing data about several different subjects of the
same or a different type?
Discover cardinalities Is each business activity or event handled the same way or are
there special circumstances? Can an event occur with only
some of the associated subjects, or must all the subjects be
Prepared by Kevin C. Dittman for
involved?
ystems Analysis & Design Methods 4ed
by J. L. Whitten & L. D. Bentley Copyright Irwin/McGraw-Hill 1998
43
Data Modeling
The Process of Logical Data Modeling
business’ data.
Computer-aided systems engineering (CASE) technology,
provides the repository for storing the data model and its detailed
descriptions.
about …’.
Your entity names and definitions should establish an initial glossary
of business terminology that will serve both you and future analysts
and users for years to come.
Prepared by Kevin C. Dittman for
ystems Analysis & Design Methods 4ed
by J. L. Whitten & L. D. Bentley Copyright Irwin/McGraw-Hill 1998
48
Data Modeling
Entity Name Business Definition
responds to
belongs to
PRODUCT generates
Comment
AGREEMENT
Comment
entity instance.
The value of a key cannot be null (batal).
valid.
the key may change over the lifetime of the entity instance.
• An intelligent key is a business code whose structure
communicates data about an entity instance (such as its
classification, size, or other properties).
• A code is a group of characters and/or digits that identifies and
describes something in the business system.
Other experts suggest that you avoid intelligent keys because
business codes can return value to the organization because
they can be quickly processed by humans without the
assistance of a computer.
Prepared by Kevin C. Dittman for
ystems Analysis & Design Methods 4ed
by J. L. Whitten & L. D. Bentley Copyright Irwin/McGraw-Hill 1998
53
Data Modeling
How to Construct Data Models
responds to
PRODUCT
sponsors
Key Data
Product-Number [PK1]
Universal-Product-Code [PK2]
PROMOTION sponsors CLUB establishes
is featured in Key Data Key Data
Product-Number [PK2] [FK] Club-Name [PK1]
Club-Name [PK1] [FK]
Universal-Product-Code [PK3] [FK]
generates
sold as
binds
PRODUCT
Key Data
Product-Number [PK1]
Universal-Product-Code [PK2] sponsors
is a
AGREEMENT
Key Data
Club-Name [PK2] [FK]
Agreement-Number [PK1]
MERCHANDISE TITLE
Key Data Key Data
generates PROMOTION
Product-Number [PK1] [FK] Product-Number [PK1] [FK] sponsors
Key Data establishes
Universal-Product-Code [PK2] [FK] Universal-Product-Code [PK2] [FK]
Club-Name [PK1] [FK] CLUB
is a Key Data
Club-Name [PK1]
MERCHANDISE TITLE
Key Data Key Data
PROMOTION
Product-Number [PK1] [FK] Product-Number [PK1] [FK]
Universal-Product-Code [PK2] [FK] Key Data
Universal-Product-Code [PK2] [FK]
Non-Key Data Club-Name [PK1] [FK] CLUB
Non-Key Data
Title-of-Work Non-Key Data sponsors Key Data
Merchandise-Name
Title-Cover generates Promotion-Number Club-Name [PK1]
Merchandise-Description
Catalog-Description Promotion-Release-Date
Merchadise-Type Non-Key Data
Copyright-Date Promotion-Status
Unit-of-Measure Club-Description
Entertainment-Category Promotion-Type
Automatic-Fill-Delay Club-Charter-Date
Credit-Value
Product-Number [FK]
is a Universal-Product-Code [FK]
Summary
Introduction
An Introduction to Systems Modeling
System Concepts for Data Modeling
The Process of Logical Data Modeling
How to Construct Data Models
The Next Generation