Академический Документы
Профессиональный Документы
Культура Документы
System
Segment
5 Analysis and Design
Database Review
International Islamic
University
Chittagong Campus
Learning Objectives
Define key data modeling terms.
Draw entity-relationship (E-R) and class diagrams
to represent common business situations.
Explain the role of conceptual data modeling in IS
analysis and design.
Distinguish between unary, binary, and ternary
relationships.
Define four types of business rules.
Compare the capabilities of class diagrams vs. ER diagrams.
Relate data modeling to process and logic
modeling.
Bottom-up
Data model is derived by reviewing
specifications and business documents.
Requirements Determination
Questions for Data Modeling
What are subjects/objects of the business?
Data
keys
Requirements Determination
Questions for Data Modeling (cont.)
Over what period of time are you interested in
the data?
Cardinality
subtypes, and
aggregations
and cardinalities
Introduction to Entity-Relationship
(E-R) Modeling
Entity-Relationship (E-R) Diagram
A detailed, logical representation of the
entities, associations and data elements
for an organization or business
Entities
An entity is a person, place ,object, event or
concept about which an organization wishes to
maintain data.
Some Examples: EMPLOYEE, STUDENT,STORE,
STATE, MACHINE, SALE, ACCOUNT
Entity type (or entity class) collection of
entities with common characteristics
(Eg:STUDENT)
Entity instance: A single occurrence of an
entity type (E.g Eugene Ching)
We use capital letters in naming an entity type
and in an E-R diagram, the name is placed
inside a rectangle representing the entity.
Attributes
Each entity type has a set of
attributes associated with it. An
attribute is a property or
characteristic of an entity that is of
interest to the organization.
Example: STUDENT: Student_ID,
Student_Name, Home_ Address,
Phone_Number,Major
Identifier
A candidate key that has been selected
as the unique identifying characteristic
for an entity type
Multivalued Attributes
An attribute that may take on more
than one value for each entity
instance
Represented on E-R Diagram in two
ways:
double-lined ellipse
weak entity
Identifier
attribute each
employee has a
unique ID.
Multivalued
attribute an
employee may have
more than one skill.
Relationships
Relationship
An association between the instances of
one or more entity types that is of
interest to the organization
Association indicates that an event has
occurred or that there is a natural link
between entity types
Relationships are always labeled with
verb phrases
10.23
10.23
Degree of Relationship
Degree: number of entity types that
participate in a relationship
Three cases
Unary: between two instances of one entity type
Binary: between the instances of two entity types
Ternary: among the instances of three entity types
Cardinality
The number of instances of entity B that can or
must be associated with each instance of entity
A
Minimum Cardinality
The minimum number of instances of entity B that
may be associated with each instance of entity A
Maximum Cardinality
The maximum number of instances of entity B that
may be associated with each instance of entity A
Cardinality-Example
Cardinality Symbols
Examples of cardinalities in
relationships
Associative Entity
10.34
10.34
as an associative entity
Ternary relationship
as an associative entity
Business rules
Specifications that preserve the integrity of a
conceptual or logical data model.
Four basic types of business rules are:
1.Entity integrity each instance of an entity type
must have a unique identifier that is not null.
2. Referential integrity constraints rules
concerning the relationship between entity types.
3. Domains constraints on valid values for
attributes.
4.Triggering operations other business rules that
protect the validity of attributes.
Domains
10.42
10.42
Triggering Operations
Triggering Operations
(Contd)
With triggering operations, the
responsibility for data integrity lies
within the scope of database
management system, not with
application programs or human
operators
Benefits
Reduced implementation time and cost
High-quality modeling
Packaged data
models provide
generic models that
can be customized for
a particular
organizations
business rules
Summary
In this chapter you learned how to:
Define key data modeling terms.
Draw entity-relationship (E-R) and class
diagrams to represent common business
situations.
Explain the role of conceptual data modeling in
IS analysis and design.
Distinguish between unary, binary, and ternary
relationships.
Define four types of business rules.
Compare the capabilities of class diagrams vs.
E-R diagrams.
Relate data modeling to process and logic
modeling.