4 CC104 DataMOdel-1
4 CC104 DataMOdel-1
4 CC104 DataMOdel-1
DATA
MODEL
Objectives
In this chapter, you will:
o Explain data modeling
o Recognize the importance of data models
o Define the business rules and explain the
influence in designing a database
o Explain the evolution of data models
o Design data models and identify basic
cardinalities based on given business rules.
Data Modeling and Data
Models
Database design primarily focuses on
the processing and handling of end-
user data using the database structure.
In developing a database, the first phase
is data modeling, which refers to
creating a data model for a given
problem domain.
Data Model
A data model is a visual
representation of a real-world data
structure. It displays data
representation and how the data can
be accessed.
The various features, changes,
and constructs on a particular
database based on a domain and
collection of business rules or
specifications are illustrated using a
data model.
Problem Domain
It is a defined collection of scope and
boundaries based on a real-world
area or situation projected to be
solved.
The Importance of Data
Models
1. It facilitates interaction between
the designer, the application
programmer, and the end-user.
2. It allows a better understanding
of a particular organization for which
the database is intended to be built.
3. It serves as the database’s
blueprint.
A database blueprint is a special
file that contains a complete
specification for the structure of a
database, including all fields, forms,
and procedures.
Types of Database Models
1. Flat File Model
2. Hierarchical Model
3. Network Model
4. Object-Oriented Model
5. Relational Model
Flat File Model
It is a database model that utilizes a
single table design. It may have many
fields that are prone to data
inconsistency, redundancy, and
corruption. You can use the copy and
paste method to copy data from different
flat files, and automation is not allowed.
Delimiters like tabs and commas are used
to separate files in the record.
Flat File Model
Source: https://www.researchgate.net/figure/Example-of-a-Flat
File_fig1_291448084
Hierarchical Model
The data is stored organized in a
tree-like structure, and records are
interconnected through links. The
data can be retrieved by traversing
the whole tree starting from the root.
Hierarchical Model
Example
- relationship between customer and sales rep
- relationship between teacher and class
Attribute
• Property of an entity
• data collected about the entities
• represented by an oval shape in the ERD
Example:
What attributes can you identify for the ff:
- person
- customer
- faculty
Cardinalities
• the number of times an instance of an
entity can relate to instances of other
entities
• often symbolized by the crow's foot
notation
Basic Cardinalities
One-to-one
may be connected to a
One sales rep number of customers.
Many-to-many
Students library
borrowers books
Other Symbols/Notations: