Вы находитесь на странице: 1из 31

Database

A database is a collection of related data stored in an efficient and


compact manner. The Word efficient means that stored data can
be accessed very easily and quickly. Similarly, the word Compact
means that stored data takes up as little space as possible.

Examples of database
1- Database of employees that contains data of employees of an
organization or department

2- Database of student that contain data of students of a


college/university etc.

DBMS
DBMS

stands for Database Management System. A


collection of program that are use to create, maintain, and
access databases is called database management system
(DBMS). DBMS is a general-purpose software. This software
is often called database software.

Database Administrator
A person who is responsible for managing the overall database
management system is called database administrator or
simply DBA. A database administrator perform the following
major responsibilities.
1- Installing and managing DBMS.
2- Creating database and related objects like tables and indexes.
3- Authorizing access to the database.
4- Coordinating and monitoring DBMS.
5- Acquiring software and hardware resources as needed.
6- Security and integrity control.
7- Maintenance of the operational system.
8- Create backup of data regularly.

Advantages of Database
The advantages of database are as follow:
1: Controlling Data Redundancy
2: Data Consistency
3: Data Sharing
4: Data Security
5: Data Atomicity
6: Backup and Recovery

1- Controlling Data Redundancy:


The duplicate copies of same data are created in
many places. Storage of same data at more than
one place is called data redundancy. Database
reduces data redundancy. The data in database
appear only once and is not duplicated..By
controlling the data redundancy, You can save
storage space.

2- Data Consistency:
Data inconsistency means that different file may
contain different data about a particular person
or object Actually Redundancy lead to data
inconsistency. But In database, by controlling
data redundancy the data consistency is

3- Data Sharing:
A database allows sharing of data by any number
of users. Sharing means that several users can
access the same data store in database
simultaneously. The remote users can also share
same data.

4- Data Security:
Data security is the protection of the database from
unauthorized users. Only the authorized persons
are allowed to access the database. Some of the
users may be allowed to access only a part of
database.

5- Data Atomicity:
An operation on data may consist of different steps.
A collection of all steps required to complete an
operation on data is called transaction. Atomicity
means that either one transaction should take
place as a whole or it should not take place at all.

6- Backup and recovery:


Most of database systems provide the backup and
recovery
Subsystem that automatically create the backup of
data and restore data if required.

Disadvantages of
Database
The Disadvantages of database are as
follow:
1- Cost of hardware & software
2- Cost of data conversion
3- Cost of staff training
4- Database damage

1- Cost of Hardware & Software:


A computer with high data processing speed and
large memory is required for a database system.
Similarly, database software is also very costly.

2- Cost of data conversion:


In database system, the data stored in data files
must be converted to database files. Because of
different formats of data files used by different
programs, it may be difficult and time consuming
process to convert data of data files to database
files.

3- Cost of staff training:


Most database system are often complex, so the
training for users to use the database system is
required. Training is requires at all levels for
database developers, user, and data
administrator.

4-Database Damage:
In most organization, all data is store in single
database. If database is damage due to some
reason or database is corrupted on the storage
media, the the valuable data is may be lost
forever.

Objects of Database
The major objects of database are as follow:

1-Tables
2- Queries
3- Forms
4- Reports

Tables
The most important object of database is
Tables. The data is store in the tables of
database. A relational database contain
multiple tables. For example, A Student
Table is shown below:
Roll
No

Name

City

Physic Englis
s
h

Sana

Sargod 88
ha

Ayesha Lahore

Eman

Math

78

98

50

66

76

Karach 44
i

54

60

Queries
The query object of database is used
to retrieve specific information or
record from the database. It is more
flexible way of selecting, filtering and
sorting records. For example , if we
retrieve all records of those student
who have 50 marks in physics, then
Roll No
Name
Physics
output
of query
is:
1

Sana

88

Ayesha

50

Forms

A Form is a window, which may consist of text


boxes, check boxes, list boxes, labels and
command buttons. The for object of database is
most commonly used for user interface. A form
can be used to display data of multiple tables of
database at a time.

Reports

The Report object of database is used to retrieve


data from database and present it on screen in a
formatted way. The data retrieved by report
object can be printed on the printer.

SQL Language
SQL stands for Structured Query Language. It is the
most popular and widely used relational standard
database language. It allow user to define, retrieve
and to manipulate the data in the tables if database.

Features of SQL:
1-SQL is easy to learn and use.
2- The SQL statement can be execute on any computer
and under any operating system.
3- The SQL statement accepts one or more relations as
input and returns a single relation as output.

The STUDENT table and RESULT table with


sample data are shown below;
Roll No

Name

City

Sana

Karachi

Ayesha

Quetta

Eman

Multan

Sara

Lahore

Roll No Marks
1

835

789

The select statement and its out are shown below;


Select * from STUDENT , RESULT
Where STUDENT. Roll No = RESULT. Roll No

The Output of this query is;


Roll No

Name

City

Result
Marks
Roll No

Sana

Karachi

835

Ayesha

Quetta

789

Comparison Between
Database and
File processing System

File Processing

Database System

System

1
In File Processing System the
Data redundancy is not
Controlled.

1
In Database System Data
redundancy is controlled.

File Processing System

2
In file processing
system the data is
inconsistent.

Database System

2
In Database System
the Data is
consistent.

File Processing

Database System

System

3
In file processing system
the Structure of data files
are dependent on
application program.

3
In database system the
Structure of data files are
independent from
application program.

File Processing

Database System

System

In file processing system


In Database system the
the data sharing is limited. data can be shared among
multiple users.

File Processing

Database System

System

5
In file processing system
the data atomicity
problem occurs.

5
In database system the
data atomicity problem
does not occurs.

File Processing

Database System

System

6
The file processing
system does not
provide proper
security against
illegal access of data.

6
The database system
provides proper
security against
illegal access of dat.

File Processing

Database System

System

7
In file processing
system the related
data may be stored in
many data files.

7
In database system
all related data is
stored into a single
database file.

File Processing

Database System

System

8
I n file processing
system the integrity
consistency rules
cannot easily be
applied to data files
so that the correct
data can be entered
into data files.

8
In database system
the integrity
consistency rules can
be applied to
database so that to
correct data can be
entered into
database.

File Processing

Database System

System

9
The file processing
system has not
control over
concurrency.

9
The database system
has control over
concurrency.

File Processing
System

Database
System

10
The File processing
system take large
storage.

10
The database system
takes less storage.

Thank you

Made by: Sana


Khurshid

Вам также может понравиться