0% found this document useful (0 votes)
33 views50 pages

Chapter 1

The document provides an introduction to databases. It defines key concepts like data, information, files, and databases. It discusses problems with file processing systems like data redundancy, inconsistency, isolation, integrity, and security issues. It then defines what a database is, how data is organized in tables in a relational database, and some common database forms. The document serves to introduce readers to the basic concepts around databases as compared to traditional file processing systems.

Uploaded by

Ahmed Bukhaari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views50 pages

Chapter 1

The document provides an introduction to databases. It defines key concepts like data, information, files, and databases. It discusses problems with file processing systems like data redundancy, inconsistency, isolation, integrity, and security issues. It then defines what a database is, how data is organized in tables in a relational database, and some common database forms. The document serves to introduce readers to the basic concepts around databases as compared to traditional file processing systems.

Uploaded by

Ahmed Bukhaari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 50

ABAARSO TECH UNIVERSITY

Introduction to database

Akif shexi
1
Contents of this chapter
• Data

• Information

• Introduction to File processing system

• Problems in file Processing System

• Introduction to Database

• Advantages of Database

• Applications of Database

• Database Management System


• Common Database Management System
• Components of DBMS Environment 2
• Disadvantages of DBMS
Data
• Collection of raw facts and figures.
• Data can be collect from different sources but it is not
meaning for making decisions.
• Data may be: Numbers, Characters, Symbols, pictures,
sounds etc..
• Types of data: Numeric data, Alphabetic data and
Alphanumeric data.
3
Information
• Processed data is called information
• It is more meaningful than data and is used for making decisions.
• Data is used as input for the processing and information is output
for this processing.

Data Processing Information

4
File Processing System
• In past many organization stored data in files on tap or disk.

• Data was managed using file-processing system.

• Each organization has its own set of files.

• Record in one file are not related to the record in other file.

• No relation between files.

5
Problems in File Processing System

6
Data redundancy
• In file processing system the same data may be duplicated in
several files.
• E.g. there are two files “Student” and “Library”. the file Student”
contains the Roll No, name and address of all students.
• The library contain the Roll No, name etc.
• it means the data of one student appear in two files.
• This is known as data redundancy.
• Same data may appear in many files which is difficult to
manage.
7
Redundancy example
Student file Hostel File

Roll No: 123 Roll No: 123


Name: Ali Name: Ali
Address: Dir Address: Dir
Program: BCS Program: BCS
Semester: 7th Semester: 7th
Session:2012-16 Hostel: szic hostel
RegNo: ab-3455 Room: 5 Block B
-------- Hostel dues: 10000
------- -------
-------- -------
-------

8
Redundant information
Inconsistency
• Inconsistency means that two files may contain different
data of the same student.
• For example if address of the student is changed in one file then
you will must change the address in other files.
• if student information are stored in student file and same student
information are stored in hostel file.
• If any changed occur in one file then you must update the
subsequent file as well.
9
Inconsistency Example
Student file Hostel File

Roll No: 123 Roll No: 123


Name: Ali Name: Ali
Address: Dir Address: Swat
Program: BCS Program: BCS
Semester: 7th Semester: 7th
Session:2012-16 Hoste: szic hostel
RegNo: ab-3455 Room: 5 Block B
-------- Hostel dues: 10000
------- -------
-------- -------
-------

Inconsistent address of the same student 10


Data Isolation

• In file system data is stored in various files

• It become very difficult to retrieve data.

• For example student email are stored in student file and fee info

are stored in Fee file.

• To send an email message to inform a student about his/her fee

you need retrieve data from both files which are difficult.
11
Data Isolation Example
Student File Account File Library File

Roll No: 123 Roll No: 123


Roll No: 123
Name: Ali Name: Ali
Name: Ali
Address: Dir Books issued: 9
Hostel dues: 1000
Program: BCS Card Exp: 1-12- 2013
Semester: 20000
Semester: 7th ----
--------
Email:[email protected] ----
--------
RegNo: ab-3455
--------

If we want to inform a student by email


