Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 94

HIM212

Database Management System I

Compiled by;
Bashir Ibrahim Baba
&
Adamu Zaharaddeen

School of Health Information (SHIM) ABUTH


07/12/2021 1
Tudun Wada, Zaria. Management
INTRODUCTION

In our life we have to remember so much of data. And it is easier for us to


remember all information for a few individuals but it is too difficult for us to
memorize all this information for a large number of individuals. There is
simply too much data to be managed in the minds and in order to store all the
new information, humanity invented the technology of writing. Then, in a
Competitive and global economy - data resources are essential for survival,
Information required for competitive initiatives. Accuracy & timeliness are
very important. Managers must understand the competitive advantages
available through innovative use of data. Databases should be understood
within the larger context of Information Resources Management.

School of Health Information Management


07/12/2021 2
(SHIM) ABUTH Tudun Wada, Zaria.
DEFINITIONS

Data: is a collection of a distinct small unit of information. It can be


used in a variety of forms like text, numbers, media, bytes, etc. it can be
stored in pieces of paper or electronic memory, etc.

The word “Data” is originated from the word “Datum” that means
“single piece of information”. Data is the plural of the word datum.

Data are known facts that can be recorded and have an implicit
meaning. (e.g., names, telephone numbers, addresses, etc.). Data are
raw facts concerning things such as people, objects, or events.

Data is information that can be translated into a form for efficient


movement and processing. Data is interchangeable.
School of Health Information Management
07/12/2021 3
(SHIM) ABUTH Tudun Wada, Zaria.
Data: data is a raw facts collected together for reference or analysis.

In Computing, Data is information that has been translated into a form


that is efficient for movement or processing.

Data: is defined as facts or figures or information that is stored in or


used by a computer.
Data can be defined as a representation of facts, concepts or
instructions in a formalized manner, which should be suitable for
communication, interpretation or processing by human or electronic
machine.

Data is represented in form of characters such as alphabets (A-Z, a-z),


digits (0-9) or special characters (+, -, /, *, <, >, =, etc.).
School of Health Information Management
07/12/2021 4
(SHIM) ABUTH Tudun Wada, Zaria.
Information
Information on the other hand is data that have been processed and presented
in a form suitable for human interpretation, often with the purpose of
revealing trends or patterns.
Database
Database is a collection of related information (data) in a structured way. It is
simply a bunch of information (data) stored on a computer. This could be a list
of all your clients, a list of the products you sell, the results of a chess
tournament or everyone in your family tree.
A database is an organized collection of data, so that it can be easily accessed
and managed. You can organize data into tables, rows, columns, and index it
to make it easier to find relevant information.

School of Health Information Management


07/12/2021 5
(SHIM) ABUTH Tudun Wada, Zaria.
• Database is an organized collection of structured information or data
typically stored electronically in a computer system.
• A Database is information that is set up for easy access, management
and updating.
• Database is also defined as an organized collection of structured data
that can be easily accessed, managed and updated.
• A database is a collection of related data which represents some aspect of
the real world. A database system is designed to be built and populated with
data for a certain task.

• In a note shell, a Database refers to a collection of logically related


information organized for easily accessible, managed and updated.
School of Health Information Management
07/12/2021 6
(SHIM) ABUTH Tudun Wada, Zaria.
Types of Database

1. Centralized Database: It operates entirely within a single location

2. Cloud Database: It runs over the internet

3. Commercial Database: It is designed by a commercial business

4. Distributed Database: It spread out over multiple devices/users

5. End-User Database: It is designed and used primarily by a single person e.g.


spreadsheet stored on your PC.

6. Graph Database: It focused equally on the data and the connections between them.

7. Object-Oriented Database: Is one in which data is represented as objects and


classes.

8. Operational DB: It allow users to modify data in real time.

9. Open-Source DB: It is designed for the public to use for free unlike commercial.

10. Relational DB: Information is stored structured about other data.


School of Health Information Management
07/12/2021 7
(SHIM) ABUTH Tudun Wada, Zaria.
Database Management System DBMS
Database Management System is a software package designed to define,
manipulate, retrieve and manage data in a database. A DBMS generally
manipulates the data itself, the data format, field names, record structure and
file structure. It also defines rules to validate and manipulate the data.
A Database Management System is also defined as a computerized data
keeping system.
DBMS are software systems used to store, retrieve and run queries on data. A
DBMS serves as an interface between an end-user and a database, allowing
users to create, read, update and delete data in the database.

School of Health Information Management


07/12/2021 8
(SHIM) ABUTH Tudun Wada, Zaria.
DBMS is termed as CRUD which is an acronym for;
C-CREATE

R-READ
U-UPDATE and

D-DELETE
NOTE: Database management system is break down into the following;

Database: which is a collection of data and


Management System: which is a set of programs to store and retrieve those
data.

Now we can define Database Management System DBMS as a collection of


inter-related data and set of programs to store and access those data in an
easy and effective manner.
School of Health Information Management
07/12/2021 9
(SHIM) ABUTH Tudun Wada, Zaria.
DBMS allows users to create their own databases as per their requirement. The term “DBMS”

includes the user of the database and other application programs. It provides an interface

between the data and the software application. Examples of some common databases include;
• MySQL
• Microsoft Access
• Oracle
• PostgreSQL
• dBASE
• FoxPro
• SQLite
• IBM DB2
• LibreOffice Base
• MariaDB
• Microsoft SQL Server etc.

School of Health Information Management


07/12/2021 10
(SHIM) ABUTH Tudun Wada, Zaria.
USES/VALUES OF DATA

Data plays a very vital role in day-to-day activities of man. Every field of life- ranging
from business, account, banking, insurance, agriculture, energy, industry, science,
engineering, and medicine, Some of the ways by which data has been found to be
useful are as listed below.

1. It is used for effective budgeting, planning and forecasting future growth

2. It is used to summarize large data into concise information

3. It is used for the purpose of estimation and prediction of government revenue and
expenditure

4. It is used for formulating policies for developmental purpose

5. It is used for both short and long-term forecast of future events

6. It is used for making conclusions from data collected in experimental, social and
behavioral research

7. It plays an important role in the usage of computers


School of Health Information Management
07/12/2021 11
(SHIM) ABUTH Tudun Wada, Zaria.
SOME TERMINOLOGIES USED IN DATABASE

• Databank

Databank is a well-organized and maintained collection of data for easy


consultation and use. This repository data is made accessible on local and
remote servers and can contain information about a single, dedicated subject
or multiple subjects in a well-organized manner. Or it refers to a large
collection of information that can be searched quickly especially by a
computer.
• Data Warehouse

