You are on page 1of 59

AMBO UNIVERSITY

WOLISO CAMPUS
COLLEGE OF TECHNOLOGY AND
INFORMATICS

DEPARTMENT OF IS
COURSE INFORMATION
Chapter 1: Fundamentals Database System

BSc(IS) second Year, First Semester, 2019

(slides are adapted from Fundamentals of Database


System)
ISAYAS W.
Fundamentals Database System (FDS)
Database is collection of data which is related by some
aspect.

Data is collection of facts and figures which can be processed


to produce information.

Name of a student, age, class and her subjects can be counted


as data for recording purposes.
Database
 Generally,

 A database is a well-organized collection of data that are related


in a meaningful way, which can be accessed in different logical
orders.

 Database is a collection of TABLES.

 The main purpose of database is to operate large amount of


information by storing, retrieving and managing.
Cont…

• Database is a collection of information or data organized and presented

to serve specific purpose.

• E.g. telephone book

Mostly data represents recordable facts.

Data aids in producing information which is based on facts.

For example, if we have data about marks obtained by all students, we

can then conclude about toppers and average marks etc.


Therefore, the database course is about:

How to organize data


Supporting multiple users

Efficient and effective data retrieval


Secured and reliable storage of data
Maintaining consistent data
Making information useful for decision making
Advantages of Using the Database Approach
Controlling redundancy in data storage and in development
and maintenance efforts.
Sharing of data among multiple users.
Restricting unauthorized access to data. Only the DBA staff
uses privileged commands and facilities.
Providing persistent storage for program Objects
E.g., Object-oriented DBMSs make program objects
persistent–
Providing storage structures (e.g. indexes) for efficient query
processing –
Advantages of Using the Database Approach
Providing optimization of queries for efficient processing
Providing backup and recovery services
Providing multiple interfaces to different classes of users

Representing complex relationships among data


Enforcing integrity constraints on the database
Drawing inferences and actions from the stored data using
deductive and active rules and triggers
Data Handling approaches
• The three major data handling method or approaches
are:
Manual Data Handling Approach
Traditional Data Handling File Based Approach

Database Data Handling Approach


Manual Data Handling Approach

• In the manual approach, data storage and retrieval follow the


primitive and traditional way of information handling where
cards and paper are used for the purpose.

 Files for many event and objects of the organization are used
to store information.
 Each of the files containing various kinds of information is
labeled and stored in one or more cabinets.
Limitations of the Manual Data Handling approach

 Prone to error
 Difficult to update, retrieve, integrate
 You have the data but it is difficult to compile the information

 Limited to small size information


 Cross referencing is difficult
Traditional File Based Data Handling Approach

• File based systems were an early attempt to computerize the


manual filing system.
• This approach is the decentralized computerized data
handling method.
• A collection of application programs performs services for the
end-users.
• In such systems, every application program that provides
service to end users define and manage its own data.
Limitations of the Traditional File Based approach

 Limited data sharing

 Lengthy development and maintenance time


 Duplication or redundancy of data
 Data dependency on the application

 Incompatible file formats between different applications and


programs creating inconsistency.
 Fixed query processing which is defined during application
development.
Database Data Handling Approach

• Database is just a computerized record keeping system or a


kind of electronic filing cabinet.
• Database is a repository for collection of computerized data
files.
• Database is a shared collection of logically related data
designed to meet the information needs of an organization.

• Since it is a shared corporate resource, the database is


integrated with minimum amount of or no duplication.
Cont…

• Database is a collection of logically related data where these


logically related data comprise entities, attributes,
relationships, and business rules of an organization's
information.

• In addition to containing data required by an organization,


database also contains a description of the data which called as
“Metadata” or “Data Dictionary” or “Systems Catalogue” or
“Data about Data”.
Database management system(DBMS)
Database Management System is a collection of computer
programs that allow storage, modification, and extraction of
information from a database.

There are many different types of DBMSs, ranging from small


systems that run on personal computers to huge systems that
run on mainframes.
Cont…

 The following are examples of database applications:


computerized library systems, automated teller machines, flight
reservation systems, computerized parts inventory systems .

 The examples of DBMS are MS-ACCESS, ORACLE, SQL


SERVER etc.

 A database management system stores data, in such a way


which is easier to retrieve, manipulate and helps to produce
information.
Cont..

• A general purpose software system that facilitate the process


of
» Defining (data types, structure and constraints )
» Constructing (storing on storage medium)
» Manipulating (retrieve, update,)
Example
 University database: has students, courses, grades in
university students

 Students store information about students


 Courses store information about course
Why use DBMS?

• You may think how a DBMS would help in the management


of a Database? The reasons for that are, a DBMS is capable of

1. Providing data independence and efficient access of


