SlideShare a Scribd company logo
Introduction to database
Akif
Department computer Science
University of Peshawar
Akifshexi
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
• Disadvantages of DBMS
2
Data
3
• 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.
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.
4
Data Processing Information
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
8
Roll No: 123
Name: Ali
Address: Dir
Program: BCS
Semester: 7th
Session:2012-16
RegNo: ab-3455
--------
-------
--------
Roll No: 123
Name: Ali
Address: Dir
Program: BCS
Semester: 7th
Hostel: szic hostel
Room: 5 Block B
Hostel dues: 10000
-------
-------
-------
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.
• In File processing system many files contains the data of same
student
9
Inconsistency Example
10
Student file Hostel FileStudent file Hostel File
Roll No: 123
Name: Ali
Address: Dir
Program: BCS
Semester: 7th
Session:2012-16
RegNo: ab-3455
--------
-------
--------
Roll No: 123
Name: Ali
Address: Swat
Program: BCS
Semester: 7th
Hoste: szic hostel
Room: 5 Block B
Hostel dues: 10000
-------
-------
-------
Inconsistent address of the same student
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
12
Roll No: 123
Name: Ali
Address: Dir
Program: BCS
Semester: 7th
Email:abc@ini.com
RegNo: ab-3455
--------
Student File
Roll No: 123
Name: Ali
Hostel dues: 1000
Semester: 20000
--------
--------
Account File
Roll No: 123
Name: Ali
Books issued: 9
Card Exp: 1-12- 2013
----
----
Library File
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
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
14
Roll No: 123
Name: 12345
Address: Dir
Program: BCS
Semester: 7th
Email:abc@ini.com
RegNo: ab-3455
--------
Student File
Name should not be
Composed of numbers
File Processing System
Does not prevent from
This type mistake.
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
16
Roll No: 123
Name: 12345
Address: Dir
Program: BCS
Semester: 7th
Email:abc@ini.com
RegNo: ab-3455
--------
Authorized User
Can Change
The file data
Un Authorized User
In file processing system no security was defined
Student File
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
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.
• All data in data base is arranged in tables.
Inayatkhan
18
What is Database?
• A database is a repository 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:
• binary files
• Documents
• Images
• videos
• geographic data
• etc.
Inayatkhan
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
• 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.
• In this course, we will focus on relational databases.
Inayatkhan
20
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
• Update data
Inayatkhan
21
Table
Inayatkhan
22
Roll No Name Address Email CellNo
1 Ali khan Peshawar ali@yahoo.com 03451122113
2 Adnan Charsada adnan@yahoo.co
m
03331122114
3 Jan Mardan jan@gmail.com 03132255254
STUDENT TABLE
Rows/Record
• Rows are the horizotal part of the table.
• It is a collection of related fields.
• For example:
• In the student table, we have three rows.
• Each row contain a record of different student.
Inayatkhan
23
Roll No Name Address Email CellNo
1 Ali khan Peshawar ali@yahoo.com 03451122113
2 Adnan Charsada adnan@yahoo.
com
03331122114
3 Jan Mardan jan@gmail.com 03132255254
Columns/Field
• Columns are the vertical part of the table.
• For example:
• In the Student table, all values under “Name” field make a column.
Inayatkhan
24
Roll No Name Address Email CellNo
1 Ali khan Peshawar ali@yahoo.com 03451122113
2 Adnan Charsada adnan@yahoo.
com
03331122114
3 Jan Mardan jan@gmail.com 03132255254
Types of Database Systems
• PC databases
• Centralized database
• Client/server databases
• Distributed databases
PC Databases
E.g.:
Access
FoxPro
Dbase
Etc.
Centralized Databases
Central
Computer
Client Server Databases
Network
Client
Client
Client
Database
Server
Distributed Databases
computer
computer
computer
Location A
Location C
Location B
Homogeneous
Databases
Distributed Databases
Local Network
Database
Server
Client
Client
Comm
Server
Remote
Comp.
Remote
Comp.
Heterogeneous
Or Federated
Databases
Example of Database
Inayatkhan
31
Phone Directory
• Phone directory is a simple example of a database.
• A phone directory stores the phone numbers of different
persons .
• you can search any phone number from the phone directory
easily because all phone numbers are stored in an organized
way .
Inayatkhan
32
Library
• A library contains thousands of books .
• It is very difficult to handle the records of all these books
without database .
• 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 eaily.
• This database can help you a lot for doing research work.
Inayatkhan
33
Accounts
• A database is used to control the accounts system of an
organization .
• The account database keeps the record of all financial
transactions of the organization.
• You can easily perform different calculations to find the
information about your business such as your annual etc.
Inayatkhan
34
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
the college.
• You can also store the attendance of the student in the
database.
Inayatkhan
35
Airplane ticket reservation
• Database can be used to store passenger information
• A passenger can reserved his/her seat online.
Inayatkhan
36
NADRA
• NADRA have its own database
• One of the most secure database in the world
• It store Pakistan citizen information
• Normally Nation Identity Card information
Inayatkhan
37
Other databases
• YouTube
• Facebook
• Yahoo
• Google
• Hotmail
• Amazon
• etc.
Inayatkhan
38
Advantages of Database
Inayatkhan
39
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
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
Inayatkhan
40
Redundancy Control
Inayatkhan
41
Roll NO Name Address Email Phone
1 Naveed Mardan Naveed@yahoo. 03469119099
2 Imran Peshawar imran@yahoo.c 03469322089
RollNo Subject Marks
1 Math 90
1 English 60
2 Math 80
2 English 70
Student Table
Marksl table
In the above figure , the details of the
student are stored in the student table.
The Marks table store only the rollno of
the student . the remaining data is not
duplicated . RollNo in the marks table is
duplicated for the joining two tables.
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.
• 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.
Inayatkhan
42
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
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 .
Inayatkhan
43
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
data.
• Many database management system also provide several tools to
assist in program development. so it reduces the overall time for
developing application.
Inayatkhan
44
Compactness
• The data base management system store data with compact and
efficient manner.
• it required less storage space than the file system. so it saves the
storage resoures of th system and memory is not wasted.
Inayatkhan
45
Database Management System
Inayatkhan
46
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.
Common DBMS
• MS Access
• MySQL
• SQLite
• SQL Sever
• Oracale
• DB2
Inayatkhan
48
Microsoft Access
• Familiar look and feel of Windows
• Easy to start building simple databases
• Can build sophisticated systems
• It’s already on your computer
• True relational database
Inayatkhan
49
Creating Database in Access
Inayatkhan
50
Inayatkhan
51
Inayatkhan
52
Inayatkhan
53
Inayatkhan
54
Inayatkhan
55
Inayatkhan
56
Retrieve the records
Inayatkhan
57
Inayatkhan
58
Inayatkhan
59
Inayatkhan
60
Inayatkhan
61
Select * from student
This Query will display
All the record of the
Student table.
Inayatkhan
62
This Query will display
The record of Roll No 1.
• MySQL is a very popular, open source database.
• Officially pronounced “my Ess Que Ell” (not my sequel).
• Handles very large databases; very fast performance.
• Why are we using MySQL?
• Free (much cheaper than Oracle!)
• Each student can install MySQL locally.
• Easy to use Shell for creating tables, querying tables, etc.
• Easy to use with Java JDBC
Inayatkhan
63
Database Components
DBMS
===============
Design tools
Table Creation
Form Creation
Query Creation
Report Creation
Procedural
language
compiler (4GL)
=============
Run time
Form processor
Query processor
Report Writer
Language Run time
User
Interface
Applications
Application
Programs
Database
Database contains:
User’s Data
Metadata
Application Metadata
 introduction to database