Data Warehouses are central repositories of integrated data from one or more
different sources. They store current and historical data in one single place that
are used for creating analytical reports for workers throughout the enterprise.
Data warehousing is the electronic
07/12/2021 storage of a large amount of information by
School of Health Information Management
(SHIM) ABUTH Tudun Wada, Zaria.
12
• Data Management
Data Management is an administrative process that includes acquiring, validating, storing, and
processing required data to ensure the accessibility, reliability and timeless of the data for its
users.
Data Management: is the practice of collecting, keeping and using data securely, efficiently and
cost effectively.
Data Management is also defined as the process of ingesting (inserting), storing, organizing and
maintaining data created and collected by an organization.
Importance of Data Management
• It improve marketing campaigns
• It optimize business operations
• It reduce costs
• It increase productivity
• It allows information to be shared easily
• It allows information to be stored for future reference and easy retrieval.
School of Health Information Management
07/12/2021 13
(SHIM) ABUTH Tudun Wada, Zaria.
• Data Mining

Data mining is the search for relationships and global patterns that exist in
large databases but are bidden in the vast amounts of data. In data mining, an
analyst combines knowledge of the data with advanced machine learning
technologies to discover nuggets of knowledge hidden in the data. Data
mining software can find meaningful relationships that might take years to
find with conventional techniques. The software is designed to sift through
large collections of data and by using statistical and artificial intelligence
techniques, identify hidden relationships. The mined data typically include
electronic point of patient’s records, inventory, client transactions, and entry
records with matching demographics, usually obtained from an external
source.

School of Health Information Management


07/12/2021 14
(SHIM) ABUTH Tudun Wada, Zaria.
• Data Governance

Data governance is a set of principles and practices that ensure high


quality through the complete lifecycle of your data. According to the
Data Governance Institute (DGI), it is a practical and actionable
framework to help a variety of data stakeholders across any
organization identify and meet their information needs.
• Continuous Data Protection (CDP)

Continuous Data Protection (CDP), also called continuous backup, is a


system that backs up data on a computer system every time a change is
made. CDP maintains a continuous journal of data changes and makes
it possible to restore a system to any previous point in time.

School of Health Information Management


07/12/2021 15
(SHIM) ABUTH Tudun Wada, Zaria.
• Data Constraints

Constraints are the rules enforced on the data columns of a table.


These are used to limit the type of data that can go into a table. It
ensures the accuracy and reliability of the data in the database.
Constraints could be either on a column level or a table level.

Constraints enforce limits to the data or type of data that can be


inserted/updated/deleted from a table.
The whole purpose of constraints is to maintain the data Integrity
during an Update/Delete/Insert into a table.

School of Health Information Management


07/12/2021 16
(SHIM) ABUTH Tudun Wada, Zaria.
Types of constraints
• NOT NULL constraints
• UNIQUE constraints
• DEFAULT constraints
• CHECK constraints
• KEY Constraints – PRIMARY KEY, FOREIGN KEY
• DOMAIN constraints
• MAPPING constraint

1) NOT NULL:
NOT NULL constraint makes sure that a column does not hold NULL value. When
we don’t provide value for a particular column while inserting a record into a table, it
takes NULL value by default. By specifying NULL constraint, we can be sure that a
particular column(s) cannot have NULL values.
School of Health Information Management
07/12/2021 17
(SHIM) ABUTH Tudun Wada, Zaria.
2) UNIQUE:
UNIQUE Constraint enforces a column or set of columns to have
unique values. If a column has a unique constraint, it means that
particular column cannot have duplicate values in a table.

3) DEFAULT:
The DEFAULT constraint provides a default value to a column when
there is no value provided while inserting a record into a table.

4) CHECK:
This constraint is used for specifying range of values for a particular
column of a table. When this constraint is being set on a column, it
ensures that the specified column must have the value falling in the
specified range.
07/12/2021
School of Health Information Management
18
(SHIM) ABUTH Tudun Wada, Zaria.
5) KEY Constraints:
 PRIMARY KEY (PK):

A Primary Key is a minimal set of attributes (columns) in a table that


uniquely identifies tuples (rows) in a table.

A PK uniquely identifies each record in a table. It must have unique values


and cannot contain nulls.

Example: From the table below the Stu_Id field is marked as Primary Key,
that means the Stu_Id field cannot have duplicate and null values.

Stu_Id Stu_Name Stu_Age

101 Chaitan 22
102 Arya 26
103 Bran 25
104 John 21
School of Health Information Management
07/12/2021 19
(SHIM) ABUTH Tudun Wada, Zaria.
 FOREIGN KEY:

Foreign keys are the columns of a table that points to the primary key of
another table. They act as a cross-reference between tables.
In the below example the Stu_id column in Course_enrollment table is a
Foreign Key FK as it points to the Primary Key PK of the Student table.
Student table: Course_enrollment table:
Stu_Id Stu_Name Stu_Age
Course_id Stu_id
101 Chaitan 22 C01 101
102 Arya 26 C02 102
C03 101
103 Bran 25
C04 102
104 John 21
C05 103
C06 102

School of Health Information Management


07/12/2021 20
(SHIM) ABUTH Tudun Wada, Zaria.
6) DOMAIN Constraints:
Each table has certain set of columns and each column allows a same type of
data, based on its data type. The column does not accept values of any other
data type.
A domain is a unique set of values permitted for an attribute in a table.
For example, a domain of month_of_year can accept January, February, …
December as possible values. A domain of a week can accept Monday,
Tuesday, …Sunday as possible values. A domain of inters can accept whole
numbers that are Negative, Positive and Zero.
NB: Domain Constraints are user defined data type and we can define them like
this:
Domain Constraint = data type + Constraints (NOT NULL / UNIQUE /
PRIMARY KEY / FOREIGN KEY / CHECK / DEFAULT)
School of Health Information Management
07/12/2021 21
(SHIM) ABUTH Tudun Wada, Zaria.
7) MAPPING Constraints
• One to One: An entity of entity-set A can be associated with at most one entity of
entity-set B and an entity in entity-set B can be associated with at most one entity
of entity-set A.
• One to Many: : An entity of entity-set A can be associated with any number of
entities of entity-set B and an entity in entity-set B can be associated with at most
one entity of entity-set A.
• Many to One: : An entity of entity-set A can be associated with at most one entity
of entity-set B and an entity in entity-set B can be associated with any number of
entities of entity-set A.
• Many to Many: : An entity of entity-set A can be associated with any number of
entities of entity-set B and an entity in entity-set B can be associated with any
number of entities of entity-set A.

School of Health Information Management


07/12/2021 22
(SHIM) ABUTH Tudun Wada, Zaria.
Advantages of Database Management System
1. Data Transferring

2. Data Security

3. Data Integration

4. Data Consistency

5. Data Privacy

6. Data Concurrency

7. Data Searching

8. Data Sharing

9. Data Migration

10. Data Atomicity

11. Decision Making

12. Easy/Faster data Access

13. Increase End-User Productivity

