DATA MODEL
SS2 DATA PROCESSING
Objectives
Project analysis slide 2
Students should be able to;
• Define the term data model,
• State the approaches in data models.
• List and explain the significance of data
model.
• Explain the types of data models.
• create simple data models.
• Explain standard data models
•
Terms In Data Models
Project analysis slide 2
• Data: Raw and unprocessed facts
• Database: An organized collection of
related data.
• Database management system
(DBMS) is specialized computer software
available from computer vendors that is
used to create, access, control, and
manage the database.
• Some kind of data model describe how to
Terms In Data Models
Project analysis slide 2
• DBA: Database Administrator. A database
administrator (DBA) directs or performs all
activities related to maintaining a
successful database environment.
• Data Structure: A data structure is a
specialized format for organizing and
storing data.
• Data Model: A collection of tools for
describing data, data relationships, data
semantics and consistency constraints.
Terms In Data Models
Project analysis slide 2
• Entity: A real-world thing
• An entity instance is a single occurrence
of an entity.
• Attribute: Characteristics or properties of
an entity. Synonyms include element,
property, and field
Terms In Data Models
Project analysis slide 2
• A key is an attribute, or a group of
attributes, which assumes a unique value
for each entity instance. It is sometimes
called an identifier.
• Sometimes more than one attribute is
required to uniquely identify an instance of
an entity.
• A group of attributes that uniquely
identifies an instance of an entity is called
a concatenated key. Synonyms include
Terms In Data Models
Project analysis slide 2
• A primary key: It is a unique identifier for
each record in a relational database.
• Foreign key: In the context of relational
databases, a foreign key is a field (or
collection of fields) in one table that
uniquely identifies a row of another table
or the same table.
• In simpler words, the foreign key is a key
defined in a second table, but it refers to
the primary key or a unique key in the first
Data Model
Project
• A Dataanalysis
Model is slide 2
a collection of tools for
describing data, data relationships, data
semantics and consistency constraints.
• Data models describe the structure of the
data within a given domain
(organization/business/company), and by
implication, the underlying structure of that
domain
• Data Models visually represent (pictorial
representation) the nature of data, business
Data Model
Project analysis slide of
• It is a representation 2 data structures
required for a database and is a powerful
tool for expressing and communicating the
business requirements.
• Data models are created for any software
development that involves creation of
database objects to store and manipulate
data
• Data models are physically implemented in a
specific database management system using
Data Model
Project analysis
• The term sliderefers
"schema" 2 to the
organization of data as a blueprint of how
the database is constructed (divided into
database tables in the case of relational
databases).
• Database schema includes all
implementation details such as data types,
constraints, foreign or primary keys.
DIFFERENCES BETWEEN PRIMARY AND SECONDARY KEY
Project
BASIS FOR analysis slide
PRIMARY KEY 2 FOREIGN KEY
COMPARISO
N
Basic Primary Key is a chosen Foreign key in a table refers to
candidate key that uniquely the primary key of other table.
defines a tuple in a relation.
NULL Primary key value can never Foreign key accepts NULL
be NULL. value.
Duplicate No two tuples in a relation Tuples can carry duplicate
carry duplicate values for a value for a foreign key
primary key attribute. attribute.
Temporary Primary key constraint can Foreign Key constraint
Table be defined on the cannot be defined on the
temporary tables. temporary tables.
Clustered By default, a primary key is Foreign key is not clustered
index clustered indexed. indexed automatically; it has
to be done manually.
Insertion We can insert a value to a We cannot insert a value to a
primary key attribute, even if foreign key, if that value is not
the referencing foreign key present in the referenced
does not have that value in its primary key column.
column.
Deletion Before you delete a primary You can delete a value from
Data Model
Project analysis
• Metadata: slide
A data that2describes other data.
• Metadata summarizes basic information
about data, which can make finding and
working with particular instances of data
easier.
• They are the data that describe the structure
and workings of an organization's use of
information, and which describe the systems
it uses to manage that information.
Approaches to/stages of
data model
Conceptual Data Model
Project analysis
• A conceptual slidesimply
data model 2
shows the entities and the
relationship between them. It can
easily be drawn on paper
• It is highly abstract (no too much
detail, it is at a high level)
• It is easy to understand (not
technical)
• Only entities and their
relationships are visible
• Shows abstract relationships
• Can be rapidly updated
Logical Data Model
• Expands the conceptual model by
Project analysis
adding more detail slide 2
• It contains attributes (key
attributes and non-key attributes)
• It is not dependent on any specific
database. It is generic
• It can be implemented using
software tools
• Shows primary key – foreign key
relationships
• A little more difficult to enhance
than the
Physical Data Model.
Project analysis
• Entities become slide 2
tables
• Attributes become column
• Database compatible names are
used (It is common to write
names in physical model without
space)
• Includes database specific data
type (It is dependent on a specific
database)
• It takes more effort to be
enhanced
• Software tools can be used to
Feature Conceptual Logical Physical
Entity Names
Entity Relationships
Attributes
Primary Key
Foreign key
Tale Names
Column Names
Column Data type
Types of data models
• There are several data models. The most common
ones include:
• Flat file model
• Hierarchical database model
• Network model.
• Relational model.
• Object-oriented database model.
• Object-relational database model.
• Entity-relationship model.
And many more…
Flat model
• The flat (or table) model consists of a single, two-
dimensional array of data elements, where all
members of a given column are assumed to have
similar values, and all members of a row are assumed to
be related to one another.
The hierarchical model
• The hierarchical model organizes data into a tree-
like structure, where each record has a single
parent or root. Sibling records are sorted in a
particular order.
• That order is used as the physical order for storing
the database. This model is good for describing
many real-world relationships. It allows one-to-
many relationships.
The network model
• The network model builds on the hierarchical
model by allowing many-to-many
relationships between linked records,
implying multiple parent records.
• Based on mathematical set theory, the model
is constructed with sets of related records.
• Each set consists of one owner or parent
record and one or more member or child
records. A record can be a member or child in
multiple sets, allowing this model to convey
complex relationships.
The relational model
(RDBMS)
• The most common model, the relational model sorts data into
tables, also known as relations, each of which consists of
columns and rows.
• Each column lists an attribute of the entity in question, such
as price, zip code, or birth date.
• Together, the attributes in a relation are called a domain.
• A particular attribute or combination of attributes is chosen as a
primary key that can be referred to in other tables, when it’s
called a foreign key.
• Each row, also called a tuple, includes data about a specific
instance of the entity in question, such as a particular
employee.
• The model also accounts for the types of relationships between
The relational model
(RDBMS)
• Within the database, tables can be normalized, or brought to
comply with normalization rules (this will be further discussed
later) that make the database flexible, adaptable, and scalable.
• When normalized, each piece of data is atomic, or broken into
the smallest useful pieces.
• Relational databases are typically written in Structured Query
Language (SQL).
• The model was introduced by E.F. Codd in 1970.
Object-oriented database
model (OODB)
• This is a database management
system that supports the modelling
and creation of data as objects
(objects are entities).
• Object is anything in this real world
which have behaviour.
• It is a type of data model in which
data is stored in form of objects,
which are instances of classes. Object-
oriented data model is used to represent real life scenarios as
objects. The objects with similar functionalities are grouped
•OODBMS handles more complex
types.
•Complex types means OODBMS
can store graphics, videos,
geographical satellites
information etc.
Object-relational
model
• This hybrid database model combines the
simplicity of the relational model with some
of the advanced functionality of the object-
oriented database model.
• In essence, it allows designers to incorporate
objects into the familiar table structure.
Entity-relationship
model
• This model captures the relationships
between real-world entities much like the
network model, but it isn’t as directly tied to
the physical structure of the database.
• Instead, it’s often used for designing a
database conceptually.
• Here, the people, places, and things about
which data points are stored are referred to
as entities, each of which has certain
attributes that together make up their
domain.
• The cardinality, or relationships between
entities, are mapped as well.
• This will be discussed in detail later.
SIGNIFICANCE OF
DATA MODEL
Data models are a great communication tool because it facilitates interaction
and communication between the designers, programmers and end users. In
essence, it does not allow one party’s bias (what they consider to be most
important) towards data to take hold.
Some benefits of data model includes:
• A well-developed data model can foster improved understanding of the
organisation for which the database is developed.
• Data modelling will impose (implicitly or explicitly) constraints or limitations
on the data placed within the structure
• Higher quality. Just as architects consider blueprints before constructing a
building, you should consider modelling your data before building a system. A
data model helps define the problem, enabling you to consider different
approaches and choose the best one.
• Reduced cost. You can build databases and software system at lower cost via
data models.
SIGNIFICANCE OF DATA MODEL
• Clearer scope. A data model provides a focus for determining scope. It
provides something tangible to help business sponsors and developers
agree over precisely what is included within the database and what is
omitted. A data model also promotes agreement on vocabulary and
jargon.
• Faster performance. A sound model simplifies database tuning. A well-
constructed database typically runs fast, often quicker than expected.
• Fewer (data and application) errors
• Managed risk. You can use a data model to estimate the
complexity of software, and gain insight into the level of
development effort and project risk. You should consider the size
of a model, as well as the intensity of inter-table connections.
• Better documentation. Models document important concepts and
jargon, proving a basis for long-term maintenance. The
documentation will serve you well through the life time of the
database and through staff turnover.
STANDARD DATA MODELS/INDUSTRY STANDARD DATA MODELS (ISDM)
• A standard data model or industry standard data model is a
data model that is widely applied in some industry and shared
among competitors to some degree.
• They are often defined by standard bodies, database vendors
or operating system vendors
• Standard data models or industry standard data models (ISDM)
stipulates the data standards to be used within a
particular industry. These standards are the rules by
which data are described and recorded
• . The most effective standard data models have been
developed in banking, insurance, pharmaceutical and
automotive industries, to reflect the stringent
Examples of Standard
Data Models
• ISO 10303: ISO 10303 is an ISO (International
Organization for Standardization) standard for
the computer-interpretable representation and
exchange of product manufacturing information.
• ISO 15926: The ISO 15926 is a standard for
data integration, sharing, exchange, and hand-
over between computer systems.
• IDEAS Group: IDEAS is the International Defence
Enterprise Architecture Specification for
exchange. The purpose of the project is to
develop a data exchange format for military
Thank You