0% found this document useful (0 votes)
5 views16 pages

Introduction to Databases

A database is a structured collection of related information that supports various organizational activities, while a Database Management System (DBMS) is software used to manage and manipulate this data. Traditional file systems often lead to issues such as data redundancy, inconsistency, and access difficulties, prompting the need for a DBMS. The document outlines the components of a DBMS, the database system environment, maintenance procedures, and various database models, highlighting the importance of organized data management.

Uploaded by

mwinzidev
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views16 pages

Introduction to Databases

A database is a structured collection of related information that supports various organizational activities, while a Database Management System (DBMS) is software used to manage and manipulate this data. Traditional file systems often lead to issues such as data redundancy, inconsistency, and access difficulties, prompting the need for a DBMS. The document outlines the components of a DBMS, the database system environment, maintenance procedures, and various database models, highlighting the importance of organized data management.

Uploaded by

mwinzidev
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

DATABASES.

What is a Database?
 It is a collection of information related to a particular subject or purpose.
 A collection of related data or information grouped together under one logical
structure.
 A logical collection of related files grouped together by a series of tables as one
entity.
Examples of databases.
You can create a database for;
- Customers’ details. - Library records.
- Personal records. - Flight schedules.
- Employees’ records. - A music collection.
- An Address book (or Telephone directory), where each person has the Name, Address,
City & Telephone no.

DATABASE CONCEPTS.
Definition & Background.
A Database is a common data pool, maintained to support the various activities taking
place within an organization.
The manipulation of database contents to yield information is by the user programs.
The database is an organized set of data items that reduces duplications of the stored files.

INTEGRATED FILE SYSTEMS.


These refer to the traditional methods of storing files, i.e., the use of paper files. E.g.,
Manual & Flat files.
- In Integrated file systems, several inter-independent files are maintained for the
different users’ requirements.
- The Integrated file systems have the problems of data duplication.
- In order to carry out any file processing task(s), all the related files have to be
processed.
- Some information resulting from several files may not be available, giving the overall
state of affairs of the system.

Review Of Traditional Processing And It’s Limitations

 Consider a saving bank enterprise that keeps information about all customers and
savings accounts in permanent system files at the bank.
 The bank will need a number of applications e.g.

i. Program to debit or credit an account


ii. A program to add a new account
iii. A program to find the balance of an account
iv. A program to generate monthly statements
v. Any new program would be added as per the banks requirements

 Such a typical filing /processing system has the limitation of more and more files and
application programs being added to the system at any time.
Such a scheme has a number of major disadvantages:

i. Data redundancy and inconsistency - Since the files and application


programs are created by different programmers over a long period of time, the
files are likely to have different formats and the programs may be written in
several programming languages. Moreover, the same piece of information
may be duplicated in several files. This redundancy leads to higher storage
and access costs. It may also lead to inconsistency i.e. the various copies of
the same data may no longer agree.
ii. Difficulty in accessing - Suppose that one of the bank officers needs to find
out the names of all customers who live within the city's 78-phone code. The
officer would ask the data processing department to generate such a list. Such
a request may not have been anticipated while designing the system originally
and the only options available are:-

 Extract the data manually


 Write the necessary application, therefore do not allow the data
to be accessed conveniently and efficiently

iii. Data isolation - Since data is scattered in various files and files may be in
different formats, it may be difficult to write new applications programs to
retrieve the appropriate data.
iv. Concurrent access anomalies - Interaction of concurrent updates may result
in inconsistent data e.g. if 2 customers withdraw funds say 50/= and 100/=
from an account at about the same time the result of the concurrent execution
may leave the account in an incorrect state.
v. Security problems - Not every user of the database system should be able to
access all the data. Since application programs are added to the system in an
ad-hoc manner, it is difficult to enforce security constraints.
vi. Integrity - The data value stored in the database must satisfy certain types of
consistency constraints e.g. a balance of a bank account may never fall below
a prescribed value e.g. 5,000/=. These constraints are enforced in a system by
adding appropriate code in the various application programs. However, when
new constraints are added there is need to change the other programs to
enforce.

