0% found this document useful (0 votes)
13 views28 pages

Lecture 2&3 Database Models

The document provides an overview of various database models, including Object Based, Physical, and Record Based models, as well as emerging models like NoSQL and Hadoop. It discusses the characteristics, advantages, and disadvantages of each model, focusing on their structure, manipulation, and integrity rules. The document also highlights the importance of selecting the appropriate database model based on organizational needs and transaction volumes.

Uploaded by

josephagyeman001
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 views28 pages

Lecture 2&3 Database Models

The document provides an overview of various database models, including Object Based, Physical, and Record Based models, as well as emerging models like NoSQL and Hadoop. It discusses the characteristics, advantages, and disadvantages of each model, focusing on their structure, manipulation, and integrity rules. The document also highlights the importance of selecting the appropriate database model based on organizational needs and transaction volumes.

Uploaded by

josephagyeman001
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/ 28

DATABASE MODELS

On Completion of this Lecture, Student should understand;


 Database Models
 Categories of Database Model
 Object Based Database Models
 Physical Database Model
 Record Based Logic Models
 Hierarchical Database Model
 Network Database Model
 Relational Database Model
 Emerging Database Models
 Comparison of Database Model
 Which Database Model to Use
DATABASE MODEL
 A model is a representation or abstraction of reality, “real world”
objects, entity, and event, and their relationships or associations.

 It is an abstraction that concentrates on the essential, inherent aspects


of an organization.

 Database Model is an integrated collection of concepts for describing


and manipulating data, relationships between data, and constraints on
the data in an organization.
A DATABASE MODEL COMPRISES OF THREE
ELEMENTS
 A structural part, consisting of a set of business rules according to
which databases can be constructed

 A manipulative part, Defining the types of operation that can be


