0% found this document useful (0 votes)
3 views17 pages

Introduction to Database Notes

This chapter introduces the concept of database systems, comparing them to traditional file systems and highlighting the advantages of Database Management Systems (DBMS). It outlines the components of a database system, including hardware, software, data, procedures, and users, while also discussing the benefits such as reduced redundancy, improved data integrity, and enhanced security. Additionally, it addresses the disadvantages of database systems, including costs and complexity, emphasizing the importance of efficient data management in organizations.

Uploaded by

fedynagkjnr
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)
3 views17 pages

Introduction to Database Notes

This chapter introduces the concept of database systems, comparing them to traditional file systems and highlighting the advantages of Database Management Systems (DBMS). It outlines the components of a database system, including hardware, software, data, procedures, and users, while also discussing the benefits such as reduced redundancy, improved data integrity, and enhanced security. Additionally, it addresses the disadvantages of database systems, including costs and complexity, emphasizing the importance of efficient data management in organizations.

Uploaded by

fedynagkjnr
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/ 17

CHAPTER ONE

INTRODUCTION TO DATABASE AND ITS ENVIRONMENT

Learning objectives:

By the end of the chapter a student shall be able to:

i. Understand the meaning of database system


ii. Compare the database system and traditional file system
iii. Evaluate the Database Management System
iv. Differentiate types of database systems
v. Understand advantages and disadvantages of database
system
vi. Understand the database system environment

1.1 Definition of terms

Data management: focuses on data collection, storage and retrieval, constitutes a core
activity for any organization. To generate relevant information efficiently you need quick
access to data (raw facts) from which the required information is produced. Efficient data
management requires the use of a computer database. A database is a shared, integrated
computer structure that houses a collection of:
End -user data: raw facts of interest to the user.
Meta data: The Meta data provides a description of the data characteristics and the set
of relationships that link the data found within the database.
The database: resembles a very well-organized electronic filing cabinet in which
powerful software referred to as DBMS helps manage the cabinet’s contents.
DBMS: Database Management system that enables the creation of and management of
the database
1.2 Database vs. file-based system

File based system


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:
1. Data redundancy and inconsistency - Since the files and application programs
are created by different programmers over a long period of type, 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.
2. 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
3. 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.
4. 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.
5. 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.
6. 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.

Database system
Unlike the file system with many separate and unrelated files, the Database consists of
logically related data store in a single data repository. The problems inherent in file
systems make using the database system very desirable and therefore, the database
represents a change in the way the end user data are stored accessed and arranged.

Advantages of the Database Systems


1. Centralized Control - Via the DBA it is possible to enforce centralized management
and control of data. This means that necessary modifications, which do not affect
other application changes, meet the data independence DBMS requirement.

2. Reduction of redundancies - Unnecessary duplication of data is avoided effectively


reducing total amount of data required, consequently the reduction of storage space.
It also eliminates extra processing necessary to trace the required data in a large mass
of data. It also eliminates inconsistencies. Any redundancies that exist in the DBMS
are controlled and the system ensures that his multiple copies are consistent.

3. Shared data - In a DBMS, sharing of data under its control by a number of


application programs and user is possible e.g. backups.
4.
5. Integrity - Centralized control can also ensure that adequate checks are incorporated
to the DBMS provide data integrity. Data integrity means that the data contained in
the database is both accurate and consistent e.g. employee age must be between 28-25
years.

6. Security - Only authorized people must access confidential data. The DBA ensures
that proper access procedures are followed including proper authentication schemes
process that the DBMS and additional checks before permitting access to sensitive
data. Different levels of security can be implemented for various types of data or
operations.

7. Conflict Resolution - The DBA is in a position to resolve conflicting resolve


conflicting requirements of various users and applications. It is by choosing the best
file structure and access method to get optimum performance for the response. This
could be by classifying applications into critical and less critical applications.