that clear his/her dues and return library
Books
• Then we will extract data from student 12
file, account file and Hostel file which is
difficult in file processing system.
Integrity Problems
• Integrity means reliability and accuracy of data.

• In File Processing System it is difficult to sustain the

integrity of the data.

• For example: the name of any student contains alphabets if any

one by mistaken entered number instead of alphabets.

• File Processing system has no integrity checking option.


13
Integrity Problem
Student File

Roll No: 123


Name: 12345
Name should not be Address: Dir
Composed of numbers Program: BCS
File Processing System Semester: 7th
Does not prevent from Email:[email protected]
This type mistake. RegNo: ab-3455
--------

14
Security Problems
• File Processing System does not provide any security on data.

• There is not mechanism in File Processing System for data to

be secured from un authorized access.

• No authentication facility in file processing system.

• Any one can easily access and changed the data.

15
Security Problem
Un Authorized User
In file processing system no security was defined

Student File

Roll No: 123


Name: 12345
Address: Dir
Program: BCS
Semester: 7th
Email:[email protected]
RegNo: ab-3455
Can Change --------
The file data
16
Authorized User
Introduction to
Database

17
What is Database?
• Database can be defined as an organized collection of related
data.
• The word organized means that data is stored in such a way

Inayat khan
that the user can:
• Store, manipulate and retrieve data easily

• The word “related” means that a database is normally created to store


the data about a particular topic.
• e.g. Student database contain information about the student i.e his
name, rollno, address, cellno, class etc. 18

• All data in data base is arranged in tables.


What is Database?
• A database is a source of data, designed to support efficient
data storage, retrieval and maintenance.
• Multiple types of databases exist to suit various industry
requirements.
• A database may be specialized to store:

Inayat khan
• binary files
• Documents
• Images
• videos
• geographic data
• etc.
19
Database forms
• Data can be stored in various forms like:
• relational database
• If data is stored in a tabular form then it is called a relational database

Inayat khan
• hierarchical database
• When data is organized in a tree structure form

• It is called a hierarchical database.

• network database
• Data stored as graphs representing relationships between objects is
referred to as a network database.
20
• In this course, we will focus on relational databases.
Table
• In relational Database data can be store in the form of Tables.

• Tables is the fundamental object of the database structure.

• The basic purpose of a table is to store data.

• A table consists of rows and columns.

• A table is a very convenient way to store data.

• In the Table you can easily:


• Retrieve data

• Delete data

• Insert data 21

• Update data
Table

STUDENT TABLE

Inayat khan
Roll No Name Address Email CellNo

1 Ali khan Peshawar [email protected] 03451122113

2 Adnan Charsada [email protected] 03331122114


m

3 Jan Mardan [email protected] 03132255254

22
Types of Database Systems

 PC databases or desktop database


 Centralized database
 Client/server databases
 Distributed databases
PC Databases or Desktop
single-user database supports only one user at a
time.
E.g.:
Sql server
Access
FoxPro
Dbase
Etc.
Centralized Databases
A centralized database (sometimes abbreviated CDB) is a database that is located, stored,
and maintained in a single location. This location is most often a central computer
or database system, for example a desktop or server CPU, mainframe computer

Central
Computer
Client Server Databases
A computer network diagram of clients communicating with a server via the Internet. The
client-server model is a distributed application structure that partitions tasks or workloads
between the providers of a resource or service, called servers, and service requesters, called
clients

Client

Client
Network
Database
Server
Client
Distributed Databases
A distributed database is a database in which portions of the database are
stored in multiple physical locations and processing is distributed among
multiple database nodes.
Location B
Location C

computer
computer

computer

Location A
Inayat khan
Example of Database

28
Phone Directory
• Phone directory is a simple example of a database.
• A phone directory stores the phone numbers of different
persons .

Inayat khan
• you can search any phone number from the phone directory
easily because all phone numbers are stored in an organized
way .

29
Library
• A library contains thousands of books .
• It is very difficult to handle the records of all these books
without database .

Inayat khan
• A database system can be used to store the records of books
members of the library ,issuance and recovery of the books
etc.
• You can use this database to search the required books easily.
• This database can help you a lot for doing research work. 30
Accounts
• A database is used to control the accounts system of an
organization .
• The account database keeps the record of all financial