Components of DBMS
Environment
• Hardware
• PC, workstation, mainframe, a network of computers.
• Software
• DBMS, operating system, network software (if necessary)
and also the application programs.
• Data
• Used by the organization and a description of this data
called the schema.
• Procedures
• Instructions and rules that should be applied to the design
and use of the database and DBMS.
• People
Disadvantages of DBMSs
• Complexity
• Size
• Cost of DBMS
• Additional hardware costs
• Performance
• Higher impact of a failure
Thanks
Inayatkhan
68
Ad

More Related Content

What's hot (20)

Data Base Management System
Data Base Management SystemData Base Management System
Data Base Management System
Dr. C.V. Suresh Babu
 
Basic DBMS ppt
Basic DBMS pptBasic DBMS ppt
Basic DBMS ppt
dangwalrajendra888
 
Database management system presentation
Database management system presentationDatabase management system presentation
Database management system presentation
sameerraaj
 
Relational database
Relational database Relational database
Relational database
Megha Sharma
 
File organization 1
File organization 1File organization 1
File organization 1
Rupali Rana
 
Dbms classification according to data models
Dbms classification according to data modelsDbms classification according to data models
Dbms classification according to data models
ABDUL KHALIQ
 
Database systems
Database systemsDatabase systems
Database systems
Dhani Ahmad
 