14. Simplicity
07/12/2021
School of Health Information Management
23
(SHIM) ABUTH Tudun Wada, Zaria.
Disadvantages of DBMS
1. Complexity

2. Increased Cost
3. Difficulty

4. Time Consuming
5. Currency Maintenance

6. Huge Size

7. Database Failure

8. Increased Staff Cost


9. Cost of Data Conversion

10. Requirement of Technical staff


11. Lower Efficiency

12. Increased Vulnerability

School of Health Information Management


07/12/2021 24
(SHIM) ABUTH Tudun Wada, Zaria.
ADVANTAGES OF DBMS CONTINUE…

1. Data Redundancy

Unlike traditional file-system storage, Data Redundancy in DBMS is very less or not
present. Data Redundancy occurs when the same data are stored unnecessarily at
different places. Data Redundancy is reduced or eliminated in DBMS because all data
are stored at a centralized location rather than being created by individual users and for
each application.

For e.g. Application A and Application B have the same user MARVEL, and we need
to store personal information about the user such as Name, age, address, Date of Birth
etc. Not to mention, this user has also access to different application, so in traditional
file-based system, there is a need to maintain separate file system for each of the
application to store user’s information while in DBMS approach, there could be just
one centralized location where information can be down streamed to the different
application as and when needed.
School of Health Information Management
07/12/2021 25
(SHIM) ABUTH Tudun Wada, Zaria.
2. Data Consistency

In traditional file system storage, the changes made by one user in one
application doesn’t update the changes in other application, given both have the
same set of details. While this is not the case with DBMS systems as there is a
single repository of data that is defined once and is accessed by many users, and
data are consistent.

3. Data Sharing

Data Sharing is the primary advantage of Database management systems.


DBMS system allows users and applications to share Data with multiple
applications and users. Data are stored in one or more servers in the network and
that there is some software locking mechanism that prevents the same set of data
from being changed by two people at the same time. While the file system
doesn’t have this capability.
School of Health Information Management
07/12/2021 26
(SHIM) ABUTH Tudun Wada, Zaria.
4. Data Searching
Searching and retrieving of data is very easy in DBMS systems. The need to write
separate programs for each of the search is eliminated as in the case with a
traditional file-based approach. In DBMS, we can write small queries to search for
multiple information at a time from the data from DB servers.
5. Data Security
DBMS systems provide a strong framework to protect data privacy and security.
DBMS ensures that only authorized users have access to data and there is a
mechanism to define access privileges.
6. Data Concurrency

In DBMS, Data are stored in one or more servers in the network and that there is
some software locking mechanism that prevents the same set of data from being
changed by two people at the same time.
School of Health Information Management
07/12/2021 27
(SHIM) ABUTH Tudun Wada, Zaria.
7. Data Integration
Data integration is a process of combining the data residing at different
locations and present the user with a unified view of data. DBMS systems
allow Data Integration with much feasibility.
8. Data Access
While in traditional file-based approach, it might take hours to look for very
specific information that might be needed in the context of some business
emergency, while DBMS reduces this time to a few seconds. This is a great
advantage of DBMS because we can write small queries which will search the
Database for you and it will retrieve the information in the fastest way
possible due to its inbuilt searching operations.

School of Health Information Management


07/12/2021 28
(SHIM) ABUTH Tudun Wada, Zaria.
9. Decision making
Improved Data Sharing and better-managed data allow business to make
quality business decisions which will promote the growth of the organization.
10. Data Backup and Recovery

This is another advantage of DBMS as it provides a strong framework for


Data backup, users are not required to back up their data periodically and
manually, it is automatically taken care by DBMS. Moreover, in case of a
server crash, DBMS restores the Database to its previous condition.

11. Data Migration

There are some data which are access very frequently while there are few that
aren’t. So, DBMS provides the capability to access the frequently accessed
data as quickly as possible.

School of Health Information Management


07/12/2021 29
(SHIM) ABUTH Tudun Wada, Zaria.
12. Low Maintenance Cost

Though DBMS systems might be costly at the time of purchase but their maintenance
involves a very minimal cost.

13. Data Loss is almost eliminated

With DBMS, one can keep information for thousands of years, provided we don’t see
the doomsday. Data security and very low storage cost (as compared to our previous
generations) in the current century cut any possibility of Data Loss.

14. Data Atomicity

An atomic transaction is one in which all of the database actions occur or none of them
do. It is the duty of DBMS to store a complete transaction in the database. If any
transaction is partially completed, then it rolls backs them.

For e.g. If we make an online purchase, money is deducted from our account while if
the purchase is somehow failed, then no money is deducted or if it gets deducted, it
gets returned within few days.
School of Health Information Management
07/12/2021 30
(SHIM) ABUTH Tudun Wada, Zaria.
DISADVANTAGES OF DBMS

1. Increased Cost

a.) Cost of Hardware and Software

To store huge amount of data, one needs huge amount of space. Additionally, it will
require more memory and fast processing power to run the DBMS. So, an expensive
hardware and software will be needed that can provide all these facilities. As a result,
old file-based system needs to be upgraded. These sophisticated hardware and software
require maintenance which is very costly.

DBMS requires high initial investment for hardware and software. A significant
investment based upon size and functionality of organization is required. Also,
organization has to pay concurrent annual maintenance cost.
Sometimes you need a dedicated machine for better performance of database. These
machines and storage space increase extra cost of hardware. Its Licensing, operations,
and regulation compliance cost is also very high.
School of Health Information Management
07/12/2021 31
(SHIM) ABUTH Tudun Wada, Zaria.
b.) Increased Cost of Staff
DBMS staff includes database administrator, application programmers,
Database designers, System Analyst and maintenance personals. All of these
are highly educated and experienced in the field of DBMS. To get this level of
experienced people, one needs to spend a lot of money. Also training of
DBMS is very costly.

c.) Cost of Data Conversion


Data conversion may require at any time and organization has to take this step.
It is unbelievable that data conversion cost is more than the costs of DBMS
hardware and machine combined. Trained staff is needed to convert data to the
new system. It is a key reason that most of the organizations are still working
on their old DBMS due to high cost of data conversion.

School of Health Information Management


07/12/2021 32
(SHIM) ABUTH Tudun Wada, Zaria.
2. Complexity

A DBMS fulfill lots of requirement and it solves many problems related to database.
But all these functionalities make DBMS an extremely complex software. Developers,
designers, DBA and End users of database must have complete skills of DBMS if they
want to use it properly.

If they don’t understand this complex system then it may cause loss of data or database
failure. As it requires lots of management, so its complexity becomes an issue and very
big disadvantage of DBMS.

3. Technical staff requirement

Organizations have many employees working for them and these employees can
perform many other tasks too that are not in their domain but it is almost impossible for
them to work on DBMS.