allowed on the database(Updating, retrieving and changing the structural
of the database using DML and DDL

 Possibly a set of integrity rules, which ensures that data is accurate.


CATEGORIES OF DATABASE MODELS
 The purpose of Database model is to represent data to make the data
understandable. They fall into three broad categories;
Object Based Database Models
Physical Database Model
Record Based Database Model
The object and record based database models are used describe
database at the conceptual and external levels, the physical database
model is used to describe database at internal level.
CATEGORIES OF DATABASE MODEL
 Object based Data models use concepts such as entities, attributes,
and relationships. An entity is a distinct object ( a person, place,
concepts, event) in the organization that is to be represented in the
database. An attribute is a property that describes some aspect of the
object that we wish to record, and a relationship is an association
between entities.
 Some of the more common types of object database model are;
Entity- Relationship
Object Oriented
The Entity-Relationship model has emerged as one of the main
techniques for modeling database design and forms the basis for the
database design methodology.
PHYSICAL DATABASE MODELS
 Physical Database model describes how data is stored in the computer,
representing information such as record ordering, and access paths.
There are not as many physical data models as logical data models, the
most common one being the unifying model.
RECORD BASED LOGICAL MODELS
 Record based logical are used in describing data at the logical and view
levels. In contrast to object based database models. They are used to
specify the overall logical structure of database and to provide a higher-
level description of the implementation. The three most widely accepted
record database model are;
Hierarchical
Network Model
Relational Model
HIERARCHICAL DATABASE
MODEL
HIERARCHICAL DATABASE MODEL
Hierarchical Database Model is one of the oldest database model. This
model is a structure of a tree with the records forming the nodes and
fields the branches of the tree.
Operations on Hierarchical Model are;
Insert
Update
Delete
HIERARCHICAL MODEL
ADVANTAGES OF
HIERARCHICAL MODEL
 Simplicity: In this model, records are related in a form of
parents/child relationship. So performing various operations in this
tree like structure is easy and simple.This result in the simple
design of the database from this model
 Data Security: Each Security segment can be linked to only one
parent and a child can only be reached through its parent in the
model.It provides that security which is enforced by the DBMS
 Data Integrity
 Efficiency: One to many relationships
DISADVANTAGES OF
HIERARCHICAL MODEL
Database Management Problems: If you make any changes in the data
structure of a hierarchical database, then you need to make the
necessary changes in all the application programs that access the
database.
Lack of Structural Independence
Structural Independence exists when the changes to the database
structure does not affect the DBMS’s ability to access data. Hierarchical
database systems use physical storage path to navigate to the different
data segments. So application programs should have a good knowledge
of the relevant access path to data
Operational Anomalies:
Implementation Limitation
DATA ANOMALIES
As discussed earlier, hierarchical model suffers from the Insert
anomalies, update anomalies and Deletion anomalies, also the retrieval
operation is complex and asymmetric, thus hierarchical model is not
suitable for the cases.
 Implementation Limitation
Many of the common relationships do not conform to 1 : N format
required by the hierarchical model. The many to many N:N relationships,
which are more common in real life are very difficult to implement in a
hierarchical model
NETWORK DATABASE MODEL
The Network model replaces the hierarchical tree with a graph thus
allowing more general connections among the models.
The main difference of the network model from the hierarchical model, is
its ability to handle many to many (N:N) relations.
The network structure allows 1:1(one:one), 1:M(One : Many),
M:M(many:many) relationships among others.
A relationship is a set. Each set is make up of at least two types of
record. An owner record(Parent), a member record(Child) in Hierarchical
model.
ADVANTAGES OF A
NETWORK MODEL
Capability to handle more relationship types: One to many
relationship and many and many relationships
Ease of Data Access
Data Integrity: This network model does not allow a member to
exist without an owner.Thus, a user must first define the owner and
then member record. This ensures the data integrity.
Data Independence
Database standards: Data Definition Language(DDL), Data
Manipulation Language(DML), Data Control Language(DCL).
RELATIONAL DATABASE MODEL
Relational Model stores data in the form of tables. The relational model
consist of 3 major components;
1. The set of relations and set of domains that defines the way data can
be represented(Data Structure)

2. Integrity Rules that defines the procedures to protect the data(Data


Integrity)

3. The operation that can performed on the data(Data Manipulation)


RELATIONAL MODEL
A relational database model is defined as a database that allows
you to group its data item into one or more independent tables that
can be related to one another by using fields or attributes common
to each related table.
CHARACTERISTICS OF
RELATIONAL
 DATABASE
The whole data is conceptually represented as an orderly arrangement
of data into rows and columns, called a relation or a table.
 All value are scaler. That is at any given row/column position in the
relation, there is one value and only one value.
DOMAIN
A domain specifies the kind of data represented by attribute or Field.

A domain is the set of all possible values that an attribute or field may
validly contain.

Data type is a physical concept whiles Domain is a logical one.


Domain is a specific data type.
E.G Number is a data type. Age is a domain. “StreetName” and
“Surname” are text fields, but they are obviously different kinds of text
fields. They belong to different domains.
ADVANTAGES OF RELATIONAL
MODEL
Structural Independence (Changes in database structure do not affect
the data access)
Simplicity
Flexible
Adhoc Query Capacity. Using SQL
DISADVANTAGES OF
RELATIONAL
Limited MODEL
ability to deal with binary
documents.
large objects such as images and

Mapping objects to relational database can be a difficult skill to learn


Hardware overheads
Relational Model is not suitable for large databases.
OBJECT ORIENTED DATABASE
MODEL
An object-Oriented model is built around objects.

An object has both attributes and behavior.

A class is template or blueprint for creating real-word objects.

An Object is an instance of a class.


ADVANTAGES OF OBJECT-ORIENTED MODEL

Ability to tackle challenging problems


Increased consistency in analysis and design
Robustness of the database system
Reusability of analysis and design
Inheritance
Modularity
Scalability
Flexibility
WHICH MODEL TO USE
The organization’s primary goals and requirement.

The volume of daily transactions that will be done

The estimated number of enquiries that will be made by the organization

NB: The relational and Object Oriented Models are currently in used.
EMERGING DATABASE MODELS
Big Data refers to voluminous data, velocity(high speed data) and Varied
data.
Hadoop
NoSQL
MapReduce
Key-Value
HADOOP
Hadoop is an open-source software framework that is designed to store
and process large amounts of data across clusters of commodity
hardware. It is an Apache project that was initially created by Doug
Cutting and Mike Cafarella in 2006, and it has since become a widely
adopted tool for big data processing and analysis.
Two Major components
Hadoop Distributed File System (HDFS)
MapReduce.
HDFS is a distributed file system that allows for the storage of large data
sets across multiple machines in a cluster. It is designed to be fault-
tolerant, meaning that it can handle hardware failures without losing
data.
MAPREDUCE
MapReduce is a programming model and processing framework that is
used to process data stored in HDFS.
MapReduce divides data processing tasks into two phases: the Map
phase and the Reduce phase.
In the Map phase, data is broken down into smaller chunks and
processed in parallel across the cluster. In the Reduce phase, the results
of the Map phase are aggregated to produce a final output.
NOSQL AND KEY-VALUE
NoSQL: A new generation of database management systems that is not
based on the traditional relational database model.

Key-Value database model is composed of two data elements: a key and


a value, in which every key has a corresponding value or set of values.
The key-value data model is also called the associative or attribute-value
data mode

You might also like