8. Data Independence - It involves both logical and physical independence logical data
independence indicates that the conceptual schemes can be changed without affecting
the existing external schemes. Physical data independence indicates that the physical
storage structures/devices used for storing the data would be changed without
necessitating a change in the conceptual view or any of the external use.

Disadvantages of Database Systems

1. Cost - in terms of:

The DBMS - software


Purchasing or developing S/W
H/W
Workspace (disks for storage)
Migration (movement from tradition separate systems to an integrated one)

2. Centralization Problems

You would require adequate backup incase of failure


You would require increased severity of security breaches and disruption of operation of
the organization because of downtimes and failures.

3. Complexity of Backup and recovery


File System Environment
Personnel Sales Accounts
Department Department Department

employees customer sales inventory accounts

Database System Environment


Personnel
Department
DATABASE
Employees
Customers
Sales Department DBMS Sales
Inventory
Accounts

Accounting
Integrated
Department

System

The database eliminates most of the file systems' data inconsistencies, anomalies and
structural dependency problems. The current generation of DBMS software stores not
only the data structures in a central location but also stores the relationships between the
database components. The DBMS also takes care of defining all the required access paths
of the required component.

The term database system refers to an organization 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 d. Procedures
b. Software e. Data
c. People
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 organization modifications - Modification to either the
database schema or description of the physical storage organization 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 organization and 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.

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

INTRODUCTION TO DATABASE MANAGEMENT


SYSTEMS
Introduction to Database management system (DBMS)
Database management system (DBMS) are computer software applications that interact with the user,
other applications, and the database itself to capture and analyze data. A general-purpose DBMS is
designed to allow the definition, creation, querying, update, and administration of databases.

It’s a set of software programs that controls the organization, storage and retrieval of data (fields,
records and files) in a database. It also controls the security and integrity of the database.

The following are main examples of database applications:

• Computerized library systems

• Automated teller machines

• Flight reservation systems

• Computerized parts inventory systems


Advantages of DBMS
The database management system has a number of advantages as compared to traditional
computer file-based processing approach. The DBA must keep in mind these benefits or
capabilities during databases and monitoring the DBMS.
The Main advantages of DBMS are described below.

Controlling Data Redundancy - In non-database systems each application program has its own
private files. In this case, the duplicated copies of the same data is created in many places. In
DBMS, all data of an organization is integrated into a single database file. The data is recorded
in only one place in the database and it is not duplicated.

Sharing of Data - In DBMS, data can be shared by authorized users of the organization. The
database administrator manages the data and gives rights to users to access the data. Many users
can be authorized to access the same piece of information simultaneously. The remote users can
also share same data. Similarly, the data of same database can be shared between different
application programs.

Data Consistency - By controlling the data redundancy, the data consistency is obtained. If a data
item appears only once, any update to its value has to be performed only once and the updated
value is immediately available to all users. If the DBMS has controlled redundancy, the database
system enforces consistency.
Integration of Data - In Database management system, data in database is stored in tables. A
single database contains multiple tables and relationships can be created between tables (or
associated data entities). This makes easy to retrieve and update data.

Integration Constraints - Integrity constraints or consistency rules can be applied to database so


that the correct data can be entered into database. The constraints may be applied to data item
within a single record or they may be applied to relationships between records.

Data Security - Form is very important object of DBMS. You can create forms very easily and
quickly in DBMS. Once a form is created, it can be used many times and it can be modified very
easily. The created forms are also saved along with database and behave like a software
component. A form provides very easy way (user-friendly) to enter data into database, edit data
and display data from database. The non-technical users can also perform various operations on
database through forms without going into technical details of a database.

Report Writers - Most of the DBMSs provide the report writer tools used to create reports. The
users can create very easily and quickly. Once a report is created, it can be used may times and it
can be modified very easily. The created reports are also saved along with database and behave
like a software component.