Database Chapter 2
Database Chapter 2Database Chapter 2
Database Chapter 2
shahadat hossain
 
Dbms architecture
Dbms architectureDbms architecture
Dbms architecture
Shubham Dwivedi
 
1. Introduction to DBMS
1. Introduction to DBMS1. Introduction to DBMS
1. Introduction to DBMS
koolkampus
 
Introduction of DBMS
Introduction of DBMSIntroduction of DBMS
Introduction of DBMS
YouQue ™
 
Database administrator
Database administratorDatabase administrator
Database administrator
Tech_MX
 
Elmasri Navathe DBMS Unit-1 ppt
Elmasri Navathe DBMS Unit-1 pptElmasri Navathe DBMS Unit-1 ppt
Elmasri Navathe DBMS Unit-1 ppt
AbhinavPandey274499
 
Rdbms
RdbmsRdbms
Rdbms
rdbms
 
File systems versus a dbms
File systems versus a dbmsFile systems versus a dbms
File systems versus a dbms
RituBhargava7
 
Types of Database Models
Types of Database ModelsTypes of Database Models
Types of Database Models
Murassa Gillani
 
Unit1 DBMS Introduction
Unit1 DBMS IntroductionUnit1 DBMS Introduction
Unit1 DBMS Introduction
MUHAMMED MASHAHIL PUKKUNNUMMAL
 
Components and Advantages of DBMS
Components and Advantages of DBMSComponents and Advantages of DBMS
Components and Advantages of DBMS
Shubham Joon
 
Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity Constraints
Megha yadav
 
Dbms lifecycle. ..Database System Development Lifecycle
Dbms lifecycle. ..Database System  Development LifecycleDbms lifecycle. ..Database System  Development Lifecycle
Dbms lifecycle. ..Database System Development Lifecycle
Nimrakhan89
 
Database management system presentation
Database management system presentationDatabase management system presentation
Database management system presentation
sameerraaj
 
Relational database
Relational database Relational database
Relational database
Megha Sharma
 
File organization 1
File organization 1File organization 1
File organization 1
Rupali Rana
 
Dbms classification according to data models
Dbms classification according to data modelsDbms classification according to data models
Dbms classification according to data models
ABDUL KHALIQ
 
Database systems
Database systemsDatabase systems
Database systems
Dhani Ahmad
 
1. Introduction to DBMS
1. Introduction to DBMS1. Introduction to DBMS
1. Introduction to DBMS
koolkampus
 
Introduction of DBMS
Introduction of DBMSIntroduction of DBMS
Introduction of DBMS
YouQue ™
 
Database administrator
Database administratorDatabase administrator
Database administrator
Tech_MX
 
Rdbms
RdbmsRdbms
Rdbms
rdbms
 
File systems versus a dbms
File systems versus a dbmsFile systems versus a dbms
File systems versus a dbms
RituBhargava7
 
Types of Database Models
Types of Database ModelsTypes of Database Models
Types of Database Models
Murassa Gillani
 
Components and Advantages of DBMS
Components and Advantages of DBMSComponents and Advantages of DBMS
Components and Advantages of DBMS
Shubham Joon
 
Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity Constraints
Megha yadav
 
Dbms lifecycle. ..Database System Development Lifecycle
Dbms lifecycle. ..Database System  Development LifecycleDbms lifecycle. ..Database System  Development Lifecycle
Dbms lifecycle. ..Database System Development Lifecycle
Nimrakhan89
 

Similar to introduction to database (20)

New lecturer for computer science and it.ppt
New lecturer for computer science and it.pptNew lecturer for computer science and it.ppt
New lecturer for computer science and it.ppt
Farhat991731
 
DATABASE MANAGEMENT SYSTEMS CS 3492.pptx
DATABASE MANAGEMENT SYSTEMS CS 3492.pptxDATABASE MANAGEMENT SYSTEMS CS 3492.pptx
DATABASE MANAGEMENT SYSTEMS CS 3492.pptx
venigkrish89
 
UNIT machine learning unit 1,algorithm pdf
UNIT machine learning  unit 1,algorithm pdfUNIT machine learning  unit 1,algorithm pdf
UNIT machine learning unit 1,algorithm pdf
OmarFarooque9
 
