Lecture 01 - Introduction To Database
Lecture 01 - Introduction To Database
▰ Assessment
▻ Assignment: 10%
▻ Quiz: 10%
▻ Semester Project: 10%
▻ Class Participation: 05%
▻ Midterm Examination: 25%
▻ Final Examination: 40%
3
Objectives
4
Pre-requisites
5
Course Content – Key Topics
▻ Importance of Data?
10
Data
11
Summarized data (Information)
12
Metadata
13
What is a Database
▰ Repository of Information/Data
▻ A usually large collection of data organized
▻ especially for rapid search and retrieval (as by a
computer)
▰ What is a Database Management System
▻ A database management system (DBMS),
sometimes just called a database manager, is a
program that lets one or more computer users
create and access data in a database. E.g. MS
SQL Server, Oracle etc.
14
Lets Start with a
common problem
15
A Simple Data Management Problem:
17
The Traditional File Processing
Environment
18
The Traditional File Processing
Environment
19
Advantages of File Processing
System
▰ Free format
▰ Shareable [as a unit]
▰ Cost friendly – There is a very minimal to no set up and
usage fee for File Processing System. (In most cases, free
tools are inbuilt in computers.)
▰ Easy to use – File systems require very basic learning
and understanding, hence, can be easily used.
▰ High scalability – One can very easily switch from
smaller to larger files as per his needs. Unlimited size
(Depending on the o/s)
20
Disadvantages of File Processing
System
▰ Unstructured Data
▰ User Responsible to Store Data
▰ Slow access time
▻ Direct access of files is very difficult and one needs to
know the entire hierarchy of folders to get to a specific
file. This involves a lot of time.
▰ Presence of redundant data
▻ The same data can be present in two or more files
which takes up more disc space.
▰ It allow pre-determined access to data (Compiled Program)
▻ For each query write a whole program
21
Disadvantages of File Processing
System
▰ Inconsistent Data
▻ Due to data redundancy, same data stored at different
places might not match to each other.
▰ Data Integrity Problems
▻ Integrity means reliability and accuracy of data.
▻ The data present in the database should be consistent
and correct. To achieve this, the data should must satisfy
certain constraints.
▰ Difficulty in recovery of corrupt data
▻ Recovery or backup of lost and corrupt data is nearly
impossible in case of File Processing System.
22
Disadvantages of File Processing
System
▰ Lack of Atomicity
▻ Operations performed in the database must be
atomic i.e. either the operation takes place as a
whole or does not take place at all.
▰ Problem in Concurrent Access
▻ When a number of users operates on a common
data in database at the same time then anomalies
arise, due to lack of concurrency control.
▰ Unauthorized Access
▻ Anyone who gets access to the file can read or
modify the data.
23
Disadvantages of File Processing
System
24
Examples of Database
25
The Integrated Database Environment
26
Database
27
The Integrated Database Environment
▰ Responsibilities of DBA
▻ Designing a database
▻ Creating a database
▻ Maintenance and updating of data
28
The Integrated Database Environment
29
The Integrated Database Environment
30
Advantages of Integrated Database
Approach
▰ Sharing of Data
▻ Files owned by single user – DB is owned by organization
▰ Control of Redundancy
▻ Different users may have same data (Names of
UMT students)
▻ DB contains only one occurrence of same data
▰ Data Consistency
▻ Effect of eliminating redundancy. Data needs to be
updated only once at one place. Files are distributed and
data needs to be updated in all of the files.
31
Advantages of Integrated Database
Approach
32
Advantages of Integrated Database
Approach
33
Advantages of Integrated Database
Approach
34
Advantages of Integrated Database
Approach
35
Disadvantages of Integrated
Database Approach
37
Disadvantages of Integrated
Database Approach
39
Disadvantages of Integrated
Database Approach
▰ Increased Vulnerability
▻ HACKERS!!!
▰ More Difficult Recovery
▻ Unlike files there are certain rules by which DB is
recovered.
40
Roles in the Integrated Database
Environment
End Users
Application
Naïve Casual Programmers DBA
Users Users
Applications Commands To
Prewritten SQL In C/C++ Create, Maintain,
Program Interface VB, Java, ASP, JSP etc modify DB
DBMS
DB
41
Roles in the Integrated Database
Environment
42
Roles in the Integrated Database
Environment
End Users
▰ End users are the people who use database
application to perform their jobs.
▰ Database is created and designed for the end
users.
▰ End Users can be divided into two categories.
▻ Sophisticated users
▻ Naive users
43
Roles in the Integrated Database
Environment
▰ Sophisticated users
▻ Also called casual users.
▻ They are trained to use query language in order to access
data.
▻ We can define there access limit by creating views.
▰ Example:
▻ In the registrar office, clerks may be Naïve users, while
registrar is may be a casual user.
▻ As clerks will use application program like for printing
reports, data entry etc. Where as registrar can use query
language to ask questions like “How many new students
are registered in year 2002” 44
Roles in the Integrated Database
Environment
▰ Naive users
▻ Access data through application programs
that have been written for them.
▻ They do not required to know Query
language.
45
Roles in the Integrated Database
Environment
▰ Application Programmer
▻ Application programmer is a professional who
writes computer programs in a high level language.
These programs can be used to interact with
databases.
▻ Application programmer designs application
programs according to the requirements of the
users.
▻ He works according to the specification provided by
the system analyst.
46
Roles in the Integrated Database
Environment
▰ Database administrator
Database administrator is the most technical user. He is
responsible for managing the whole database system. He
designs, creates and maintains the database. He manages the
users who can access this database and controls integrity
issues. Some important functions of a DBA are as follows:
▻ Installation of software
▻ Monitoring of database system
▻ Solution of any problem that occurs in the database system
▻ Assigning permission to different users to use database
system
▻ Taking regular backups of database
▻ Restoring the system in case of any problem or system crash
47
Roles in the Integrated Database
Environment
▰ Database designers
▻ They design the database
▰ Database developers
▻ They create the database
▰ Database programmers
▻ They write programs needed to access the
database or tie the database to other programs
▰ Database administrators
▻ They are responsible for managing the databases
within an organization
48
JAZAK ALLAH!
Any Question?