A dedicated team of technical staff is required who can handle DBMS and as a result,
company have to pay handsome salary to them too.
School of Health Information Management
07/12/2021 33
(SHIM) ABUTH Tudun Wada, Zaria.
4. Database Failure
Data is the key for any organization, if data is lost then whole organization
will collapse. And as we know that in DBMS, all the files are stored in single
database so chances of database failure become more.

Any accidental failure of component may cause loss of valuable data. This is
really a big question mark for big firms and they are continuously working to
solve this issue.
5. Huge Size

DBMS is made to handle extremely huge data and queries, but due its
complexity, DBMS has become huge in size. Also, it becomes bigger in size
as data is fed in it. As a result, it requires lots of space and memory to run its
application efficiently.

School of Health Information Management


07/12/2021 34
(SHIM) ABUTH Tudun Wada, Zaria.
6. Currency Maintenance
Efficiency is the core need for any software, so it becomes must for DBMS to
be current. Because efficiency can only be achieved if your system is current.
Frequent updates, security measures and latest patches must be performed.
As new threats come daily, so DBMS requires to be updated on the daily basis.
DBMS should be updated according to the current scenario.
7. Difficult backup And Recovery
Database is processed and handled by several users concurrently, so it becomes
very difficult to get the exact state of database at the time of failure. It creates
many problems and users get confused what to do next.
So, it is very difficult to take backup and recover the database as just one
application program may pose serious problems.

School of Health Information Management


07/12/2021 35
(SHIM) ABUTH Tudun Wada, Zaria.
8. Confidentiality, Privacy and Security
In DBMS, information is made available to users from remote locations and
because it is centralized so chances of abuse are more often than in file-based
system.

If information from the data centre gets corrupted then every user of the
organization will be in a big trouble.

9. Data Integrity

As database is getting updated in the real time, so it is required that data


remains accurate during operations. For that some technical safeguards are
necessary. Several users attempting to update the data creates main threat to
data integrity.

School of Health Information Management


07/12/2021 36
(SHIM) ABUTH Tudun Wada, Zaria.
10. Lower Efficiency

There are many software and application programs that are made only for one particular problem.
But DBMS is a multi-use software that is used for many purposes and as a result it becomes less
efficient.

Specialized software is more efficient because they are produced and optimized for one problem.

11. Increased Vulnerability

As DBMS is capable of many things because it is centralized, but at the same time centralization
increases vulnerability. The whole system shuts down due to the failure of a single component.

This is very critical disadvantage of DBMS for those organizations that are totally dependent of
database.

12. Performance

Traditional files system was very good for small organizations as it gave splendid performance.
But DBMS gives poor performance for small scale firms as its speed is slow and due that it is well
suited for big firms.

School of Health Information Management


07/12/2021 37
(SHIM) ABUTH Tudun Wada, Zaria.
User-Interface in Database System
A user-interface is the view of a database interface that is seen by the user.
User-interfaces are often graphical or at least partly graphical constructed and
offer tools which make the interaction with the database easier.
Types of User-Interface
1. Command Line Interface (CLI)
2. Graphical User Interface (GUI)
3. Menu Driven Interface (MDI)
4. Form Based Interface (FBI)
5. Natural Language Interface (NLI)

School of Health Information Management


07/12/2021 38
(SHIM) ABUTH Tudun Wada, Zaria.
Database Users
Database users are the ones who really use and take the benefits of the database. They
directly interact with the database by means of query language like SQL (Structured
Query Language). These users will be Scientists, Engineers, Analysts who thoroughly
study SQL and database management system to apply the concepts in their requirements.
Types of Database Users
1. Database Administrators (DBA)
2. Naïve or Parametric End-Users
3. System Analysts
4. Sophisticated Users
5. Database Designers
6. Application Program
7. Casual/Temporary Users

School of Health Information Management


07/12/2021 39
(SHIM) ABUTH Tudun Wada, Zaria.
1. Database Administrator (DBA)
Database Administrator (DBA) is a person/team who defines the schema and
also controls the 3 levels of database. The DBA will then create a new
account ID and Password for the user if he/she needs to access the data base.
DBA is also responsible for providing security to the data base and he allows
only the authorized users to access/modify the data base.

2. Naive/Parametric End Users


Parametric End Users are the unsophisticated who don’t have any DBMS
knowledge but they frequently use the data base applications in their daily
life to get the desired results. For examples, Railway’s ticket booking users
are naive users. Clerks in any bank is a naive user because they don’t have
any DBMS knowledge but they still use the database and perform their given
task.

School of Health Information Management


07/12/2021 40
(SHIM) ABUTH Tudun Wada, Zaria.
3. System Analyst
System Analyst is a user who analyzes the requirements of parametric end
users. They check whether all the requirements of end users are satisfied.

4. Sophisticated Users
Sophisticated users can be engineers, scientists, business analyst, who are
familiar with the database. They can develop their own data base applications
according to their requirement. They don’t write the program code but they
interact the data base by writing SQL queries directly through the query
processor.

5. Data Base Designers


Data Base Designers are the users who design the structure of data base which
includes tables, indexes, views, constraints, triggers, stored procedures. He/she
controls what data must be stored and how the data items to be related.

School of Health Information Management


07/12/2021 41
(SHIM) ABUTH Tudun Wada, Zaria.
6. Application Programmers
Application Program are the back end programmers who writes the code
for the application programs. They are the computer professionals. These
programs could be written in Programming languages such as Visual
Basic, Developer, C, FORTRAN, COBOL etc.
7. Casual Users / Temporary Users
Casual Users are the users who occasionally use/access the data base but
each time when they access the data base they require the new
information, for example, Middle or higher level manager.

School of Health Information Management


07/12/2021 42
(SHIM) ABUTH Tudun Wada, Zaria.
Database Administrator (DBA)
Who is a database Administrator?

• DBA is a person or group of people responsible for Managing the

database system, Authorizing Access, Coordinating and Monitoring

resources in the database and DBMs.

• A Database Administrator (DBA) is the information technician

responsible for Directing or Performing all activities related to

maintaining a successful database environment.

• A DBA makes sure an organization's database and its related applications

operate functionally and efficiently.


School of Health Information Management
07/12/2021 43
(SHIM) ABUTH Tudun Wada, Zaria.
• The database administrator (DBA) is the person who manages, backs up and

ensures the availability of the data produced and consumed by today’s

organizations via their IT systems. The DBA is a critically important role in

many of today’s IT departments, and by extension, their organizations overall.

• For example: Consider a commercial bank, the Database Administrator

(DBA) is the person who ensures that the bank teller has easy, fast access to

your information, and can quickly access your bank balance and transaction

history. In this example, the DBA is a system or application.

• In general, DBA is responsible for most aspects of the organization’s

databases.

School of Health Information Management


07/12/2021 44
(SHIM) ABUTH Tudun Wada, Zaria.
TYPES OF DBA