data.
2. Reducing the application development time.
3. Providing Data integrity (reliability) and security.
4. Uniform data administration
DBMS Functionalities
• DBMS may additionally provide:

Protection or Security measures to prevent unauthorized


access
“Active” processing to take internal actions on data
Presentation and visualization (picturing) of data
Maintenance of the database and associated programs
over the lifetime of the database application
Characteristics of DBMS

 Traditionally data was organized in file formats.

 DBMS was all new concepts then and all the research was
done to make it to overcome all the deficiencies in traditional
style of data management.
Modern DBMS has the following characteristics:

• Real-world entity: Modern DBMS are more realistic and


uses real world entities to design its architecture. It uses the
behavior and attributes too. For example, a school database
may use STUDENT as ENTITY and their AGE as their
ATTRIBUTE.

• Relation-based tables: DBMS allows entities and relations


among them to form as tables. This eases the concept of data
saving. A user can understand the architecture of database just
by looking at table names etc.
Cont..

 Less redundancy: DBMS follows rules of normalization,


which splits a relation when any of its attributes is having
redundancy in values.

 Following normalization, which itself is a mathematically


rich and scientific process, make the entire database to contain
as less redundancy as possible
 Normalizationdecomposing tables to eliminate data
redundancy
Cont…
 Consistency: DBMS always enjoy the state on consistency
where the previous form of data storing applications like file
processing does not guarantee this.

 Consistency is a state where every relation in database


remains consistent.

 Consistency A harmonious uniformity or agreement among


things or parts
Cont..

• Query Language: DBMS is equipped with query language,


which makes it more efficient to retrieve and manipulate data.

• A user can apply as many and different filtering options, as he


or she wants.

• Traditionally it was not possible where file-processing system


was used
ACID Properties

• ACID Properties: DBMS follows the concepts for ACID


properties, which stands for
– Atomicity,
– Consistency,

– Isolation and
– Durability

All of them maintain database in healthy state in multi-


transactional environment and in case of failure.
Cont…
• A transaction is an atomic unit of work that is either
completed in its entirety or not done at all.

• For recovery purposes, the system needs to keep track of when


the transaction starts, terminates, and commits or aborts
Cont…

1. Atomicity: A transaction is an atomic (Unable to be

split or made any smaller) unit of processing; it is

either performed in its entirety or not performed at all.

2. Consistency preservation: A transaction is

consistency preserving if its complete execution take(s)

the database from one consistent state to another.


Cont..

3. Isolation: A transaction should appear as though it is being

executed in isolation from other transactions. That is, the execution

of a transaction should not be interfered (restricted) with by any

other transactions executing concurrently.

4. Durability or permanency: The changes applied to the database

by a committed transaction must persist in the database. These

changes must not be lost because of any failure.


Users of DBMS

 DBMS is used by various users for various purposes.

 Some may involve in retrieving data and some may involve


in backing it up.
 Some of them are described as follows:
Data base administrator
 A bunch of users maintain the DBMS and are responsible for
administrating the database.
 They are responsible to look after its usage and by whom it
should be used.
 They create users access and apply limitation to maintain
isolation and force security.
 Administrators also look after DBMS resources like system
license, software application and tools required and other
hardware related maintenance
Database Administrators Tasks or Responsibilities:

Responsible to oversee, control and manage the database resources


(the database itself, the DBMS and other related software)
Authorizing access to the database (Database Security and
Authorization)
Coordinating and monitoring the use of the database
Responsible for determining and acquiring hardware and software
resources
Accountable for problems like poor security, poor performance of
the system
Involves in all steps of database development
Database Design
Ensuring Availability
Ensuring Data Integrity
Backup and Recovery
Performance Monitoring and Change
Database Designer
 This is the group of people who actually works on designing
part of database.

 The actual database is started with requirement analysis


followed by a good designing process.

 The people keep a close watch on what data should be kept


and in what format.
 They identify and design the whole set of entities, relations,
constraints and views.
In general, the database designer is responsible for:

Identifying the data to be stored in the database.

Choosing appropriate structure to represent and store the

data.

Should understand the user requirement and should choose

how the user views the database.

Involve on the design phase before the implementation of the

database system.
End Users:

• This group contains the persons who actually take


advantage of database system.

• End users can be just viewers who pay attention to the logs or
market rates or end users can be as sophisticated as business
analysts who takes the most of it.
• End users are the people whose jobs require access to the
database for querying, updating, and generating reports; the
database primarily exists for their use
There are several categories of end users:
 Casual end users These users have great knowledge of query
language. Casual users access data by entering different queries
from the terminal end
 Naive or parametric end users Any user who does not have any
knowledge about database can be in this category (mobile app).

 Sophisticated end users include engineers, scientists, business

analysts, and others who thoroughly familiarize themselves