Control Over Concurrency - In a computer file-based system, if two users are allowed to access
data simultaneously, it is possible that they will interfere with each other. For example, if both
users attempt to perform update operation on the same record, then one may overwrite the values
recorded by the other. Most database management systems have sub-systems to control the
concurrency so that transactions are always recorded with accuracy.

Backup and Recovery Procedures - In a computer file-based system, the user creates the backup
of data regularly to protect the valuable data from damage due to failures to the computer system
or application program. It is very time-consuming method, if amount of data is large. Most of the
DBMSs provide the 'backup and recovery' sub-systems that automatically create the backup of
data and restore data if required.

Data Independence - The separation of data structure of database from the application program
that uses the data is called data independence. In DBMS, you can easily change the structure of
database without modifying the application program.

Meaning of "database system


A database system is a high-level definition of the structure and relationship between stored data, a
database or databases, users and the hardware or operating system used for the storage
Components of DBMS
A database management system (DBMS) consists of several components. Each component plays
very important role in the database management system environment. The major components of
database management system are:

Software
Hardware
Data
Procedures
Database Access Language

Software
The main component of a DBMS is the software. It is the set of programs used to handle the
database and to control and manage the overall computerized database

1. DBMS software itself, is the most important software component in the overall system
2. Operating system including network software being used in network, to share the data of
database among multiple users.
3. Application programs developed in programming languages such as C++, Visual Basic
that are used to to access database in database management system. Each program
contains statements that request the DBMS to perform operation on database. The
operations may include retrieving, updating, deleting data etc . The application program
may be conventional or online workstations or terminals.

Hardware
Hardware consists of a set of physical electronic devices such as computers (together with
associated I/O devices like disk drives), storage devices, I/O channels, electromechanical devices
that make interface between computers and the real-world systems etc., and so on. It is
impossible to implement the DBMS without the hardware devices, in a network, a powerful
computer with high data processing speed and a storage device with large storage capacity is
required as database server.
Data
Data is the most important component of the DBMS. The main purpose of DBMS is to process
the data. In DBMS, databases are defined, constructed and then data is stored, updated and
retrieved to and from the databases. The database contains both the actual (or operational) data
and the metadata (data about data or description about data).
Procedures
Procedures refer to the instructions and rules that help to design the database and to use the
DBMS. The users that operate and manage the DBMS require documented procedures on hot use
or run the database management system. These may include.

1. Procedure to install the new DBMS.


2. To log on to the DBMS.
3. To use the DBMS or application program.
4. To make backup copies of database.
5. To change the structure of database.
6. To generate the reports of data retrieved from database.

Database Access Language


The database access language is used to access the data to and from the database. The users use
the database access language to enter new data, change the existing data in database and to
retrieve required data from databases. The user writes a set of appropriate commands in a
database access language and submits these to the DBMS. The DBMS translates the user
commands and sends it to a specific part of the DBMS called the Database Jet Engine. The
database engine generates a set of results according to the commands submitted by user, converts
these into a user readable form called an Inquiry Report and then displays them on the screen.
The administrators may also use the database access language to create and maintain the
databases.
The most popular database access language is SQL (Structured Query Language). Relational
databases are required to have a database query language.

Users (role of key players in database design and development)


The users are the people who manage the databases and perform different operations on the
databases in the database system. There are three kinds of people who play different roles in
database system

1. Application Programmers
2. Database Administrators
3. End-Users

Application Programmers
The people who write application programs in programming languages (such as Visual Basic,
Java, or C++) to interact with databases are called Application Programmer.
Database Administrators
A person who is responsible for managing the overall database management system is called
database administrator or simply DBA.
A database developer is an IT professional responsible for working on database technologies. Where
database administrators are more focused on routine maintenance and support for an existing database
setup, database developers tend to focus more on improving databases, expanding their range or
functionality, or otherwise developing submissions for a company's IT architecture.
End-Users
The end-users are the people who interact with database management system to perform
different operations on database such as retrieving, updating, inserting, deleting data etc.
Evolution of DBMS
1. The sixties and seventies: centralized
DBMS to the sixties and seventies (IBM IMS, IDS Bull, Univac DMS, etc.) Were totally centralized
systems, as befits those years operating systems, and hardware for which they were made: a large
enterprise-wide computer and a network of dumb terminals and memory.