There are different kinds of DBA depending on the responsibility that he owns.

a) Administrative DBA – This DBA is mainly concerned with installing, and

maintaining DBMS servers. His prime tasks are installing, backups, recovery,

security, replications, memory management, configurations and tuning. He is

mainly responsible for all administrative tasks of a database.

b) Development DBA – He is responsible for creating queries and procedure for the

requirement. Basically his task is similar to any database developer.

c) Database Architect – Database architect is responsible for creating and

maintaining the users, roles, access rights, tables, views, constraints and indexes.

He is mainly responsible for designing the structure of the database depending on

the requirement. These structures will be used by developers and development

07/12/2021 DBA to code. School of Health Information Management


45
(SHIM) ABUTH Tudun Wada, Zaria.
d) Data Warehouse DBA –DBA should be able to maintain the data and
procedures from various sources in the data warehouse. These sources can be
files, COBOL, or any other programs. Here data and programs will be from
different sources. A good DBA should be able to keep the performance and
function levels from these sources at same pace to make the data warehouse to
work.

e) Application DBA –He acts like a bridge between the application program and
the database. He makes sure all the application program is optimized to interact
with the database. He ensures all the activities from installing, upgrading, and
patching, maintaining, backup, recovery to executing the records works
without any issues.

f) OLAP DBA – He is responsible for installing and maintaining the database in


OLAP systems. He maintains only OLAP databases.
School of Health Information Management
07/12/2021 46
(SHIM) ABUTH Tudun Wada, Zaria.
RESPONSIBILITIES OF DATABASE ADMINISTRATORS
A database administrator's responsibilities may include:

i. Installing and upgrading the database server and/or application tools.


ii. Planning for and allocating the database system’s physical requirements,
such as memory, disk space, network requirements, etc.
iii. Modifying the database structure using information provided by
application developers.

iv. Creating users profiles, and ensuring system security by careful


allocation of user permissions.

v. Ensuring compliance with database vendor license agreement, including


number of installations, and taking care of licensing renewals.

School of Health Information Management


07/12/2021 47
(SHIM) ABUTH Tudun Wada, Zaria.
vi. Creating a backup and recovery strategy for the database, and regularly
testing the backups to ensure usability.
vii. Monitoring technical support for both database systems and related
applications.
viii. Creating reports by querying from database (as per need). These reports
can be in the form of pre-formatted reports using the application
frontend, or custom-made ad hoc reports by the database administrator.
ix. Monitoring and optimizing the database’s performance using either
manual or automated tools. This may be a DBA’s most important tasks.
x. Migrating database instances to new hardware and new versions of
software from on premise to cloud based databases and vice versa.

School of Health Information Management


07/12/2021 48
(SHIM) ABUTH Tudun Wada, Zaria.
FUNCTIONS OF DATABASE ADMINISTRATORS

The primary function of a DBA is to implement, maintain, optimize and manage

database structures for the organization. Basically, the DBA keeps databases and

applications running up to PAR, or performance, availability, and recoverability.

However, a DBA must undertake some additional functions.

1. Installing and upgrading the DBMS Servers: – DBA is responsible for

installing a new DBMS server for the new projects. He is also responsible for

upgrading these servers as there are new versions comes in the market or

requirement. If there is any failure in up gradation of the existing servers, he

should be able revert the new changes back to the older version, thus

maintaining the DBMS working. He is also responsible for updating the service

packs/ hot fixes/ patches toSchool


07/12/2021
the ofDBMS servers.
Health Information Management
49
(SHIM) ABUTH Tudun Wada, Zaria.
2. Design and implementation: – Designing the database and implementing is also
DBA’s responsibility. He should be able to decide proper memory management,
file organizations, error handling, log maintenance etc. for the database.

3. Performance tuning: – Since database is huge and it will have lots of tables,
data, constraints and indices, there will be variations in the performance from
time to time. Also, because of some designing issues or data growth, the database
will not work as expected. It is responsibility of the DBA to tune the database
performance. He is responsible to make sure all the queries and programs works
in fraction of seconds.

4. Migrate database servers: – Sometimes, users using oracle would like to shift
to SQL server or Netezza. It is the responsibility of DBA to make sure that
migration happens without any failure, and there is no data loss.

School of Health Information Management


07/12/2021 50
(SHIM) ABUTH Tudun Wada, Zaria.
5. Backup and Recovery: – Proper backup and recovery programs needs to be

developed by DBA and has to be maintained him. This is one of the main

responsibilities of DBA. Data/objects should be backed up regularly so that if

there is any crash, it should be recovered without much effort and data loss.

6. Security: – DBA is responsible for creating various database users and roles,

and giving them different levels of access rights.

7. Documentation: – DBA should be properly documenting all his activities so

that if he quits or any new DBA comes in, he should be able to understand the

database without any effort. He should basically maintain all his installation,

backup, recovery, security methods. He should keep various reports about

database performance.
School of Health Information Management
07/12/2021 51
(SHIM) ABUTH Tudun Wada, Zaria.
DBMS USER INTERFACE
A database management system (DBMS) interface is a user interface which
allows for the ability to input queries to a database without using the query
language itself. A DBMS interface could be a web client, a local client that
runs on a desktop computer, or even a mobile app.
A database management system stores data and responds to queries using a
query language, such as SQL. A DBMS interface provides a way to query data
without having to use the query language, which can be complicated.

DBMS Interfaces:-
i. Menu based interfaces:- These interfaces presents the user with list of
option called menus. Pull down menus are the very important technique.

School of Health Information Management


07/12/2021 52
(SHIM) ABUTH Tudun Wada, Zaria.
ii. Graphical user interfaces:- lt displays a schema to the user in
diagrammatic form. Most GUIs use pointing device such as a mouse.

iii. Natural language interfaces:-These Interfaces accept request written in


English or some other language.

iv. Forms base interfaces: - These interface displays a form to each user.
users can fill out all the entries to insert new data.

v. Interfaces for parametric user:- parametric user such as bank tellers,


often have a small set of operations that they must perform repeatedly.
For this a small set of abbreviated commands is included, with the goal
of minimizing the number of keystrokes required for each request.
vi. Interface for DBA:- most database systems contain privileged
commands that can be used only by the DBA staff.

School of Health Information Management


07/12/2021 53
(SHIM) ABUTH Tudun Wada, Zaria.
DATA SOURCES AND DATA TYPES IN DBMS

