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

Chapter 2

Data modeling is the initial step in database design, involving the creation of a specific data model to represent complex real-world data structures. Essential components of a data model include data structure descriptions, integrity rules, and data manipulation methodologies, which facilitate understanding and communication within an organization. Various types of relationships (one-to-many, many-to-many, one-to-one) and constraints are crucial for ensuring data integrity and accurately reflecting business rules.

Uploaded by

kqpcvzz85y
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Chapter 2

Data modeling is the initial step in database design, involving the creation of a specific data model to represent complex real-world data structures. Essential components of a data model include data structure descriptions, integrity rules, and data manipulation methodologies, which facilitate understanding and communication within an organization. Various types of relationships (one-to-many, many-to-many, one-to-one) and constraints are crucial for ensuring data integrity and accurately reflecting business rules.

Uploaded by

kqpcvzz85y
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 35

DATA

MODELING
Data Modeling
 the first step in the database
design journey
 refers to the process of creating

a specific data model for a


determined problem domain.
data model

 a relatively simple representation,


usually graphical, of more complex real-
world data structures.
 represents data structures and their
characteristics, relations, constraints,
transformations, and other constructs
with the purpose of supporting a specific
problem domain.
 communication tool.
An implementation-ready data model should
contain at least the following components:

 A description of the data structure that


will store the end-user data
 A set of enforceable rules to guarantee
the integrity of the data
 A data manipulation methodology to
support the real-world data
transformations
The Importance of Data Models

 Data models can facilitate


interaction
 foster improved

understanding of the
organization
BUILDING
BLOCKS OF
ALL DATA
MODELS
Entity

 a person, place, thing, concept,


or event about which data will be
collected and stored.
 each entity occurrence is unique

and distinct.
Attributes
 characteristic of an entity.
 Example: customer last name,

customer first name, customer


phone number, customer
address, and customer credit
limit.
Relationship
 describes an association
among entities.
Types of Relationship

1. One-to-many (1:M or 1..*)


relationship.

Example:
Similarly, a customer (the “one”) may
generate many invoices, but each
invoice (the “many”) is generated by
only a single customer.
Types of Relationship
2. Many-to-many (M:N or *..*)
relationship.

Example:
Similarly, a student can take many
classes and each class can be taken by
many students, thus yielding the M:N
label for the relationship expressed by
“STUDENT takes CLASS.”stomer.
Types of Relationship
3. One-to-one (1:1 or 1..1) relationship.

Example:
A retail company’s management structure
may require that each of its stores be
managed by a single employee. The
relationship “EMPLOYEE manages STORE” is
labeled 1:1.
Constraint
 is a restriction placed on the data.
 help to ensure data integrity.
 Constraints are normally expressed in the form of
rules:

Example:
• An employee’s salary must have values that are
between 6,000 and 350,000.
• A student’s GPA must be between 0.00 and 4.00.
• Each class must have one and only one teacher
Business Rule

 a brief, precise, and unambiguous


description of a policy, procedure, or
principle within a specific organization.
 are used to define entities, attributes,
relationships, and constraints.
THE PROCESS OF IDENTIFYING AND
DOCUMENTING BUSINESS RULES IS
ESSENTIAL TO DATABASE DESIGN
FOR SEVERAL REASONS:
1. It helps to standardize the company’s view of
data.
2. It can be a communication tool between users and
designers.
3. It allows the designer to understand the nature,
role, and scope of the data.
4. It allows the designer to understand business
processes.
5. It allows the designer to develop appropriate
relationship participation rules and constraints and
to create an accurate data model.
Translating business Rule

1. “a customer may generate many


invoices”
- (customer and invoices) and a verb (generate)

that associates the nouns. From this


businessrule, you could deduce the following:

a. Customer and invoice are objects of interest


for the environment and should be represented
by their respective entities.
b. There is a generate relationship between
customer and invoice.
2. rule “a customer may generate
many invoices”
- observations:
a. the relationship is one-to-many (1:M).
b. complemented by the business rule “an
invoice is generated by only one
customer.”
To properly identify the relationship type, you should
generally ask two questions:

• How many instances of B are related to


one instance of A?
• How many instances of A are related to
one instance of B?
Naming Conventions

 use terminology that is familiar to the


users.
 use of a proper naming convention will
improve the data model’s ability to
facilitate communication
 Example: CUS_CREDIT_LIMIT.
EVOLUTION OF
DATA MODELS
1. Hierarchical and Network Models

1. Hierarchical Model
 is developed in the 1960s to manage large

amounts of data for


 complex manufacturing projects, such as the

Apollo rocket that landed on the moon in 1969.

2. network model
 was created to represent complex data

relationships more effectively than the


hierarchical model, to improve database
performance, and to impose a database standard.
2. Relational Model

 relational model is based on


mathematical set theory and represents
data as independent relations.
 Each relation (table) is conceptually
represented as a two-dimensional
structure of intersecting rows and
columns. The relations are related to
each other through the sharing of
common entity characteristics
3. The Object-Oriented Model

 A data model whose basic modeling


structure is an object.
4. The Entity Relationship Model

 A data model that describes


relationships (1:1, 1:M, and M:N) among
entities at the conceptual level with the
help of ER diagrams.
 Peter Chen first introduced the ER data
model in 1976;
entity relationship diagram (ERD)

 uses graphical representations to model


database components.
 A diagram that depicts an entity
relationship model’s entities, attributes,
and relations.
THE ER MODEL IS BASED ON
THE FOLLOWING COMPONENTS:
1. Entity
 data will be collected and stored.
 is represented in the ERD by a rectangle,
also known as an entity box.
 written in the center of the rectangle.
 generally written in capital letters and in
singular form
 an entity is mapped to a relational table.
Each row in the relational table is known
as an entity instance or entity
occurrence
2. Attributes
 Each entity consists of a set of attributes
that describes particular characteristics
of the entity.
 For example, the entity EMPLOYEE will
have attributes such as a Social Security
number, a last name, and a first name.
3. Relationships.

 Relationships describe associations


among data.
 The ER model uses the term connectivity
to label the relationship types.

You might also like