Conclusion.
These difficulties among others have prompted the development of DBMS.

DATA BASE MANAGEMENT SYSTEMS (DBMS).


 These are programs used to store & manage files or records containing related
information.
 A collection of programs required to store & retrieve data from a database.
 A DBMS is a tool that allows one to create, maintain, update and store the data within
a database.
A DBMS is a complex software, which creates, expands & maintains the database, and it
also provides the interface between the user and the data in the database.
A DBMS enables the user to create lists of information in a computer, analyse them, add
new information, delete old information, and so on. It allows users to efficiently store
information in an orderly manner for quick retrieval.
A DBMS can also be used as a programming tool to write custom-made programs.
1.6 Components of Database Management Systems.

A DBMS is software used to build, maintain and control database systems. It allows a
systematic approach to the storage and retrieval of data in a computer.
Most DBMS(s) have several major components, which include the following:

1. Data Definition Language (DDL) - These are commands used for creating and
altering the structure of the database.
The structures comprise of Field Names, Field sizes, Type of data for each field, File
organizational technique. The DDL commands are used to create new objects, alter
the structure of existing ones or completely remove objects from the system.

2. Data Manipulation language (DML) - This is the user language interface and is
used for executing and modifying the contents of the database. These commands
allow access and manipulation of data for output. They include commands for
adding, inserting, deleting, sorting, displaying, painting etc. These are the most
frequently used commands once the database has been created.

3. Data Control Language (DCL) - These are commands used to control access to the
database in response to DML commands. It acts as an interface between the DML
and the OS. It provides security and control to the data.

4. Query Languages - A query language is a formalized method of constructing queries


in database system. It provides the ways in which the user interrogates the database
for data without using conventional programs. For relation database, structures query
languages (SQL) has emerged as the standard language. Almost all the DBMS(s) use
SQL running on machines ranging from microcomputers to large main frames.

5. Form Generator - A form is a screen display version of a paper form, which can be
used for both input and output.

6. Menu Generator - This is used to generate different types of menus to suit user
requirements.

7. Report Generator - This is a tool that gives non- specialized users the capability of
providing reports from one or more files through easily constructed statements. The
reports may be produced either constructed statements. The reports may be produced
either on screen or paper. A report generator has the following features:
 Page headings and footings
 Page Numbering
 Sorting
 Combining data from several files
 Column headings
 Totaling and subtotaling
 Grouping of data
 Reports titling
8. Business Graphics - Some DBMS may provide means of generating graphical output
e.g. bar charts, pie charts scatter graphics line plots etc. others will allow users to
export data into graphics software.

9. Application Generators - This is a type of 4th generation language used to create


complete application programs. The user describes what need to be done, the data
and files that are to be used and the application generator then translates the
description into a program. They are also refereed to as rapid application tools.

10. Data Dictionary (DD) - This provides the following facilities:


 Documentation of data items
 Provision of Standard definition an names for data items.
 Data item description.
 Removal of redundancy in documentation of data item.
 Documentation of relationships between data items;