A data source is simply the source of the data. It can be a file, a particular
database on a DBMS, or even a live data feed. The data might be located on the
same computer as the program, or on another computer somewhere on a network.
For example, a data source might be an Oracle DBMS running on an OS/2
operating system, accessed by Novell Netware; an IBM DB2 DBMS accessed
through a gateway; a collection of Xbase files in a server directory; or a local
Microsoft Access database file.
A data source is the location where data that is being used come from. In a
database management system, the primary data source is the database, which can
be located in a disk or a remote server. The data source for a computer program
can be a file, a data sheet, a spreadsheet, an XML file or even hard-coded data
within the program.
School of Health Information Management
07/12/2021 54
(SHIM) ABUTH Tudun Wada, Zaria.
The purpose of a data source is to gather all of the technical information needed
to access the data - the driver name, network address, network software, and so
on - into a single place and hide it from the user. The user should be able to look
at a list that includes Payroll, Inventory, and Personnel, choose Payroll from the
list, and have the application connect to the payroll data, all without knowing
where the payroll data resides or how the application got to it.
DATABASE DATA TYPE

A database data type refers to the format of data storage that can hold a distinct
type or range of values.  When computer programs store data in variables, each
variable must be designated a distinct data type.  Some common data types are
as follows: integers, characters, strings, floating point numbers and arrays.  More
specific data types are as follows: varchar (variable character) formats, Boolean
values, dates and timestamps.
School of Health Information Management
07/12/2021 55
(SHIM) ABUTH Tudun Wada, Zaria.
When defining the fields in a database table, we must give each field a data
type. For example, the field Birth Year is a year, so it will be a number, while
First Name will be text. Most modern databases allow for several different
data types to be stored. Some of the most common data types are listed here:
• Text: for storing non-numeric data that is brief, generally under 256
characters. The database designer can identify the maximum length of the
text.
• Number: for storing numbers. There are usually a few different number
types that can be selected, depending on how large the largest number will
be.
• Yes/No: a special form of the number data type that is (usually) one byte
long, with a 0 for “No” or “False” and a 1 for “Yes” or “True”.

School of Health Information Management


07/12/2021 56
(SHIM) ABUTH Tudun Wada, Zaria.
• Date/Time: a special form of the number data type that can be
interpreted as a number or a time.
• Currency: a special form of the number data type that formats all
values with a currency indicator and two decimal places.
• Paragraph Text: this data type allows for text longer than 256
characters.
• Object: this data type allows for the storage of data that cannot be
entered via keyboard, such as an image or a music file.

School of Health Information Management


07/12/2021 57
(SHIM) ABUTH Tudun Wada, Zaria.
Data Modeling
Data Modeling is the process of creating a visual representation of
either a whole information system or part of it to communicate
connections between data points and structures.
NB: The goal of Data Modeling is to illustrate the type of data used and
stored within the system, the relationships among these data types, the
ways the data can be grouped and organized and its formats and
attributes.

School of Health Information Management


07/12/2021 58
(SHIM) ABUTH Tudun Wada, Zaria.
Data modeling occurs at three different levels (phases) namely;
1. Conceptual Data Model: They also referred to as Domain Models.
They offer a big-picture view of what the system will contain, how
it will be organized and which business rules are involved.
Conceptual models are usually created as part of the process of
gathering initial project requirements.
2. Logical Data Model: They are less abstract and provide greater
detail about the concepts and relationships in the domain under
consideration.
3. Physical Data Modeling: They provide a schema for how the data
will be physically stored within a database.
School of Health Information Management
07/12/2021 59
(SHIM) ABUTH Tudun Wada, Zaria.
Data Modeling Process
i. Identify the entities
ii. Identify key properties of each entity

iii. Identify relationships among entities


iv. Map attributes to entities completely
v. Assign keys as needed

vi. Finalize and Validate the data model

School of Health Information Management


07/12/2021 60
(SHIM) ABUTH Tudun Wada, Zaria.
Types of Data Modeling in DBMS

There are several types of database management systems. Here is


a list of five common Database Management Systems:
1. Hierarchical databases
2. Network databases

3. Relational databases
4. Object-oriented databases
5. Cloud Databases

School of Health Information Management


07/12/2021 61
(SHIM) ABUTH Tudun Wada, Zaria.
1) HIERARCHICAL DATABASES

In a hierarchical database management system (hierarchical DBMSs)


model, data is stored in a parent-children relationship node. In a
hierarchical database, besides actual data, records also contain
information about their groups of parent/child relationships. 

In a hierarchical database model, data is organized into a tree-like


structure. The data is stored in the form of a collection of fields where
each field contains only one value. The records are linked to each other
via links into a parent-children relationship. In a hierarchical database
model, each child record has only one parent. A parent can have
multiple children.

School of Health Information Management


07/12/2021 62
(SHIM) ABUTH Tudun Wada, Zaria.
A Hierarchical Database

Root

Level 1 Level 1
Child Child

Level 2 Level 2 Level 2 Level 2


Child Child Child Child

School of Health Information Management


07/12/2021 63
(SHIM) ABUTH Tudun Wada, Zaria.
An example of a Hierarchical Database of a University:

University

Department Infrastructure

Lecturers Students Course

Theory Labs

School of Health Information Management


07/12/2021 64
(SHIM) ABUTH Tudun Wada, Zaria.
ADVANTAGE 

A hierarchical database can be accessed and updated rapidly. As shown


in the figure above, its model structure is like a tree and the
relationships between records are defined in advance. This feature is a
double-edged sword.

DISADVANTAGE 
This type of database structure is that each child in the tree may have
only one parent. Relationships or linkages between children are not
permitted, even if they make sense from a logical standpoint.
Hierarchical databases are like this in their design. Adding a new field
or record requires that the entire database be redefined.  

School of Health Information Management


07/12/2021 65
(SHIM) ABUTH Tudun Wada, Zaria.
2) NETWORK DATABASES

Network database management systems (Network DBMSs) use a


network structure to create a relationship between entities. Network
databases are mainly used on large digital computers. Network
databases are hierarchical databases, but unlike hierarchical databases
where one node can have a single parent only, a network node can have
a relationship with multiple entities. A network database looks more
like a cobweb or interconnected network of records.

In network databases, children are called members and parents are


called occupiers. The difference between each child or member is that it
can have more than one parent.

School of Health Information Management


07/12/2021 66
(SHIM) ABUTH Tudun Wada, Zaria.
School of Health Information Management
07/12/2021 67
(SHIM) ABUTH Tudun Wada, Zaria.
3) RELATIONAL DATABASES
In a relational database management system (RDBMS), the
relationship between data is relational and data is stored in tabular
form of columns and rows. Each column of a table represents an
attribute and each row in a table represents a record. Each field in a
table represents a data value. 
Structured Query Language (SQL) is the language used to query
RDBMS, including inserting, updating, deleting, and searching
records. Relational databases work on each table that has a key field
that uniquely indicates each row. These key fields can be used to
connect one table of data to another.
School of Health Information Management
07/12/2021 68
(SHIM) ABUTH Tudun Wada, Zaria.
School of Health Information Management
07/12/2021 69
(SHIM) ABUTH Tudun Wada, Zaria.
Relational databases are the most popular and widely used databases. Some of the
popular DDBMS are Oracle, SQL Server, MySQL, SQLite, and IBM DB2. 

