Chapter 2
Chapter 2
MODELING
Data Modeling
the first step in the database
design journey
refers to the process of creating
understanding of the
organization
BUILDING
BLOCKS OF
ALL DATA
MODELS
Entity
and distinct.
Attributes
characteristic of an entity.
Example: customer last name,
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
1. Hierarchical Model
is developed in the 1960s to manage large
2. network model
was created to represent complex data