11. Fort Generation Languages (4GLS'S) - A 4GL'S is a non-procedural language in


which the programs flows and not designed by the programmer but by the 4G
software itself.. The user requests for the result rather than a detailed procedure to
obtain these results.
The Database System Environment

The term database system refers to an Organisation of components that define and
regulate the collection storage, management and use of data within a database
environment.
The database system is composed of 5 major parts i.e.

a. Hardware
b. Software
c. People
d. Procedures
e. Data
Hardware
This identifies all the systems physical devices e.g. the composition peripherals, storage devices
etc.

Software
These are a collection of programs used by the computers within the database system.
i. O.S - manages all hardware components and makes it possible for all other and
software to run on the composition.
ii. The DBMS - manages the database within the database system e.g. Oracle, DB2, Ms
Access etc.
iii. Applications programs and utilities to access and manipulate data in the DBMS.

People
These are all database systems users:-
1. Systems administrator - Oversees the database systems general operations.
2. Database administrator (DBA) - Manages the DBMS use and ensures that the database is
functioning properly. His functions include:

i. Scheme definition - The original database scheme is created by writing a set of


definitions, which are translated by DDL compiler to a set of tables that are
permanently stored in the data dictionary.
ii. Storage structure and Access Methods Definitions - By writing a set of definitions for
appropriate storage structures and access methods, which are translated by the data
storage and definition language compiler.
iii. Scheme and physical organisation modifications - Modification to either the database
schema or description of the physical storage organisation are accompanied by
writing a set of definitions which are used by either the DDL compiler or the data
storage and definition language compiler to generate modification to appropriate
internal systems tables e.g. data dictionary.
iv. Granting authorization to data access - This is so as to regulate which parts of the
database users can access.
v. The database manager keeps integrity Constrains in a special system structure
whenever an update takes place in the system.

3. Database designers - These are the database architects who design the database structure.

4. Systems Analysts & Programmers (application programmers) - They design and


implement the application programs they design & create the data entry scheme, reports &
procedures through which users access and manipulate the databases data.
5. End users - These are the people who use the application programs to run the organizations
daily operations. They fall in the following classes:

i. Sophisticated users - These interact with the system without writing programs. They
form their requests in a database query language.
ii. Specialized database applications that do not fit in the traditional data processing
framework e.g. CAD Systems, knowledge based & expect systems.
iii. Application programmers: These interact with the system through the DML &
applications.
iv. Naive – Unsophisticated user who interact with the systems by invoking one of the
permanent application programs that have been written previously.

Procedures
 These are instructions and rules that govern the design and use of the database system.
 They enforce standards by which business is conducted within the organisation an with
customers.
 They also ensure that there is an organized way to monitor and audit both the data that enter
the database and the information that is generated through the use of such data.

6. Data
This covers the collection for facts stored in the database and since data is the raw material from
which information is generated the determination of what data is to be stored into the database
and how the data is to be organized is a vital part of the database designer jobs.

DATABASE MAINTENANCE.
A Database cannot be created fully at once. Its creation and maintenance is a gradual and
continuous procedure. The creation & the maintenance of databases is under the influence of a
set of user programs known as the Database Management Systems (DBMS).
Through the DBMS, users communicate their requirements to the database using Data
Description Languages (DDL’s) & Data Manipulation Languages (DML’s).
In fact, the DBMS provide an interface between the user’s programs and the contents of the
database.
During the creation & subsequent maintenance of the database, the DDL’s & DML’s are used to:
(i). Add new files to the database.
(ii). Incorporate fields onto the existing records in the database.
(iii). Delete the obsolete (outdated) records.
(iv). Carry out adjustments on (or amend) the existing records.
(v). Expand the database capacity, for it to cater for the growth in the volume for enhanced
application requirements.
(vi). Link up all the data items in the database logically.

Data Dictionary.
All definitions of elements in the system are described in detail in a Data dictionary.
The elements of the system that are defined are: Dataflow, Processes, and Data stores.
If a database administrator wants to know the definition of a data item name or the content of a
particular dataflow, the information should be available in the dictionary.
Notes.
 Databases are used for several purposes, e.g., in Accounting – used for maintenance of the
customer files within the base.
 Database systems are installed & coordinated by a Database Administrator, who has the
overall authority to establish and control data definitions and standards.
 Database storage requires a large Direct Access storage (e.g., the disk) maintained on-line.
 The database contents should be backed up, after every update or maintenance run, to
supplement the database contents in case of loss. The backup media to be used is chosen by
the organization.
Data Bank.
A Data Bank can be defined as a collection of data, usually for several users, and available to
several organizations.
A Data Bank is therefore, a collection of databases.
Notes.
 The Database is organizational, while a Data Bank is multi-organizational in use.
 The Database & the Data Bank have similar construction and purpose. The only difference is
that, the term Data Bank is used to describe a larger capacity base, whose contents are mostly
of historical references (i.e., the Data Bank forms the basis for data or information that is
usually generated periodically). On the other hand, the contents of the Database are used
frequently to generate information that influences the decisions of the concerned organization.
TYPES OF DATABASE MODELS.
(1). Relational database model.
A Relational database is a set of data where all the items are related.
The data elements in a Relational database are stored or organized in tables. A Table consists
of rows & columns. Each column represents a Field, while a row represents a Record. The
records are grouped under fields.
~ A Relational database is flexible and easy to understand.
~ A Relational database system, has the ability to quickly find & bring information stored in
separate tables together using queries, forms, & reports. This means that, a data element in
any one table can be related to any piece of data in another table as long as both tables share
common data elements.
Examples of Relational database systems;
(i). Microsoft Access.
(ii). FileMaker Pro.
(iii). Approach.
(2). Hierarchical database model.
It is a data structure where the data is organized like a family tree or an organization chart.
In a Hierarchical database, the records are stored in multiple levels. Units further down the
system are subordinate to the ones above.
In other words, the database has branches made up of parent and child records. Each parent
record can have multiple child records, but each child can have only one parent.

Components of Data hierarchy.


Databases (logical collection of related files).

Files (collection of related records).


Records (collection of related fields).

Fields (Facts, attributes – a set of related characters).

Characters (Alphabets, numbers & special characters or symbols).


(3). Network database model.
A Network database model represents many-to-many relationships between data. It allows a
data element or record to be related to more than one other data element or record. For
example, an employee can be associated with more than one department.

CLASSIFICATION OF DATABASE SOFTWARE.


Database software is generally classified into 2:
1. PC-based database software (or Personal Information Managers – PIMs).
2. Corporate-based database software.
PC-based database software.
The PC-based database programs are usually designed for individual users or small businesses.
They provide many general features for organizing & analyzing data. For example, they allow
users to create database files, enter data, organize that data in various ways, and also create
reports.
They do not have strict security features, complicated backup & recovery procedures.
Examples of PC-based systems;
* Microsoft Access. * FoxPro.
* Dbase III Plus * Paradox.
Corporate database software.
They are designed for big corporations that handle large amounts of data.
Issues such as security, data integrity (reliability), backup and recovery are taken seriously to
prevent loss of information.
Examples of Corporate-based systems;
* Oracle. * Informix * Ingress.
* Progress. * Sybase. * SQL Server.

Common features of a database packages.


(i). Have facilities for Creating databases.
(ii). Have facilities for Updating records or databases.
Using a DBMS, you can define relationships between records & files maintained in a
database. In this case, a transaction in one file of the database can also cause a series of
updates in parts of other tables. Thus, the data is input only once to the database and is
made available to the many files composing it.
(iii). Have facilities for generating Reports.
(iv). Have a Find or Search facility that enables the user to scan through the records in the
database so as to find information he/she needs.
(v). Allow Sorting that enables the user to organize & arrange the records within the database.
(vi). Contain Query & Filter facilities that specify the information you want the database to
search or sort.
(vii). Have a data Validating facility.
FUNCTIONS OF A DATABASE MANAGEMENT SYSTEM.

A DBMS performs several functions that guarantee the integrity and consistency of the data in
the database. Most of these functions are transparent to end-users and can be achieved only
through the use of a DBMS. They include:

i. Data Dictionary Management - The DBMS enquires that definitions of the data
element and their relationships (metadata) be stored in a data dictionary. The DBMS
uses the DD to look up the required data component, structures and relationships thus
relieving us from having to code such complex relationships in each program. Any
changes made in the database structure are automatically recorded in the DD thereby
freeing us from having to modify all the programs that access the changed structure.
So, the DBMS provides data obstruction and removes structural or data dependency
of the system.

ii. Data Storage Management - Creation of complex structure required for data storage
is done by DBMS thus relieving us from the difficult task of defining and
programming the physical data characteristics. A modern DBMS system provides
storage for data and related data entry forms or screen definitions, report definition,
data validation rules, procedural code structures to handle video and picture formats
etc.

iii. Data Transformation and Presentation - Transformation of entered data to conform


the data structures that are required to store the data is done by the DBMS relieving us
the core issue of making a distinction between the data logical formats and data
physical format. By maintaining data independence the DBMS translates logical
requests it no commands that physically locate and retrieve the requested data. That
is the DBMS transform the physically retrieved data to conform to the users logical
expectations. This is by providing application programs with software independence
and data abstraction.

iv. Security Management - The DBMS creates the systems security that enforces users
security and data privacy within the database. Security rules determine which users
can access database which data item each user can access and which data operations
(read, add, delete, modify) the user may perform. This is important in multi user
database system where many users can access the database simultaneously.

v. Multi User Access Control - The database creates complex structures that allow
multi-user access to the structure. In order to provide data integrity and consistency
the DBMS users sophisticated algorithms to ensure that multiple users can access the
database con-currently and still guarantee integrity of the database.

vi. Back-up and recovery management - To ensure data safety and integrity current
DBMS systems provide special utilities that allow the DBA to perform routing and
special backup and restore procedures. Recovery management deals with recovery of
the database after a failure such as a bad sector in the disk, a power failure etc. Such
capability is critical to the preservation of the database integrity.

vii. Data integrity Management - The DBMS promotes and enforces integrity rules to
eliminate data integrity problems thus minimizing data redundancy and maximizing
data consistency. The relationships stored in the Data Dictionary are used to enforce
data integrity. Data integrity is especially important in transaction oriented database
systems.
viii. Data base Access Language and Application Programming Interfaces - The
DBMS provides data access via a query language. It contains 2 components, DDL
and DML. The DDL defines the structures in which the data are housed and the
DML allows end users to extract the data from the database. It also allows data
access to programmers via procedural languages such as Cobol, C, Pascal, and Visual
Basic etc. It also provides utilities used by the DBA and the Database Designer to
create, implement, monitor and maintain the database.

ix. Database Communication interfaces - Current generation of DBMS's provide special


communication routines designed to allow the database to accept end-use r requests
within a computer network environment. The DBMS may provide communication
functions to access the database through the internet using internet browsers e.g.
Netscape or Explorer as the front-ends
Note. Database Management System (DBMS) is used for database;
√ Creation.
√ Manipulation.
√ Control, and
√ Report generation.

ADVANTAGES OF USING A DBMS.


1. Database systems can be used to store data, retrieve and generate reports.
2. It is easy to maintain the data stored within a database.
3. A DBMS is able to handle large amounts of data.
4. Data is stored in an organized format, i.e. under different fieldnames.
5. With modern equipment, data can easily be recorded.
6. Data is quickly & easily accessed or retrieved, as it is properly organized.
7. It helps in linking many database tables and sourcing of data from these tables.
8. It is quite easy to update the data stored within a database.
A database is a collection of files grouped together by a series of tables as one entity. These
tables serve as an index for defining relationships between records and files maintained in the
database. This makes updating of the data in the related tables very easy.
9. Use of a database tool reduces duplication of the stored files, and the reprocessing of the
same data items. In addition, several independent files are maintained for the different user
requirements.
10. It is used to query & display records satisfying a given condition.
11. It is easy to analyse information stored in a database & to prepare summary reports & charts.
12. It cost saving. This results from the sharing of records, reduced processing times, reduced
use of software and hardware, more efficient use of data processing personnel, and an overall
improvement in the flow of data.
13. Use of Integrated systems is greatly facilitated.
An Integrated system – A total system approach that unifies all the aspects of the
organization. Facilities are shared across the complete organization.
14. A lot of programming time is saved because the DBMS can be used to construct & process
files as well as retrieve data.
15. Information supplied to managers is more valuable, because it is based on a widespread
collection of data (instead of files, which contain only the data needed for one application).
16. The database also maintains an extensive Inventory Control file. This file gives an account
of all the parts & equipment throughout the maintenance system. It also defines the status of
each part and its location.
17. It enables timely & accurate reporting of data to all the maintenance centres. The same data
is available and distributed to everyone.
18. The database maintains files related to any work assigned to outside service centres.
Many parts are repaired by the vendors from whom they are purchased. A database is used to
maintain data on the parts that have been shipped to vendors and those that are outstanding
from the inventory. Data relating to the guarantees and warranties of individual vendors are
also stored in the database.
DISADVANTAGES OF DATABASES.
1. A Database system requires a big size, very high cost & a lot of time to implement.
2. A Database requires the use of a large-scale computer system.
3. The time involved. A project of this type requires a minimum of 1 – 2 years.
4. A large full-time staff is also required to design, program, & support the implementation of a
database.
5. The cost of the database project is a limiting factor for many organizations.
Database-oriented computer systems are not luxuries, and are undertaken when proven
economically reasonable.
Role of Key Players in Database and Development.

Programmers Users DBA

Application Queries Database scheme


programs

Query DDL
DML processor compiler
Pre-processor

Program Database Dictionary


object code manager manager

Access File manager


methods

System
buffers
Database &
System catalog

Database Life Cycle (DBLC)

1. The Database Initial Study

 Examine the current system operation.


 Try to establish how and why the current system fails.
 Define the problems and constraints
 Define the objectives
 Define scope and boundaries

2. Database Design

 This involves the conceptual design, selection of database, management system


software.
 Creation of the logical design
 Creation of the physical design

3. Implementation

 This involves installation of the DBMS


 Creation of the database
 Loading or conversion of data

4. Testing and evaluation


The activities involve:

 Testing the database


 Tune the database
 Evaluate the database application programs
 Provide the required information flow

5. Operation

Once the database has passed the evaluation stage it is considered to be operational, the database,
its management, its users and its application programs constitute a complete I.S. The beginning
of the operational phase starts the process of system evaluation.

6. Maintenance and Evaluation

It involves the following:


 Preventive Maintenance
 Corrective maintenance
 Adaptive maintenance
 Assignment and maintenance of access permission to new and old user
 Generation of database access statistics to improve the efficiency and usefulness of
audits and to monitor system persons.
 Periodic security based on the system generated statistics
 Periodic (monthly, quarterly or yearly) system using summaries for internal billing or
budgeting purposes.

TASK 1
Read and make notes on Historical Evolution of Database.
Exercise (a).
1. (a). What is a database?
(b). What are Database management system software?
2. Name and explain the THREE types of database models. (6 marks).
3. Explain THREE major concerns in a database system. (6 marks).
4. How are database software generally classified? Give examples of range of products in
each type of classification.
5. State 5 features of an electronic database management system.
6. Explain the importance of using a Database management system for storage of files in an
organization.
Exercise (b).
1. Write short notes on:
(i). Database.
(ii). Database maintenance.
(iii). Data bank.
2. State the components of a data hierarchy.
3. (a). List the TWO classes of database software.
(b). Give FOUR widely used Database management systems today.
4. Identify FIVE functions of a Database management system.
5. Describe the advantages and disadvantages of a database.
Exercise (c).
1. Define the following terms:
(i). Database. (4 marks)
(ii). Database Management System (DBMS). (4 marks).
(iii). Relational database.
(iv). Hierarchical database.
(v). Network database.
2. List and briefly describe THREE advantages of using the electronic database approach in
data storage as compared to the file-based approach.
3. List and briefly describe TWO features found in a typical Database Management System.
4. Identify and describe three major shortcomings of the conventional file structures that are
being addressed by the database approach. (6 marks).
5. Describe the functions of the following tools found in a database management system
(DBMS).
(a). Data Definition Language (DDL) (2 marks).
(b). Data Manipulation Languages (DML) (2 marks).
(c). Data Dictionary (DD) (3 marks).

You might also like