lecture 1.pdf
lecture 1.pdflecture 1.pdf
lecture 1.pdf
AhmadHussainShafiSE3
 
Data concepts
Data conceptsData concepts
Data concepts
Sachidananda M H
 
DBMS Introduction 5 .pptx
DBMS Introduction 5 .pptxDBMS Introduction 5 .pptx
DBMS Introduction 5 .pptx
NitinKashyap89
 
Dbms introduction about data models,data
Dbms introduction about data models,dataDbms introduction about data models,data
Dbms introduction about data models,data
kngaravind54
 
PPT-UEU-Basis-Data-Pertemuan-1.pptx
PPT-UEU-Basis-Data-Pertemuan-1.pptxPPT-UEU-Basis-Data-Pertemuan-1.pptx
PPT-UEU-Basis-Data-Pertemuan-1.pptx
UbaidURRahman78
 
computer fund-database presentation
 computer fund-database presentation computer fund-database presentation
computer fund-database presentation
Rakibul islam
 
DBMS Introduction.pptx DATA BASE MANAGEMENT SYSTEMS
DBMS Introduction.pptx DATA BASE MANAGEMENT SYSTEMSDBMS Introduction.pptx DATA BASE MANAGEMENT SYSTEMS
DBMS Introduction.pptx DATA BASE MANAGEMENT SYSTEMS
ShamshadAli58
 
6134DBMS Introduction 5 sem.pptx
6134DBMS Introduction 5 sem.pptx6134DBMS Introduction 5 sem.pptx
6134DBMS Introduction 5 sem.pptx
Danishompi
 
Chapter 7. Databases Chapter In Introduction to Computer. Pptx
Chapter 7. Databases Chapter In Introduction to Computer. PptxChapter 7. Databases Chapter In Introduction to Computer. Pptx
Chapter 7. Databases Chapter In Introduction to Computer. Pptx
MohsinChaudhary17
 
Database Management system : UNit I Helping to understand basics of dbms oper...
Database Management system : UNit I Helping to understand basics of dbms oper...Database Management system : UNit I Helping to understand basics of dbms oper...
Database Management system : UNit I Helping to understand basics of dbms oper...
SanthanalakshmiSelva2
 
Week 9
Week 9Week 9
Week 9
Joey Pierce
 
Chapter – 1 Intro to DBS.pdf
Chapter – 1 Intro to DBS.pdfChapter – 1 Intro to DBS.pdf
Chapter – 1 Intro to DBS.pdf
TamiratDejene1
 
Chapter – 1 Intro to DBS.pdf
Chapter – 1 Intro to DBS.pdfChapter – 1 Intro to DBS.pdf
Chapter – 1 Intro to DBS.pdf
TamiratDejene1
 
REC-UNIT-I-DataBaseManagementSystems.pptx
REC-UNIT-I-DataBaseManagementSystems.pptxREC-UNIT-I-DataBaseManagementSystems.pptx
REC-UNIT-I-DataBaseManagementSystems.pptx
Uma Kakarlapudi
 
Lec20.pptx introduction to data bases and information systems
Lec20.pptx introduction to data bases and information systemsLec20.pptx introduction to data bases and information systems
Lec20.pptx introduction to data bases and information systems
samiullahamjad06
 
Database Management Systems (DBMS) are software systems used to store, retrie...
Database Management Systems (DBMS) are software systems used to store, retrie...Database Management Systems (DBMS) are software systems used to store, retrie...
Database Management Systems (DBMS) are software systems used to store, retrie...
mayurjagdale4
 
Database part1-
Database part1-Database part1-
Database part1-
Taymoor Nazmy
 
New lecturer for computer science and it.ppt
New lecturer for computer science and it.pptNew lecturer for computer science and it.ppt
New lecturer for computer science and it.ppt
Farhat991731
 
DATABASE MANAGEMENT SYSTEMS CS 3492.pptx
DATABASE MANAGEMENT SYSTEMS CS 3492.pptxDATABASE MANAGEMENT SYSTEMS CS 3492.pptx
DATABASE MANAGEMENT SYSTEMS CS 3492.pptx
venigkrish89
 
UNIT machine learning unit 1,algorithm pdf
UNIT machine learning  unit 1,algorithm pdfUNIT machine learning  unit 1,algorithm pdf
UNIT machine learning unit 1,algorithm pdf
OmarFarooque9
 