with the facilities of the DBMS in order to implement their
own applications to meet their complex requirements
Files vs. DBMS
Application must stage large datasets between main memory
and secondary storage (e.g., buffering (protecting), page-
oriented access, 32-bit addressing, etc.).

There is a need to protect data from inconsistency


(changeability) due to multiple concurrent users.

Crash recovery, security and access control should be taken


into account.
File system versus DBMS
DBMS FILE SYSTEM
Collection of data, the user is Collection of data, the user has
not required to write the to write the procedures for
procedures managing the database
It protects the user from the If the system crashes while
system failure entering some data, then the
content of the file lost
Have sophisticated techniques Cant efficiently store and
to store and retrieve the data retrieve the data
Cont..
• Database management systems were developed to handle the
following difficulties of typical file-processing systems
supported by conventional operating systems.

Data redundancy and inconsistency


Difficulty in accessing data
Data isolation - multiple files and formats
Integrity problems
Concurrent access by multiple users
Security problems
TYPES OF DATABASE MANAGEMENT SYSTEMS

A DBMS can take any one of the several approaches to


manage data. Each approach constitutes a database model.

A data model is a collection of descriptions of data structures


and their contained fields, together with the operations or
functions that manipulate them.
Cont..

A data model is a comprehensive scheme for describing how


data is to be represented for manipulation by humans or
computer programs.

A full representation details the types of data, the topological


arrangements of data, spatial and temporal maps onto which
data can be projected, and the operations and structures that
can be invoked to handle data and its maps.
Types

• The DMBS can be classified according to the number of users,


the database site locations.
On the basis of the number of users:

 Single-user DBMS
 Multi-user DBMS
On the basis of the site location:
 Centralized DBMS
 Distributed DBMS

 Parallel DBMS

 Client/Server DBMS
Centralized db

 The centralized database system consists of a single processor


together with its associated data storage devices and other
peripherals.
 It is physically confined to a single location.
 The management of the system and its data are controlled
centrally form anyone or central site.
 A DBMS is centralized if the data is stored at a single computer
site.
 A centralized DBMS can support multiple users, but the DBMS and
the database themselves reside totally at a single computer site.
Example
Distributed Database System
• A distributed database is a collection of multiple logically
interrelated databases distributed over a Computer
Network.

• In distributed database system, data is distributed across a


variety of different databases.
• These are managed by a variety of different DBMS software’s
running on a variety of different computing machines
supported by a variety of different operating systems
Example
Parallel Database System

• Parallel database systems architecture consists of a multiple


CPUs and data storage disks in parallel.

• Hence, they improve processing and input/output speeds.

• Parallel database systems are used in the applications that


have to query extremely large databases or that have to
process an extremely large number of transactions per second
Client/server

 Client/Server architecture of database system has two logical


components namely client and server.
 Clients are generally personal computer or workstations whereas
server is large workstations.
 The applications and tools of DBMS run on one or more client
platforms, while the DBMS software reside on the server.
 The server computer is called backend and the client's computer
is called frontend.
 These server and client computers are connected via a computer
network.
Example
DBMS Architecture
• The design of a Database Management System highly depends
on its architecture.

• DBMS architecture can be seen as single tier or multi tier.

• n-tier architecture divides the whole system into related but


independent n modules, which can be independently modified,
altered, changed or replaced.
Cont..

• In 1-tier architecture, DBMS is the only entity where user


directly sits on DBMS and uses it.

• Any changes done here will directly be done on DBMS itself.

• It does not provide handy tools for end users and preferably
database designer and programmers use single tier
architecture.
Cont..
If the architecture of DBMS is 2-tier then must have some
application, which uses the DBMS.

Programmers use 2-tier architecture where they access DBMS


by means of application.

Here application tier is entirely independent of database in


term of operation, design and programming.
3-tier architecture

Most widely used architecture is 3-tier architecture.

3-tier architecture separates its tier from each other on basis of


users.
It is described as follows:

USER

Mediator
Database (Data) Tier
Database (Data) Tier: At this tier, only database resides.
Database along with its query processing languages sits in
layer-3 of 3-tier architecture.

It also contains all relations and their constraints.


Application (Middle) Tier
Application (Middle) Tier: At this tier the application server
and program, which access database, resides.
For a user this application tier works as abstracted view of
database.

Users are unaware of any existence of database beyond


application. For database-tier, application tier is the user of
it. Database tier is not aware of any other user beyond
application tier. This tier works as mediator between the two.
User (Presentation) Tier
User (Presentation) Tier: An end user sits on this tier. From a
users aspect this tier is everything.

He/she doesn't know about any existence or form of database


beyond this layer.
At this layer multiple views of database can be provided by
the application.
All views are generated by applications, which resides in
application tier.

You might also like