Introduction to database systems codersimon 2023©
Data base is a collection of data, it contains information about one particular enterprise, a data base
management system (DBMS) consist of a collection of interrelated data and a set of programs to access that
data.
The primary goal of a DBMS is to provide an environment that is both convenient and efficient to use in
retrieving and storing database information.
PURPOSE OF DATABASE SYSTEM
DBMS provides a secure and survivable medium for storage and retrieval of data. in real world , the data
is shared among several users and is persistent, also in the real world data have structures, related to one
another and have constraints.
Different users of the data need to create, access and manipulate the data, hence DBMS provides a
mechanism to achieve the objective without compromising security and integrity of data
It is mainly intended to solve the following
1.1. Data redundancy and inconsistency
1.1.1. Same information may be duplicated in several places.
1.1.2. All copies may not be updated properly.
1.2. Difficulty in accessing data
1.2.1. May have to write a new application program to satisfy an unusual request.
1.2.2. E.g. find all customers with the same postal code.
1.2.3. Could generate this data manually, but a long job...
1.3. Data isolation
1.3.1. Data in different files.
1.3.2. Data in different formats.
1.3.3. Difficult to write new application programs.
1.4. Multiple users
1.4.1. Want concurrency for faster response time.
1.4.2. Need protection for concurrent updates.
1.4.3. E.g. two customers withdrawing funds from the same account at the same time - account has
$500 in it, and they withdraw $100 and $50. The result could be $350, $400 or $450 if no
protection.
1.5. Security problems
1.5.1. Every user of the system should be able to access only the data they are permitted to see.
1.5.2. E.g. payroll people only handle employee records, and cannot see customer accounts; tellers
only access account data and cannot see payroll data.
1.5.3. Difficult to enforce this with application programs.
1.6. Integrity problems
1.6.1. Data may be required to satisfy constraints.
1.6.2. E.g. no account balance below ksh1000.00.
1.6.3. Again, difficult to enforce or to change constraints with the file-processing approach.
Introduction to database systems codersimon 2023©
, CONVENTIONAL FILE PROCESSING SYSTEM
In the conversional file processing system, each and every subsystem of the information system will have its
own set of files, as a result there will be duplication of data between various subs systems of the information
but in database system there is a single centralized database which minimize the redundancy data to a greater
extent.
1) Data redundancy and inconsistency
Since the files are written by different applications programmers over a long period of time the files have
different formats and programs may be written in different languages
The same piece of information may be duplicated in several files e.g. the address and phone number of the
customer
This redundancy leads to higher storage and access cost also it may lead to data inconsistency that is same copy
of information may no longer agree
2) Difficulty in accessing data
Conventional file processing environment do not allow needed data to be retrieved and efficient manner, since
there are more than copy of the same data hence accessing the needed data needs extra resources.
Data isolation
Since data is scattered in various files and files may be in different formats, it is difficult to write new
application programs to retrieve appropriate data
3) Security problems
Not every user of the database system should be able to access all the data e.g. the banking system , pay roll
system can be only be accessed by authorized users only since the files are created by different programmers
having different themes maintaining these objective comes to be difficult.
4) Integrity problems
The data values stored in the database must satisfy certain types of consistency constraints eg in the banking
system when the balance falls at a certain level there should be a warning the balance is below the required
value
ADVANTAGES OF DATABASE SYSTEM
Data base is a way of consolidate and control of the operational data centrally
1) Redundancy can be reduced
By having a centralized database the amount of redundancy of stored data can be reduced since each record is
stored using a certain criteria
2) Inconsistency can be avoided
When the same data is duplicated and changes are made at one side, which is not propagated to the other site, it
gives consistency, the two entries no longer agree on a single piece of information
3) Data can be shared
The data from one application can be used for another application, thus the data of the database stored for on
application can be shared with new applications
4) Standards can be enforced
With the central control of the database, the DBA can ensure that all applicable standards are observed in the
representation of data
5) Security can be enforced
DBA defines the access paths for accessing the data stored in the database and he can define authorization
checks whenever access to sensitive data is attempted.
6) Integrity can be maintained
Integrity means that data in the database is accurate, centralized control of the data helps in permitting the
administrator to define integrity constraints to the data in the database
,Applications of Database systems
1. Banking: For Customer Information, accounts loans, and banking transactions.
2. Airlines: For reservations and Schedule information.
3. Universities: For Student Information, Course registration and grades.
4. Credit card transaction: For Purchases on credit cards and generation of monthly statements
5. Telecommunication: For keeping records of call made generating monthly bills, maintaining balances
on prepaid calling cards, and storing information about the communication networks.
6. Finance: For Storing information about holdings, sales and purchases of financial instruments such as
stocks and bonds, also for storing real time market data to enable online trading by customers and
automated trading by the firm.
7. Sales: For customers, Product and purchase information.
8. Online Retailers: For sales data noted above plus online order tracking, generation of recommendation
lists, and maintenance of online product evaluation.
DATA ABSTRATION
The major aim of a database systems is to provide users with an abstract view of the data.
The system hides certain details of how data is stored and created and maintained and the Complexity should be
hidden from database users
There are three levels of data abstraction:
1. Physical level
It is the lowest level of abstraction that describes how the data are actually stored, the physical level describes
complex low level data structures in detail
2. Logical level
Is the next higher level of abstraction that describes what data are stored in the database and what relationship
exists among those data?
3. View level
It is the highest level of abstraction that describes only part of the entire database.
VIEW LEVEL
V1 V2 VN
Logical level
Physical
level
DATA USERS AND ADMINISTRATORS
People who work with a database can be categorized as:
1) Data base users
2) Data base administrators
, DATABASE USERS
There are four types of users who interact differently to the database these include:
a) Naïve users: they interact with the system by invoking one of the application programs that have been
written previously (e.g. automated teller machine).
b) application programmers : they are computer professionals who write application programs , they use
variety of tools to develop user interfaces
i. The host language compiler then generates the object code.
ii. Some special types of programming languages combine Pascal-like control structures
with control structures for the manipulation of a database.
iii. These are sometimes called fourth-generation languages.
iv. They often include features to help generate forms and display data.
c) Sophisticated users: they interact with the system without writing programs ,instead they form the
request in a database query language, they submit each query to a query processor ,whose function is to
break down DML statement into instructions that the storage manager understands
d) Specialized users are sophisticated users writing special database application programs. These may be
CADD systems, knowledge-based and expert systems, complex data systems (audio/video), etc.
DATA BASE ADMINISTRATOR
The database administrator is a person having central control over data and programs accessing that
data. Duties of the database administrator include:
Scheme definition: the creation of the original database scheme. This involves writing a set of
definitions in a DDL (data storage and definition language), compiled by the DDL compiler into
a set of tables stored in the data dictionary.
Storage structure and access method definition: writing a set of definitions translated by the
data storage and definition language compiler
Scheme and physical organization modification: writing a set of definitions used by the DDL
compiler to generate modifications to appropriate internal system tables (e.g. data dictionary).
This is done rarely, but sometimes the database scheme or physical organization must be
modified.
Granting of authorization for data access: granting different types of authorization for data
access to various users
Integrity constraint specification: generating integrity constraints. These are consulted by the
database manager module whenever updates occur.
Routine Maintenance: EXAMPLES of database administrator’s routine maintenance activities are:
A) periodic back up
B) ensuring that enough free disk space in available for normal operations and upgrading disk space
required
Database Manager
The database manager is a program module which provides the interface between the low-level data
stored in the database and the application programs and queries submitted to the system.
Databases typically require lots of storage space (gigabytes). This must be stored on disks. Data is moved
between disk and main memory (MM) as needed.
The goal of the database system is to simplify and facilitate access to data. Performance is important.
Views provide simplification.