Inayat khan
transactions of the organization.
• You can easily perform different calculations to find the
information about your business such as your annual etc.

31
College
• A college has many students in different classes.
• A database may be used to keep the records of the students
fee transaction ,examination information and other data of

Inayat khan
the college.
• You can also store the attendance of the student in the
database.

32
Airplane ticket reservation
• Database can be used to store passenger information

• A passenger can reserved his/her seat online.

Inayat khan
33
Other databases

• YouTube
• Facebook
• Yahoo

Inayat khan
• Google
• Hotmail
• Amazon
• etc.

34
Advantages of Database

Inayat khan
35
Redundancy Control
• The data in a database appears only once and is not
duplicated.
• for example the data of a student in the college database is

Inayat khan
store in one table we access this table for different purposes .
for example :
• if we want to store the marks of the student in a table ,only roll
NO of the student will be used . the second table will be
connected to the student table for accessing the information
about the student as follow 36
Redundancy Control
Student Table
Roll NO Name Address Email Phone

1 Naveed Mardan Naveed@yahoo. 03469119099

2 Imran Peshawar [email protected] 03469322089

Inayat khan
In the above figure , the details of the
Marksl table
student are stored in the student table.
RollNo
1
Subject
Math
Marks
90
The Marks table store only the rollno of
1
2
English
Math
60
80
the student . the remaining data is not
2 English 70 duplicated . RollNo in the marks table is
duplicated for the joining two tables.
37
Data Consistency
• One benefit of the controlling redundancy is that the data is
consistent.
• If a data item appears only at once place ,it is easy to maintain it.

Inayat khan
• You need to update the data , you will update it at only one place.
• This change will automatically take effect at all place where this data
is used.

38
Data Security
• Data security is the protection of the database from unauthorized
access. The database management system provide several
procedures to maintain data security .the security is maintained by

Inayat khan
allowing access to the database through the use of passwords .not
every use of database system should be able to access all the data .
• Database managemen system provides different levels of security
options for different user .

39
Reduced Development Time
• A database organize data more efficiently than a file processing

system. it is often easier and faster to develop program that use this

Inayat khan
data.

• Many database management system also provide several tools to

assist in program development. so it reduces the overall time for

developing application.
40
Compactness

• The data base management system store data with compact and

efficient manner.

Inayat khan
• it required less storage space than the file system. so it saves the

storage resoures of th system and memory is not wasted.

41
Database Management System

Inayat khan
42
Database Managment System
• A database management system (DBMS) is a collection of programs
that are used to create and mantian a database. DBMS is a general-
Purpose software system that provide the following facilities :
• 1 It provide the facility to define the structure of the database. the user
can specify the data types, format, and constraints for the data to be
stored in the database
• 2 it provide the facility to store the data on some storage medium that
is controlled by the DBMS
• 3 it provide the facilities to insert ,delete , update and retrive specfic
data for generation reports etc.
Advantage of DBMS
 Improved data sharing.
 Improved data security.
 Minimized data inconsistency.

Inayat khan
 Improved data access.
 Improved decision making.
 Increased end-user productivity.

44
Disadvantages of DBMSs

• Complexity
• Size
• Cost of DBMS
• Additional hardware costs
Common DBMS
• MS Access
• MySQL
• SQLite
• SQL Sever

Inayat khan
• Oracale
• DB2

46
Database Components

DBMS
===============
Design tools
Table Creation
Form Creation
Query Creation
Report Creation Application
Procedural
Programs
Database language
compiler (4GL)
=============
Run time
Database contains:
Form processor
User’s Data Query processor
User
Metadata Report Writer Interface
Application Metadata Language Run time Applications
Database Design
Database design refers to the activities that focus on the design
of the database structure that will be used to store and manage
end-user data.
Proper database design requires the designer to identify
precisely the database’s expected use. Designing a transactional

Inayat khan
database emphasizes accurate and consistent data and
operational speed. Designing a data warehouse database
emphasizes the use of historical and aggregated data.

49
Thanks

Inayat khan
50

You might also like