The relational database has two major advantages:

1. Relational databases can be used with little or no training.

2. Database entries can be modified without specifying the entire body.

Properties of Relational Tables


• In a relational database, we have to follow the properties given below:
• Values are Atomic
• Each Row is alone.
• Column Values are the same thing.
• Columns are undistinguished.
• Sequence of Rows is Insignificant.
• Each Column has a common name.
School of Health Information Management
07/12/2021 70
(SHIM) ABUTH Tudun Wada, Zaria.
4) OBJECT-ORIENTED MODEL 

In this Model, we have to discuss the functionality of object-oriented Programming. It


takes more than the storage of programming language objects. Object DBMS's increase
in the semantics of C++ and Java. It provides full-featured database programming
capabilities while containing native language compatibility. It adds the database
functionality to object programming languages. This approach is analogical of the
application and database development into a constant data model and language
environment. Applications require less code, use more natural data modeling, and code
bases are easier to maintain. Object developers can write complete database
applications with a decent amount of additional effort. 

The object-oriented database derivation is the integrity of object-oriented programming


language systems and consistent systems. The power of object-oriented databases
comes from the cyclical treatment of both consistent data, as found in databases, and
transient data, as found in executing programs.
School of Health Information Management
07/12/2021 71
(SHIM) ABUTH Tudun Wada, Zaria.
School of Health Information Management
07/12/2021 72
(SHIM) ABUTH Tudun Wada, Zaria.
Object-oriented databases use small, recyclable separated from software called objects.
The objects themselves are stored in the object-oriented database.  

Each object contains two elements:

A piece of data (e.g., sound, video, text, or graphics).

Instructions, or software programs called methods, for what to do with the data.

Object-Oriented database management systems (OODBMs) were created in the early


1980s.
Benefits of Object-oriented databases 

The benefits of object-oriented databases are compelling. The ability to mix and match
reusable objects provides the incredible multimedia capability.

Disadvantages of Object-oriented databases

Object-oriented databases are more expensive to develop.

Most organizations are unwilling to abandon and convert from those databases.
School of Health Information Management
07/12/2021 73
(SHIM) ABUTH Tudun Wada, Zaria.
5) CLOUD DATABASE

A type of database where data is stored in a virtual environment and executes

over the cloud computing platform. It provides users with various cloud

computing services (SaaS, PaaS, IaaS, etc.) for accessing the database. There

are numerous cloud platforms, but the best options are:

• Amazon Web Services(AWS)

• Microsoft Azure

• Kamatera

• PhonixNAP

• ScienceSoft

• Google Cloud SQL, etc.


School of Health Information Management
07/12/2021 74
(SHIM) ABUTH Tudun Wada, Zaria.
FUNCTIONS OF DATABASE MANAGEMENT SYSTEM

The functions of DBMS are as follow:

1. Stores the definitions of data and their relationships (metadata) in a data dictionary;
any changes made are automatically recorded in the data dictionary.

2. Creates the complex structures required for data storage.

3. Transforms entered data to conform to the data structures.


4. Creates a security system and enforces security within that system.

5. Creates complex structures that allow multiple user access to the data.

6. Performs backup and data recovery procedures to ensure data safety.

7. Promotes and enforces integrity rules to eliminate data integrity problems.

8. Provides access to the data via utility programs and from programming languages
interfaces.
9. Provides end-user access to data within a computer network environment.
School of Health Information Management
07/12/2021 75
(SHIM) ABUTH Tudun Wada, Zaria.
RELATIONSHIPS

Most databases are divided into many tables, most of which are related to one
another. In most modern databases, such as the relational database, relationships are
established through the use of primary and foreign keys. The purpose of separating
data into tables and establishing table relationships is to reduce data redundancy.

Three types of table relationships that can be derived are as follows:


 One-to-one: One record in a table is related to only one record in another table.

 One-to-many: One record in a table can be related to many records in another


table.
 Many-to-many: One record in a table can be related to one or more records in
another table, and one or more records in the second table can be related to one
or more records in the first table.

School of Health Information Management


07/12/2021 76
(SHIM) ABUTH Tudun Wada, Zaria.
School of Health Information Management
07/12/2021 77
(SHIM) ABUTH Tudun Wada, Zaria.
The above diagram briefly illustrates table relationships in a relational
database. A relational database allows parent tables to have many child
tables, and child tables to have many parent tables. The figure shows
two tables. Table 1 has an ID column (primary key) and Table 2 has an
FK column (foreign key). In the one-to-one relationship example,
notice that for every ID in Table 1, there is only one ID in Table 2. In
the one-to-many relationships example, notice that the ID of 1 has
many occurrences in Table 2. In the many-to-many relationship
example, notice that the ID in Table 1 might occur multiple times in
Table 2 as a foreign key, and the ID in Table 2 might occur multiple
times in Table 1.

School of Health Information Management


07/12/2021 78
(SHIM) ABUTH Tudun Wada, Zaria.
HIERARCHY OF DATA/ELEMENTS OF DATABASE
Data are the principal resources of an organization. Data stored in
computer systems form a hierarchy extending from a single bit to a
database, the major record-keeping entity of a firm. Each higher rung of
this hierarchy is organized from the components below it.
Data are logically organized into:

1. Bits (characters)
2. Fields

3. Records
4. Files

5. Databases
School of Health Information Management
07/12/2021 79
(SHIM) ABUTH Tudun Wada, Zaria.
1. Bit (Character) - a bit is the smallest unit of data
representation (value of a bit may be a 0 or 1). Eight bits
make a byte which can represent a character or a special
symbol in a character code.
2. Field - a field consists of a group of characters. A data field
represents an attribute (a characteristic or quality) of some
entity (object, person, place, or event).
3. Record - a record represents a collection of attributes that
describe a real-world entity. A record consists of fields, with
each field describing an attribute of the entity.

School of Health Information Management


07/12/2021 80
(SHIM) ABUTH Tudun Wada, Zaria.
4. File - a group of related records. Files are frequently classified by
the application for which they are primarily used (employee file). A
primary key in a file is the field (or fields) whose value identifies a
record among others in a data file.
5. Database - is an integrated collection of logically related records or
files. A database consolidates records previously stored in separate
files into a common pool of data records that provides data for
many applications. The data is managed by systems software called
database management systems (DBMS). The data stored in a
database is independent of the application programs using it and of
the types of secondary storage devices on which it is stored.

School of Health Information Management