The first DBMS in the sixties, yet they were called and were aimed at facilitating the use of large
data sets in which the interrelationships are complex. The archetype of implementation was the
Bill of materials or explosion Parts, typical in the automotive, construction of spacecraft and
related fields. These systems worked only in batches (batch).

Appearing keypad terminals, connected to the central computer via a telephone line, they start to
build great applications on-line transaction processing (OLTP). The DBMS software were
closely linked to communications and transaction management.

Although to write application programs using high level languages such as Cobol or PL / I, were
also available instructions and subroutines specialized to treat BD requiring that the programmer
knew many details of physical design, and that made the was very complex programming.

Since the programs were related to the physical level, it should change continuously when
changes were made in the design and organization of the database. The basic concern was
to maximize performance: response time and transactions per second.

2. The Eighties: relational DBMS


Computers minis, first, and then micro computers, computer spread to virtually all businesses
and institutions.

This required the development of applications would be easier. The DBMS of the seventies
were too complex and inflexible, and could only use highly qualified personnel.

The emergence of relational DBMS * marks a significant step to facilitate the programming of
applications with BD and to ensure that programs are independent of the physical aspects of the
database.

* Oracle appears in 1980.

All these factors make greater use of the DBM Standardization, in 1986, the SQL language was a
veritable explosion of relational DBMS.

Personal computers
During the eighties appear and spread very quickly on personal computers. It also appears these
teams single-user software (e.g., dBase and its derivatives, Access), with which it is very easy
to create and use data sets, and that personal data are called bases. Notice that the fact referred
to these early systems DBMS PC is a bit forced, as it does not accept complex structures or
relationships, or could be used in a network that simultaneously serve many different users.
But some, over time, have been turning into real DBMS.

3. The nineties: distribution, C / S and 4GL


At the end of the eighties, and relational DBMS is used in virtually all businesses. Nevertheless,
until the mid-nineties, when needed a high performance have continued to use the DBMS
prerelational.

In the late eighties and early nineties, companies have found that their departments have been
buying departmental and personal computers, and applications have been making BD. The result
has been that within the company there are numerous DBMS BD and several different types or
suppliers. This phenomenon of multiplication of the BD and the DBMS has been increased by
the fever of mergers.

The need to have an overview of the company and of linking different applications using
different BD, together with the ease that give the networks for communication between
computers, has led to the current DBMS, which allow a program to work with different BD as if
it were a single. This is what is known as distributed database.

This ideal distribution is achieved when the various BD are supported by one brand of DBMS, ie
when there is homogeneity. However, this is not so simple if the DBMS are heterogeneous.
Today, thanks largely to the standardization of SQL language, DBMS of different brands can be
serviced at each other and work together to provide service to an application program. However,
in general, in cases of heterogeneity cannot be reached to give the program that uses the
appearance that it is a single BD.

In addition to this distribution "imposed", wanting to separate the integrated treatment of pre-
existing BD, you can also make a distribution "desired" BD designing a physically distributed
and replicated with parts in different systems. The basic reasons for which are interested in this
distribution are:

1) Availability. The availability of a distributed system with a BD can be higher, because if it


goes down one of the systems, others still work. If the data residing in the system is not available
are replicated on another system, continue to be available. Otherwise, only available data from
other systems.

2) Cost. A BD can reduce the cost distributed. In the case of a centralized system, all users’
computers that can be distributed to different and distant geographical areas are connected to the
central system via communication lines. The total cost of communications can be reduced by a
user to close the data used most often, e.g., on a computer in your office or even on your
personal computer.

