Sie sind auf Seite 1von 39

Overview of Database

Objectives:
After studying this chapter, you should be able to:

 Define each of the key terms:


data, database, DBMS, data independence

 Explain limitations of conventional file processing systems

 Explain advantages of database approach, compared to file


processing system

 Explain different database users


Introduction
• Databases and database technology have a major impact on
the growing use of computers

 Database play a critical role in almost all areas including


business, electronic commerce, engineering, medicine,
genetics, law, education and library science

 Database and Database systems are an essential in everyday


activities that involve some interaction with a database
If we interact with bank, hotel, airline, a computerized
library, online purchase etc
Introduction
 Banking: transactions using mobile app or web based
application or very common use of ATM or CDM.
 Airlines: reservations, schedules, departure and arrival
information
 Universities: admission, registration, attendance, grades
 Sales: customers, products, purchases
 Online retailers: customer, products, customized search,
order tracking
 Manufacturing: production, inventory, orders, supply
chain
 Human resources: employee records, salaries, tax
deductions, overtimes
File-based System
 One way to keep information on a computer is to store
it in permanent files. Business world has been using
the files since early of the 1960 after the development
of COBOL (Common Business Oriented Language).
Still COBOL based applications are being used in
different parts of world. These application programs
have been written together with files at the request
of the users in an organization.
Drawbacks of File based System
 The code written together with file is one of the
problems in file-based system as it is not possible to
make any change in files later. If any addition or
modification like change in the date format or addition
of new data is required in the file structure, the
recreation of the program is the only solution.
A file based system for a College
Drawbacks of File based System
 Data Redundancy
 Duplication of data is called redundancy. Consider a
traditional college system that uses the file-based
system to manage the institution’s data as shown in
Figure 1.1. As we can see, there are different sections
such as Student Affairs, HR and Academic
departments in a college. Each has its own
applications that mange different data files. These files
are duplicated across various applications.
Data Integrity

 It refers to the maintenance and assurance that the


data in a file are correct and consistent. Data values
must satisfy certain consistency constraints that are
specified in the application programs. It is difficult to
make changes to the application programs in order to
enforce new constraints.
Concurrent Access
 Concurrent Access allows multiple users to access the
same record. A file-based system must manage, or
prevent, concurrency by the application programs.
Typically, in a file-based system, when an application
opens a file, that file is locked. This means that no one
else has access to the file at the same time.
Concurrent Access
What database is ?
Basic Definitions
 Data vs. Information
Data
is raw, unorganized facts that need to
be processed

Information
when data is processed, organized,
structured or presented in a given context so as
to make it useful
Example of Data
Example of Information
Basic Definitions of database
• A collection of information in a structured way
Or
• A collection of data, used to represent
information interest to an organization
Or
 A collection of information organized in such a
way that a computer program can quickly
select desired pieces of data
Database Approach
• The database approach emphasizes the integration
and sharing of data throughout the organization

• Database can be viewed as a source of data that is


defined once and then is accessed by various users

• Application program accesses the data stored in the


database by sending requests to the DBMS
Database Approach
Database Approach
Database Management System
 A database management system (DBMS) is a
collection of programs that enables users to create and
maintain databases and control all access to them. The
primary goal of a DBMS is to provide an environment
that is both convenient and efficient for users to
retrieve and store information.
 Users will use the SQL language to communicate with
DBMS and SQL is part of our course which will be
explained in later chapters.
Database Management System (DBMS)
A DBMS is a software to design,
manipulate, retrieve and manage data in
a database.

DBMS
Database Management System
Database Management System
Characteristics and Benefits of a
Database
 Data sharing
 Control of data redundancy
 Sharing of data and multiuser system
 Enforcement of integrity constraints
 Self-describing nature of a database system
 Insulation between program and data
 Support for multiple views of data
 Restriction of unauthorized access
 Transaction processing
 Backup and recovery facilities
Data sharing
 The integration of all the data, for an organization,
within a database system has many advantages. First, it
allows for data sharing among users and others who
have access to the system. Second, it gives users the
ability to generate more information from a given
amount of data that would not be possible without the
integration.
 Example: In a college system, all the users of
application will access the data from same place. Such
as in figure 1.2, student data can be shared by student
affair and academic departments through DBMS.
Control of data redundancy
 In the database approach, ideally, each data item is
stored in only one place in the database. In some cases,
data redundancy still exists to improve system
performance, but such redundancy is controlled by
application programming and kept to minimum by
introducing as little redundancy as possible when
designing the database
 Example: As given in figure 1.2, only one copy of