07/12/2021 81
(SHIM) ABUTH Tudun Wada, Zaria.
DATA SECURITY IN DBMS
Database security refers to the collective measures used to protect and
secure a database or database management software from illegitimate
use and malicious cyber threats and attacks.
Database security procedures are aimed at protecting not just the data
inside the database, but the database management system and all the
applications that access it from intrusion, misuse of data, and damage.
It is a broad term that includes a multitude of processes, tools and
methodologies that ensure security within a database environment.

School of Health Information Management


07/12/2021 82
(SHIM) ABUTH Tudun Wada, Zaria.
Database security covers and enforces security on all aspects and
components of databases. This includes:
• Data stored in database.
• Database server.
• Database management system (DBMS)

• Other database workflow applications

School of Health Information Management


07/12/2021 83
(SHIM) ABUTH Tudun Wada, Zaria.
Techniques used for Data Security

Some of the securities techniques use to secure data in a database include;


1) Physical security

Whether your database server is on-premise or in a cloud data center, it must be located
within a secure, climate-controlled environment. (If your database server is in a cloud data
center, your cloud provider will take care of this for you.)
2) Authentication/ Authorization

Authorization is granting process of a right or privilege to a subject (a user or a program) to


have legitimate access to a system or systems’ objects. It involves the authentication of
subject requesting access to objects. The administrator usually create accounts with specific
privileges according to the security level of the user. Database security measures include
authentication, the process of verifying if a user’s credentials match those stored in your
database, and permitting only authenticated users access to your data, networks, and
database platform.

School of Health Information Management


07/12/2021 84
(SHIM) ABUTH Tudun Wada, Zaria.
3) Access
A primary outcome of database security is the effective limitation of access to your data. Access
controls authenticate legitimate users and applications, limiting what they can access in your
database. Access includes designing and granting appropriate user attributes and roles and limiting
administrative privileges.
4) Database Auditing
Auditing record all logins to the database server and operating system, and log all operations
performed on sensitive data as well. Database security standard audits should be performed
regularly.

5) Backups
A data backup, as part of your database security protocol, makes a copy of your data and stores it
on a separate system. This backup allows you to recover lost data that may result from hardware
failures, data corruption, theft, hacking, or natural disasters.

6) Encryption
Encryption is encoding process of sensitive data to become unreadable. Most of relational
database management systems support this purpose to secure its data.
School of Health Information Management
07/12/2021 85
(SHIM) ABUTH Tudun Wada, Zaria.
DATABASE BACKUP AND RECOVERY

Backup and recovery describes the process of creating and storing


copies of data that can be used to protect organizations against data
loss. This is sometimes referred to as operational recovery. Recovery
from a backup typically involves restoring the data to the original
location, or to an alternate location where it can be used in place of the
lost or damaged data.

Database Backup is storage of data that means the copy of the data. It is
a safeguard against unexpected data loss and application errors. It
protects the database against data loss. If the original data is lost, then
using the backup it can be reconstructed.

School of Health Information Management


07/12/2021 86
(SHIM) ABUTH Tudun Wada, Zaria.
The backups are divided into two types,
• Physical Backup
• Logical Backup

1. Physical Backups

Physical Backups are the backups of the physical files used in storing
and recovering your database, such as data files, control files and
archived redo logs, log files. It is a copy of files storing database
information to some other location, such as disk, some offline storage
like magnetic tape. Physical backups are the foundation of the recovery
mechanism in the database. Physical backup provides the minute details
about the transaction and modification to the database.
School of Health Information Management
07/12/2021 87
(SHIM) ABUTH Tudun Wada, Zaria.
2. Logical backup
Logical Backup contains logical data which is extracted from a
database. It includes backup of logical data like views, procedures,
functions, tables, etc. It is a useful supplement to physical backups in
many circumstances but not a sufficient protection against data loss
without physical backups, because logical backup provides only
structural information.

School of Health Information Management


07/12/2021 88
(SHIM) ABUTH Tudun Wada, Zaria.
Importance of Backups
a. Planning and testing backup helps against failure of media, operating
system, software and any other kind of failures that cause a serious data
crash.
b. It determines the speed and success of the recovery.
c. Physical backup extracts data from physical storage (usually from disk to
tape). Operating system is an example of physical backup.
d. Logical backup extracts data using SQL from the database and store it in a
binary file.
e. Logical backup is used to restore the database objects into the database. So
the logical backup utilities allow DBA (Database Administrator) to back
up and recover selected objects within the database.

School of Health Information Management


07/12/2021 89
(SHIM) ABUTH Tudun Wada, Zaria.
Causes of Database Failures
A database includes a huge amount of data and transaction. If the
system crashes or failure occurs, then it is very difficult to recover the
database.
There are some common causes of failures such as,
• System Crash
• Transaction Failure

• Network Failure
• Disk Failure
• Media Failure

School of Health Information Management


07/12/2021 90
(SHIM) ABUTH Tudun Wada, Zaria.
1. System Crash
System crash occurs when there is a hardware or software failure or external
factors like a power failure. The data in the secondary memory is not affected
when system crashes because the database has lots of integrity. Checkpoint
prevents the loss of data from secondary memory.
2. Transaction Failure
The transaction failure is affected on only few tables or processes because of
logical errors in the code. This failure occurs when there are system errors like
deadlock or unavailability of system resources to execute the transaction.
3. Network Failure
A network failure occurs when a client – server configuration or distributed
database system are connected by communication networks.

School of Health Information Management


07/12/2021 91
(SHIM) ABUTH Tudun Wada, Zaria.
4. Disk Failure

Disk Failure occurs when there are issues with hard disks like
formation of bad sectors, disk head crash, unavailability of disk etc.
5. Media Failure
Media failure is the most dangerous failure because, it takes more time
to recover than any other kind of failures. A disk controller or disk head
crash is a typical example of media failure. Natural disasters like
floods, earthquakes, power failures, etc. damage the data.
To avoid data loss in the secondary memory, there are three
methods used to back it up:

School of Health Information Management


07/12/2021 92
(SHIM) ABUTH Tudun Wada, Zaria.
1. Remote backup creates a database copy and stores it in the remote network. The
database is updated with the current database and sync with data and other details.
The remote backup is also called as an offline backup because it can be updated
manually. If the current database fails, then the system automatically switches to
the remote database and starts functioning. The user will not know that there was
a failure.
2. The database is copied to secondary memory devices like Flash memory, hard
disk, magnetic tapes, etc. and kept in a secured place. If the system crashes or any
failure occurs, the data would be copied from these tapes to bring the database up.
3. The huge amount of data is an overhead to back up the whole database. To
overcome this problem the log files are backed up at regular intervals. The log file
includes all the information about the transaction being made. These files are
backed up at regular intervals and the database is backed up once in a week.

School of Health Information Management


07/12/2021 93
(SHIM) ABUTH Tudun Wada, Zaria.
Thank You for your
Cooperation

School of Health Information Management


07/12/2021 94
(SHIM) ABUTH Tudun Wada, Zaria.

You might also like