DBMS Introduction 5 .pptx
DBMS Introduction 5 .pptxDBMS Introduction 5 .pptx
DBMS Introduction 5 .pptx
NitinKashyap89
 
Dbms introduction about data models,data
Dbms introduction about data models,dataDbms introduction about data models,data
Dbms introduction about data models,data
kngaravind54
 
PPT-UEU-Basis-Data-Pertemuan-1.pptx
PPT-UEU-Basis-Data-Pertemuan-1.pptxPPT-UEU-Basis-Data-Pertemuan-1.pptx
PPT-UEU-Basis-Data-Pertemuan-1.pptx
UbaidURRahman78
 
computer fund-database presentation
 computer fund-database presentation computer fund-database presentation
computer fund-database presentation
Rakibul islam
 
DBMS Introduction.pptx DATA BASE MANAGEMENT SYSTEMS
DBMS Introduction.pptx DATA BASE MANAGEMENT SYSTEMSDBMS Introduction.pptx DATA BASE MANAGEMENT SYSTEMS
DBMS Introduction.pptx DATA BASE MANAGEMENT SYSTEMS
ShamshadAli58
 
6134DBMS Introduction 5 sem.pptx
6134DBMS Introduction 5 sem.pptx6134DBMS Introduction 5 sem.pptx
6134DBMS Introduction 5 sem.pptx
Danishompi
 
Chapter 7. Databases Chapter In Introduction to Computer. Pptx
Chapter 7. Databases Chapter In Introduction to Computer. PptxChapter 7. Databases Chapter In Introduction to Computer. Pptx
Chapter 7. Databases Chapter In Introduction to Computer. Pptx
MohsinChaudhary17
 
Database Management system : UNit I Helping to understand basics of dbms oper...
Database Management system : UNit I Helping to understand basics of dbms oper...Database Management system : UNit I Helping to understand basics of dbms oper...
Database Management system : UNit I Helping to understand basics of dbms oper...
SanthanalakshmiSelva2
 
Chapter – 1 Intro to DBS.pdf
Chapter – 1 Intro to DBS.pdfChapter – 1 Intro to DBS.pdf
Chapter – 1 Intro to DBS.pdf
TamiratDejene1
 
Chapter – 1 Intro to DBS.pdf
Chapter – 1 Intro to DBS.pdfChapter – 1 Intro to DBS.pdf
Chapter – 1 Intro to DBS.pdf
TamiratDejene1
 
REC-UNIT-I-DataBaseManagementSystems.pptx
REC-UNIT-I-DataBaseManagementSystems.pptxREC-UNIT-I-DataBaseManagementSystems.pptx
REC-UNIT-I-DataBaseManagementSystems.pptx
Uma Kakarlapudi
 
Lec20.pptx introduction to data bases and information systems
Lec20.pptx introduction to data bases and information systemsLec20.pptx introduction to data bases and information systems
Lec20.pptx introduction to data bases and information systems
samiullahamjad06
 
Database Management Systems (DBMS) are software systems used to store, retrie...
Database Management Systems (DBMS) are software systems used to store, retrie...Database Management Systems (DBMS) are software systems used to store, retrie...
Database Management Systems (DBMS) are software systems used to store, retrie...
mayurjagdale4
 
Ad

Recently uploaded (20)

"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E..."Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
Infopitaara
 
introduction to machine learining for beginers
introduction to machine learining for beginersintroduction to machine learining for beginers
introduction to machine learining for beginers
JoydebSheet
 
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Journal of Soft Computing in Civil Engineering
 
Machine learning project on employee attrition detection using (2).pptx
Machine learning project on employee attrition detection using (2).pptxMachine learning project on employee attrition detection using (2).pptx
Machine learning project on employee attrition detection using (2).pptx
rajeswari89780
 
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptxLidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
RishavKumar530754
 
IntroSlides-April-BuildWithAI-VertexAI.pdf
IntroSlides-April-BuildWithAI-VertexAI.pdfIntroSlides-April-BuildWithAI-VertexAI.pdf
IntroSlides-April-BuildWithAI-VertexAI.pdf
Luiz Carneiro
 
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITYADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ijscai
 
π0.5: a Vision-Language-Action Model with Open-World Generalization
π0.5: a Vision-Language-Action Model with Open-World Generalizationπ0.5: a Vision-Language-Action Model with Open-World Generalization
π0.5: a Vision-Language-Action Model with Open-World Generalization
NABLAS株式会社
 
