DB Chapter 1
DB Chapter 1
Halimet A.
e-mail: [email protected]
1
Chapter One: Introduction to Database System
❑ Contents
❖Overview
❖Data Management approach
❖Basics of Database
❖File organization verses Database approach
❖Characteristics of the Database Approach
❖Users and actors of Database system
❖Actors on the Scene
2
1.1 Overview
Data is a collection of a distinct small unit of information.
It can be used in a variety of forms like text, numbers, media,
bytes, etc. It can be stored in pieces of paper or electronic
memory, etc
Data is unprocessed raw facts or figures. Example 10, 20, 30.
Information is a processed data. It is a group of data which
carries news and meaning to the users. Example: Student
information
3
Cont…
Definition of a Database:
❖ Organized collection of data: It's a structured repository
that stores information in a systematic way, enabling efficient
access, retrieval, modification, and management.
4
1.2 Data Management approach
❑ There are three data management approaches. These are:
❖ Manual Approach
❖ Traditional File Based Approach
❖ Database Approach
❑ Manual Approach is the process of data storage and retrieval, in
which data storage and retrieval follows the traditional way of
information handling; where:
▪ Cards and papers are used for the purpose
▪ Data storage and retrieval will be performed using human
effort
▪ Data is written on paper and put in a file cabinet.
▪ Insertion and retrieval is done by searching first for the right
cabinet; then, for the right file; then, the information, and etc. 5
Cont…
Limitations of the Manual approach
❖ Data loss: due to damaged papers or unable to locate it
❖ Redundancy: Multiple copies of the same data within the
organization
❖ Inconsistency: Modifications are not reflected on all multiple
copies
❖ Disposed or prone to error
❖ Difficult to update, retrieve, integrate, …
❖ Cross referencing is difficult
❑ Traditional File Based Approach:- It was an early endeavor to
computerize the manual filing system. It is the decentralized
computerized data handling method.
6
Cont…
A collection of application programs perform services for the
end-users. In such systems, every application program that
provides service to end users define and manage its own data.
File, in traditional file based approach, is a collection of records
which contains logically related data
7
Cont…
Limitations of File Based Approach
❖ Isolation of Data: When data is isolated in separate files:
▪ It is difficult to access data that should be available
9
Cont…
Benefits of the Database Approach
❖ Data can be shared: two or more users can access and
use same data instead of storing data in redundant
manner for each user
❖ Improved accessibility of data: by using structured
query languages, the users can easily access data
without programming experience
❖ Redundancy can be reduced: isolated data is
integrated in database to decrease the redundant data
stored at different applications
❖ Speed: data storage and retrieval is fast as it will be
using the modern fast computer systems. 10
Cont…
❖ Less labour: unlike the other data handling methods, data
maintenance will not demand much resource.
❖ Centralized information control: since relevant data in the
organization will be stored at one repository, it can be
controlled and managed at the central level.
11
Cont…
Limitations and risk of Database Approach
❖ Need of new professional and specialized personnel
❖ Complexity in designing and managing data
❖ The cost and risk during conversion from the old to the new
system
❖ High cost to be incurred to develop and maintain the system
❖ Complex backup and recovery services from the users
perspective
❖ Reduced performance due to centralization and data
independency
❖ High impact on the system when failure occurs to the central
system
12
1.3. Basics of Database
Database is a collection of related data in an organized
manner.
You can organize data into tables, rows, columns, and index it
to make it easier to find relevant information.
A database is designed, built, and populated with data for a
specific purpose.
It has an intended group of users and some preconceived
applications in which these users are interested.
The main purpose of the database is to operate a large amount
of information by storing, retrieving, and managing data.
13
Cont…
Modern databases are managed by the database management
system (DBMS).
Database Management System (DBMS): A software
package/ system to facilitate the creation and maintenance
of a computerized database.
Database System: The DBMS software together with the
data itself. Sometimes, the applications are also included.
It is a computerized record keeping system, which stores
related data in an organized way
The overall purpose of a database system is to store
information and to allow users to: Add, Delete, Retrieve,
Search , Query and updating information upon request
14
Cont…
Simplified database system environment
15
Cont…
Example of a Database (with a Conceptual Data Model)
Mini-world for the example:
✓ Part of a UNIVERSITY environment
Some mini-world entities:
✓ STUDENTs
✓ COURSEs
✓ SECTIONs (of COURSEs)
✓ (academic) DEPARTMENTs
✓ INSTRUCTORs.
16
Cont…
17
1.4 File organization verses Database approach
File System :
✓ The file system is basically a way of arranging the files in a
storage medium like a hard disk.
✓ The file system organizes the files and helps in the retrieval
of files when they are required.
✓ File systems consist of different files which are grouped into
directories. The directories further contain other folders and
files.
✓ The file system performs basic operations like management,
file naming, giving access rules, etc.
✓ Example: NTFS(New Technology File System),
EXT(Extended File System).
18
Cont…
19
Cont…
20
Cont…
21
Cont…
databases applications:
▪ Banking
▪ Airlines
▪ Universities
▪ Sales
▪ Manufacturing
▪ Human resources
22
Cont…
23
1.5 Characteristics of the database approach
A number of characteristics distinguish the database
approach from the approach of programming with files.
In the database approach, a single repository maintains data
that is defined once and then accessed by various users.
The main characteristics of the database approach versus
the file-processing approach are the following:
❖ Self-describing nature of a database system
❖ data abstraction
24
Cont…
❖ Self-describing nature of a database system
✓ DBMS catalog stores the description of a particular database
(e.g. data structures, types, and constraints)
✓ The description is called meta-data.
✓ This allows the DBMS software to work with different
database applications
❖ Insulation between programs and data:
✓ Called program-data independence.
✓ Allows changing data structures and storage organization
without having to change the DBMS access programs.
25
Cont…
❖ Data Abstraction:
✓ A data model is used to hide storage details and present
the users with a conceptual view of the database.
✓ Programs refer to the data model constructs rather than
data storage detail
❖ Support of multiple views of the data:
26
Cont…
❖ Sharing of data and multi-user transaction processing:
✓ Allowing a set of concurrent users to retrieve from and to
update the database.
✓ Concurrency control within the DBMS guarantees that each
transaction is correctly executed or aborted (commit and
rollback)
✓ OLTP (Online Transaction Processing) is a major part of
database applications.
✓ This allows hundreds of concurrent transactions to execute
per second.
27
1.6Users and actors of database system
28
1.7Actors on the Scene
In this section we identify the people whose jobs involve the
day-to-day use of a large database; we call them the actors on
the scene.
There are a number of users who can access or retrieve the
data on demanded using the application and interface provided
by DBMS.
❖ Database Administrators
❖ Database Designers
29
Cont…
❑ Database administrator (DBA): is responsible for authorizing
access to the database, coordinating and monitoring its use,
and acquiring software and hardware resources as needed.
The DBA is accountable for problems such as security
breaches and poor system response time.
❑ Database designers: are responsible for identifying the data
to be stored in the database and for choosing appropriate
structures to represent and store this data.
▪ These tasks are mostly undertaken before the database is
30
Cont…
❑ System analysts determine the requirements of end users,
especially naive and parametric end users, and develop
specifications for standard canned transactions that meet these
requirements.
Application programmers implement these specifications as
programs; then they test, debug, document, and maintain
these canned transactions.
Such analysts and programmers—commonly referred to as
software developers or software engineers—should be
familiar with the full range of capabilities provided by the
DBMS to accomplish their tasks.
31
Cont…
❑ 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.
32
Cont…
▪ Naive or parametric end users make up a sizable portion of
database end users.
Their main job function revolves around constantly querying
and updating the database, using standard types of queries and
updates—called canned transactions—that have been carefully
programmed and tested.
The tasks that such users perform are varied:
▪ Bank tellers check account balances and post withdrawals
▪ Reservation agents for airlines, hotels, and car rental
companies check availability for a given request and make
reservation
33
Cont…
▪ 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.
▪ Standalone users maintain personal databases by using ready-
made program packages that provide easy-to-use menu-based
or graphics-based interfaces. An example is the user of a tax
package that stores a variety of personal financial data for tax
purposes
34
Cont…