The technology is commonly used to distribute data is known as environment (or architecture)
Client / Server (C / S). All of the relational DBMS market have been adapted to this
environment.
The idea of C / S is simple. Two different processes running on one system or separate systems,
they act so that one has the role of client or a service requester, and the other server or service
provider.

For example, a program that a user application running on your PC (which is connected to a
network) requests some data from a DB that resides on a UNIX computer which, in turn, runs the
relational DBMS that manages it. The application program is the client and the DBMS is the
server. A client process can request services to multiple servers. A server can receive requests
from many customers. In general, a process that makes customer requesting a service to another
process B can also do a service server which prompted another process C (or B, that this request
would be the client).Even the client and server can reside on one system.

The ease of distribution of data available is not the only reason, not even the basic, the great
success of the environment’s C / S in the nineties. Perhaps the main reason was the flexibility
to build and grow the global computer configuration of the company, as well as making
modifications to it, using very standard hardware and software and cheap.

The success of BD, including personal computers, has led to the emergence of the Fourth
Generation Languages (4GL), very easy and powerful languages, specializing in application
development based on BD.They provide many facilities at the time to define, usually visually,
talks to enter, modify, and query data to the C / S.

Current Trends
Today, relational DBMS are undergoing transformation to accommodate three recent successful
technologies, closely related: multimedia, object-oriented (OO) and Internet and web.

The types of data that can be defined in relational DBMS of the eighties and nineties are very
limited. The incorporation of multimedia technologies, image and sound-in makes it necessary to
accept relational DBMS attributes of these types.

However, some applications do not have enough with the addition of specialized media types.
Need complex types that the developer can define as the application. In short, we need to
abstract data types: TAD. The latest DBMS already incorporated this possibility, and a wide-
open market or TAD predefined class libraries.

This brings us to the object-oriented (OO). The success of the OO at the end of the eighties, the
development of basic software applications in industrial engineering and construction of
graphical interfaces with users, has made during the nineties is widespread in virtually all the
fields of computing.

In the SI is also initiated the adoption, shy of the moment, the OO.The use of languages like C +
+ or Java requires relational DBMS fit them with appropriate interfaces.
The rapid adoption of the SI web makes the DBMS server resources to be incorporated into
websites, such as SQL scripts including HTML, Java embedded SQL, etc.. Notice that in the
world of the web are common OO data and multimedia.

In recent years it has begun rolling out an application type of the BD called Data Warehouse, or
data warehouse, which also produces some changes in the relational DBMS market.

Over the years I have worked with BD in different applications, companies have accumulated
large amounts of data of all kinds. If these data are analyzed appropriately can provide
valuable information *.

Therefore, it is a great BD keeping with information from all kinds of enterprise applications
(and even outside). The data in this big warehouse, Data Warehouse, you get a more or less
elaborate replication of which is in the BD used in the daily work of the company. These data
warehouses are used exclusively to make inquiries, most especially to carry out studies *
financial analysts, market analysts, etc.

Currently, the DBMS is adapted to this type of application, including, for example, tools such as:

a) The creation and maintenance of aftershocks, with some data processing.

b) Consolidation of data from different sources.

c) The creation of physical structures that efficiently support multidimensional analysis.

* For example, market developments in relation to pricing policy.


* These are often multi-dimensional statistics.

Note: BD refer to Big Data


Definition of the database approach
The database approach is a way in which data is stored within a computer. It is organized into
various charts that are accessed by a variety of computer applications from different locations.
Databases are composed of a variety of information that is pertinent and relevant to the
organization that is using the database

Database Approach vs. Traditional File Processing

Self-contained nature of database systems (database contains both data and meta-data).
Data Independence: application programs and queries are independent of how data is
actually stored.
Data sharing.
Controlling redundancies and inconsistencies.
Secure access to database; Restricting unauthorized access.
Enforcing Integrity Constraints.
Backup and Recovery from system crashes.
Support for multiple-users and concurrent access.

You might also like