some basics electrical and electronics knowledge
some basics electrical and electronics knowledgesome basics electrical and electronics knowledge
some basics electrical and electronics knowledge
nguyentrungdo88
 
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdffive-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
AdityaSharma944496
 
Oil-gas_Unconventional oil and gass_reseviours.pdf
Oil-gas_Unconventional oil and gass_reseviours.pdfOil-gas_Unconventional oil and gass_reseviours.pdf
Oil-gas_Unconventional oil and gass_reseviours.pdf
M7md3li2
 
International Journal of Distributed and Parallel systems (IJDPS)
International Journal of Distributed and Parallel systems (IJDPS)International Journal of Distributed and Parallel systems (IJDPS)
International Journal of Distributed and Parallel systems (IJDPS)
samueljackson3773
 
theory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptxtheory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptx
sanchezvanessa7896
 
AI-assisted Software Testing (3-hours tutorial)
AI-assisted Software Testing (3-hours tutorial)AI-assisted Software Testing (3-hours tutorial)
AI-assisted Software Testing (3-hours tutorial)
Vəhid Gəruslu
 
Compiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptxCompiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptx
RushaliDeshmukh2
 
Smart_Storage_Systems_Production_Engineering.pptx
Smart_Storage_Systems_Production_Engineering.pptxSmart_Storage_Systems_Production_Engineering.pptx
Smart_Storage_Systems_Production_Engineering.pptx
rushikeshnavghare94
 
Introduction to Zoomlion Earthmoving.pptx
Introduction to Zoomlion Earthmoving.pptxIntroduction to Zoomlion Earthmoving.pptx
Introduction to Zoomlion Earthmoving.pptx
AS1920
 
new ppt artificial intelligence historyyy
new ppt artificial intelligence historyyynew ppt artificial intelligence historyyy
new ppt artificial intelligence historyyy
PianoPianist
 
Raish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdfRaish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdf
RaishKhanji
 
Smart Storage Solutions.pptx for production engineering
Smart Storage Solutions.pptx for production engineeringSmart Storage Solutions.pptx for production engineering
Smart Storage Solutions.pptx for production engineering
rushikeshnavghare94
 
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E..."Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
Infopitaara
 
introduction to machine learining for beginers
introduction to machine learining for beginersintroduction to machine learining for beginers
introduction to machine learining for beginers
JoydebSheet
 
Machine learning project on employee attrition detection using (2).pptx
Machine learning project on employee attrition detection using (2).pptxMachine learning project on employee attrition detection using (2).pptx
Machine learning project on employee attrition detection using (2).pptx
rajeswari89780
 
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptxLidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
RishavKumar530754
 
IntroSlides-April-BuildWithAI-VertexAI.pdf
IntroSlides-April-BuildWithAI-VertexAI.pdfIntroSlides-April-BuildWithAI-VertexAI.pdf
IntroSlides-April-BuildWithAI-VertexAI.pdf
Luiz Carneiro
 
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITYADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ijscai
 
π0.5: a Vision-Language-Action Model with Open-World Generalization
π0.5: a Vision-Language-Action Model with Open-World Generalizationπ0.5: a Vision-Language-Action Model with Open-World Generalization
π0.5: a Vision-Language-Action Model with Open-World Generalization
NABLAS株式会社
 
some basics electrical and electronics knowledge
some basics electrical and electronics knowledgesome basics electrical and electronics knowledge
some basics electrical and electronics knowledge
nguyentrungdo88
 
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdffive-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
AdityaSharma944496
 
Oil-gas_Unconventional oil and gass_reseviours.pdf
Oil-gas_Unconventional oil and gass_reseviours.pdfOil-gas_Unconventional oil and gass_reseviours.pdf
Oil-gas_Unconventional oil and gass_reseviours.pdf
M7md3li2
 
International Journal of Distributed and Parallel systems (IJDPS)
International Journal of Distributed and Parallel systems (IJDPS)International Journal of Distributed and Parallel systems (IJDPS)
International Journal of Distributed and Parallel systems (IJDPS)
samueljackson3773
 
theory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptxtheory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptx
sanchezvanessa7896
 
AI-assisted Software Testing (3-hours tutorial)
AI-assisted Software Testing (3-hours tutorial)AI-assisted Software Testing (3-hours tutorial)
AI-assisted Software Testing (3-hours tutorial)
Vəhid Gəruslu
 
Compiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptxCompiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptx
RushaliDeshmukh2
 
Smart_Storage_Systems_Production_Engineering.pptx
Smart_Storage_Systems_Production_Engineering.pptxSmart_Storage_Systems_Production_Engineering.pptx
Smart_Storage_Systems_Production_Engineering.pptx
rushikeshnavghare94
 
Introduction to Zoomlion Earthmoving.pptx
Introduction to Zoomlion Earthmoving.pptxIntroduction to Zoomlion Earthmoving.pptx
Introduction to Zoomlion Earthmoving.pptx
AS1920
 
new ppt artificial intelligence historyyy
new ppt artificial intelligence historyyynew ppt artificial intelligence historyyy
new ppt artificial intelligence historyyy
PianoPianist
 
Raish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdfRaish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdf
RaishKhanji
 
Smart Storage Solutions.pptx for production engineering
Smart Storage Solutions.pptx for production engineeringSmart Storage Solutions.pptx for production engineering
Smart Storage Solutions.pptx for production engineering
rushikeshnavghare94
 
Ad

introduction to database

  • 1. Introduction to database Akif Department computer Science University of Peshawar Akifshexi 1
  • 2. 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 • Disadvantages of DBMS 2
  • 3. Data 3 • 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.
  • 4. 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. 4 Data Processing Information
  • 5. 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
  • 6. Problems in File Processing System 6
  • 7. 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
  • 8. Redundancy example Student file Hostel File 8 Roll No: 123 Name: Ali Address: Dir Program: BCS Semester: 7th Session:2012-16 RegNo: ab-3455 -------- ------- -------- Roll No: 123 Name: Ali Address: Dir Program: BCS Semester: 7th Hostel: szic hostel Room: 5 Block B Hostel dues: 10000 ------- ------- ------- Redundant information
  • 9. 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. • In File processing system many files contains the data of same student 9
  • 10. Inconsistency Example 10 Student file Hostel FileStudent file Hostel File Roll No: 123 Name: Ali Address: Dir Program: BCS Semester: 7th Session:2012-16 RegNo: ab-3455 -------- ------- -------- Roll No: 123 Name: Ali Address: Swat Program: BCS Semester: 7th Hoste: szic hostel Room: 5 Block B Hostel dues: 10000 ------- ------- ------- Inconsistent address of the same student
  • 11. 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
  • 12. Data Isolation Example 12 Roll No: 123 Name: Ali Address: Dir Program: BCS Semester: 7th Email:[email protected] RegNo: ab-3455 -------- Student File Roll No: 123 Name: Ali Hostel dues: 1000 Semester: 20000 -------- -------- Account File Roll No: 123 Name: Ali Books issued: 9 Card Exp: 1-12- 2013 ---- ---- Library File 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 file, account file and Hostel file which is difficult in file processing system.
  • 13. 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
  • 14. Integrity Problem 14 Roll No: 123 Name: 12345 Address: Dir Program: BCS Semester: 7th Email:[email protected] RegNo: ab-3455 -------- Student File Name should not be Composed of numbers File Processing System Does not prevent from This type mistake.
  • 15. 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
  • 16. Security Problem 16 Roll No: 123 Name: 12345 Address: Dir Program: BCS Semester: 7th Email:[email protected] RegNo: ab-3455 -------- Authorized User Can Change The file data Un Authorized User In file processing system no security was defined Student File
  • 18. 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 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. • All data in data base is arranged in tables. Inayatkhan 18
  • 19. What is Database? • A database is a repository 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: • binary files • Documents • Images • videos • geographic data • etc. Inayatkhan 19
  • 20. 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 • 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. • In this course, we will focus on relational databases. Inayatkhan 20
  • 21. 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 • Update data Inayatkhan 21
  • 22. Table Inayatkhan 22 Roll No Name Address Email CellNo 1 Ali khan Peshawar [email protected] 03451122113 2 Adnan Charsada [email protected] m 03331122114 3 Jan Mardan [email protected] 03132255254 STUDENT TABLE
  • 23. Rows/Record • Rows are the horizotal part of the table. • It is a collection of related fields. • For example: • In the student table, we have three rows. • Each row contain a record of different student. Inayatkhan 23 Roll No Name Address Email CellNo 1 Ali khan Peshawar [email protected] 03451122113 2 Adnan Charsada adnan@yahoo. com 03331122114 3 Jan Mardan [email protected] 03132255254
  • 24. Columns/Field • Columns are the vertical part of the table. • For example: • In the Student table, all values under “Name” field make a column. Inayatkhan 24 Roll No Name Address Email CellNo 1 Ali khan Peshawar [email protected] 03451122113 2 Adnan Charsada adnan@yahoo. com 03331122114 3 Jan Mardan [email protected] 03132255254
  • 25. Types of Database Systems • PC databases • Centralized database • Client/server databases • Distributed databases
  • 32. Phone Directory • Phone directory is a simple example of a database. • A phone directory stores the phone numbers of different persons . • you can search any phone number from the phone directory easily because all phone numbers are stored in an organized way . Inayatkhan 32
  • 33. Library • A library contains thousands of books . • It is very difficult to handle the records of all these books without database . • 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 eaily. • This database can help you a lot for doing research work. Inayatkhan 33
  • 34. Accounts • A database is used to control the accounts system of an organization . • The account database keeps the record of all financial transactions of the organization. • You can easily perform different calculations to find the information about your business such as your annual etc. Inayatkhan 34
  • 35. 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 the college. • You can also store the attendance of the student in the database. Inayatkhan 35
  • 36. Airplane ticket reservation • Database can be used to store passenger information • A passenger can reserved his/her seat online. Inayatkhan 36
  • 37. NADRA • NADRA have its own database • One of the most secure database in the world • It store Pakistan citizen information • Normally Nation Identity Card information Inayatkhan 37
  • 38. Other databases • YouTube • Facebook • Yahoo • Google • Hotmail • Amazon • etc. Inayatkhan 38
  • 40. 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 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 Inayatkhan 40
  • 41. Redundancy Control Inayatkhan 41 Roll NO Name Address Email Phone 1 Naveed Mardan Naveed@yahoo. 03469119099 2 Imran Peshawar [email protected] 03469322089 RollNo Subject Marks 1 Math 90 1 English 60 2 Math 80 2 English 70 Student Table Marksl table In the above figure , the details of the student are stored in the student table. The Marks table store only the rollno of the student . the remaining data is not duplicated . RollNo in the marks table is duplicated for the joining two tables.
  • 42. 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. • 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. Inayatkhan 42
  • 43. 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 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 . Inayatkhan 43
  • 44. 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 data. • Many database management system also provide several tools to assist in program development. so it reduces the overall time for developing application. Inayatkhan 44
  • 45. Compactness • The data base management system store data with compact and efficient manner. • it required less storage space than the file system. so it saves the storage resoures of th system and memory is not wasted. Inayatkhan 45
  • 47. 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.
  • 48. Common DBMS • MS Access • MySQL • SQLite • SQL Sever • Oracale • DB2 Inayatkhan 48
  • 49. Microsoft Access • Familiar look and feel of Windows • Easy to start building simple databases • Can build sophisticated systems • It’s already on your computer • True relational database Inayatkhan 49
  • 50. Creating Database in Access Inayatkhan 50
  • 61. Inayatkhan 61 Select * from student This Query will display All the record of the Student table.
  • 62. Inayatkhan 62 This Query will display The record of Roll No 1.
  • 63. • MySQL is a very popular, open source database. • Officially pronounced “my Ess Que Ell” (not my sequel). • Handles very large databases; very fast performance. • Why are we using MySQL? • Free (much cheaper than Oracle!) • Each student can install MySQL locally. • Easy to use Shell for creating tables, querying tables, etc. • Easy to use with Java JDBC Inayatkhan 63
  • 64. Database Components DBMS =============== Design tools Table Creation Form Creation Query Creation Report Creation Procedural language compiler (4GL) ============= Run time Form processor Query processor Report Writer Language Run time User Interface Applications Application Programs Database Database contains: User’s Data Metadata Application Metadata
  • 66. Components of DBMS Environment • Hardware • PC, workstation, mainframe, a network of computers. • Software • DBMS, operating system, network software (if necessary) and also the application programs. • Data • Used by the organization and a description of this data called the schema. • Procedures • Instructions and rules that should be applied to the design and use of the database and DBMS. • People
  • 67. Disadvantages of DBMSs • Complexity • Size • Cost of DBMS • Additional hardware costs • Performance • Higher impact of a failure

Editor's Notes

  • #14: Sustain mean to keep the data safe
  • #20: Repository mean place of keeping anything