lecturer data is stored in the database; so there is no
chance for redundancy
Sharing of data and multiuser
system
 Current database systems are designed for multiple
users. That is, they allow many users to access the
same database at the same time. This access is
achieved through features called concurrency
control strategies. These strategies ensure that the
data accessed are always correct and that data integrity
is maintained.
Sharing of data and multiuser
system
 Example: Multiusers can share the data. Imagine that
32 students want to register in a section having 30
seats. Here the first 30 students who got the access to
the database will be able to register in the course. It
will be managed through concurrency control which
will not allow all the 32 students to register. But if it
happens that all 32 got registered in the 30 seats
section then it could lead the database to an
inconsistent state; but it never happens due to strong
strategies of concurrency control.
Enforcement of integrity
constraints
 Database management systems must provide the
ability to define and enforce certain constraints to
ensure that users enter valid information and maintain
data integrity. A database constraint is a restriction or
rule that dictates what can be entered or edited in a
table.
 Example: A constraint which states that a Student Id
must be unique and not null. It means that every
student in the student table must have an ID and it
must not be duplicated. Such a constraint is called
Primary key.
Self-describing nature of a
database system
 A database system is referred to as self-describing
because it not only contains the database itself, but
also metadata (data dictionary) which defines and
describes the data and relationships between tables in
the database. This information is used by the DBMS
software or database users if needed. This separation
of data and information about the data makes a
database system totally different from the traditional
file-based system in which the data definition is part
of the application programs.
Insulation between program and
data
 In the file-based system, the structure of the data files
is defined in the application programs so if a user
wants to change the structure of a file, all the programs
that access that file might need to be changed as well.
 On the other hand, in the database approach, the data
structure is stored in the system catalogue and not in
the programs. Therefore, one change is all that is
needed to change the structure of a file. This
insulation between the programs and data is also
called program-data independence.
Insulation between program and
data
 Example: If the college management wants to add the
passport number column in a student table, it can be
easily added by changing the structure of the student
table.
Support for multiple views of data
 A database supports multiple views of data. A view is a
subset of the database, which is defined and dedicated
for particular users of the system. Multiple users in the
system might have different views of the system. Each
view might contain only the data of interest to a user
or group of users.
 Example: We can get different views from the same
data. For example, a student can view only the grade of
a course from the result table whereas a lecturer can
see the internal marks, total marks and the grade from
the result table.
Restriction of unauthorized access
 Not all users of a database system will have the same
accessing privileges. Authentication (checking of
validity of a user) and authorization (checking of his
privileges what he can use) are very important part of
security.
 Example: It is required that both lecturer and student
have to login first before doing any operation in the
database. Further, only a lecturer can enter the marks
of students and students can only read it.
Transaction processing
 A database management system must include concurrency
control subsystems. This feature ensures that data remains
consistent and valid during transaction processing even if
several users update the same information.
 Example: When a student registers in a course, he has a
transaction with the database. This is guaranteed by the
DBMS that once confirmation of registration is sent to the
student, then that course is assigned to the student. This
information will not be lost by its own which is one of the
important properties of a transaction.
Backup and recovery facilities
 Backup and recovery are methods that allow you to
protect your data from loss. The database system
provides a separate process, from that of a network
backup, for backing up and recovering data. If a hard
drive fails and the database stored on the hard drive is
not accessible, the only way to recover the database is
from a backup.
 If a computer system fails in the middle of a complex
update process, the recovery subsystem is responsible
for making sure that the database is restored to its
original state.
Backup and recovery facilities
 Example: If a student has registered in 5 courses and
if the database crashes by any reason, then the all the
data can be recovered from the backup. The student
need not worry about his/her registered sections.
Database Users
 End users :People whose jobs require access to
database for querying, updating and generating report.
 Database designer: People responsible for
identifying the data to be stored and to choose
appropriate structures to store this data.
 Application Programmer :People implement
specific application program to access to the stored
data.
 Database Administrators : A person or a group of
people in the organization who is responsible for
authorizing the access to the database, monitoring its
use and managing all the resource .
References
 1. Kim Anh, Nguyen. "Database Systems
Concepts." Connexions. July 8, 2009.
http://cnx.org/content/m28156/1.1/.
 2. “Fundamentals of Database Systems, 6th
Edition” by Ramesz Elmasri, Shamkant
Navathe, Addison-Wesley Publsihers.
 3. “Database System Concepts, 6th Edition “
by Abraham Silberschatz, Henry Korth, S.
Sudarshan, McGraw-Hill Education.
Thank you

Das könnte Ihnen auch gefallen