0% found this document useful (0 votes)
8 views

Lecture 2 - Intro Database

This is a Power point File that consist of Database Course Details and content. This File will help you enhance your knowledge and get an in-depth view of what Database is and why is it necessary to use it now a days.

Uploaded by

Hassan Bhatti
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Lecture 2 - Intro Database

This is a Power point File that consist of Database Course Details and content. This File will help you enhance your knowledge and get an in-depth view of what Database is and why is it necessary to use it now a days.

Uploaded by

Hassan Bhatti
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 43

DATABASE SYSTEMS

HIRA FAYYAZ
LECTURE 2
Introduction 2

• Database System
• What is Data ?
• What is Information?
• Difference between Data and Information
• Meta Data?
• File processing system
• Database
• Database Management System
• Difference between File and Database
Approach
• Types of Users
Introduction 3

• Database
• DATA ?

• Information?
Introduction (Data) 4

• Database
• DATA ?
• The term data is defined as “facts and figures”.
• Collection of raw facts and figures.
• Collected from different sources for different purposes.
• Data may consist of numbers, characters, symbols, pictures,
videos, audios or any other forms.
• Examples:
raw facts about students: name , class , age etc
• Building blocks of information
Introduction (Information) 5

• Database
Processin Informatio
• DATA Data
g n
• Information?
• Organized and processed form of data
• Meaningful for decision making.
• Example:
• Marks of a student in different subject is the data.
• Total marks is the information.
• Average mark is also information
Introduction (Data vs Information) 6

Data Information
Unprocessed raw facts Processed form of data

Input in computer Output of computer

Not meaningful and not Meaningful and used in


used in decision making decision making

Huge in volume Normally short in volume

Assets of organization and Normally available to


is usually not available to people
people for sale
Difficult to reproduce Easier to reproduce
Introduction (Metadata) 7

• Metadata is simply data about data.


• It means it is a description and context of the data. It helps to
organize, find and understand data.
• Also known as data dictionary.
• Examples of metadata:
• Those are some typical metadata elements:
• Title and description,
• Tags and categories,
• Who created and when,
• Who last modified and when,
• Who can access or update.
Introduction (Metadata) 8

• Example:
• Every time you
take a photo
with today's
cameras a bunch
of metadata is
gathered and
saved with it:
• date and time,
• filename,
• camera settings,
• geolocation.
Introduction (Metadata) 9
• Example:
• Each book has a
number of standard
metadata on the covers
and inside. This
includes:
• a title,
• author name,
• publisher and copyright
details,
• description on a back,
• table of contents,
• index,
Introduction (Metadata) 10

• Example:
• Further examples can
be viewed at the
following link:
• https://dataedo.com/kb/
data-glossary/what-is-m
etadata
Brainstorming Activity-1 11

• Write five examples of


• Data,
• Information and
• Metadata.
Introduction (DB and DBMS) 12

• A Database is a collection of related data organized in a way


that data can be easily accessed, managed and updated.
Database with one sole purpose, storing data. Database is
abbreviated ad DB.
• Give examples of databases • Accounts database; payroll
database; UW’s students database; Amazon’s products
database; airline reservation database
• Database Management Systems (DBMS)
• Database management system is a software or application that
enable the user to interact with the database, thus allowing
users to insert, retrieve, update and delete data.
• Give examples of DBMSs – Oracle, IBM DB2, Microsoft SQL
Server, Vertica, Teradata – Open source: MySQL (Sun/Oracle),
PostgreSQL, CouchDB – Open source library: SQLite
Importance of the Databases 13

• Computer applications are divided into commercial and


scientific (or engineering) ones.

• Scientific applications involve more computations, that is,


different type of calculations that vary from simple to very
complex, domains such as space, nuclear, medicine

• Commercial or business applications do not involve much


computations, rather minor computation but mainly they
perform theIntroduction
input/output operations.
to Database Systems 09/10/2024
Importance of the Databases 14

• These applications mainly store the data in the computer


storage, then access and present it to the users in different
formats (also termed as data processing) for example, banks,
shopping, production, utilities billing, customer services

• The goal of this course is to present an in-depth introduction to


databases, with an emphasis on how to organize information in
the database and to maintain it and retrieve it efficiently, that is,
how to design a database and use it effectively.

Introduction to Database Systems 09/10/2024


Record Keeping Techniques 15

• Manual Record Keeping.


• Computerized Record Keeping
• File Processing System.
• Database System or Integrated Database
Environment. (The paradigm shift)

Introduction to Database Systems 09/10/2024


16

Traditional and File


Processing System
Case Study
17

• Consider a College System consisting of the following


offices:
• Registration Office
• Library
• Exam Office
• Each Office is maintaining its own set of files for its day to
day operations.
• Some of the files used in the system are Student’s File,
Faculty File, Course File etc.
Manual System - Drawbacks 18
• High data volume
• Not reliable
• Inefficient
• Duplication of data
• Inconsistency
• A lot of data movement is required.
• The manual filing system breaks down when we have to cross-
reference or process the information in the files.

09/10/2024
Example of file system 19

• In our own home, we probably have some sort of filing system,


which contains receipts, guarantees, invoices, bank statements, and
such like.
• When we need to look something up, we go to the filing system and
search through the system starting from the first entry until we find
what we want.
• Alternatively, we may have an indexing system that helps to locate
what we want more quickly.
• For example we may have divisions in the filing system or separate
folders for different types of item that are in some way logically related.
File Processing System 20

• File-based systems were an early attempt to computerize the


manual filing system.
• The manual files were replaced by computer files.
• A person responsible for developing and managing computerized
file processing system was called Data Processing (DP) specialist.
• Each application will have its own set of Private Files designed to
meet the needs of a particular department.
• Before the advent of database systems, computer-readable data
was usually kept in files stored on magnetic tape or disk.
Introduction to Database Systems 09/10/2024
File Processing System 21

Library Examination Registration

Reg_Number Reg_Number Reg_Number

Name Name Name

Father Name Address Father Name

Books Issued Class Phone

Fine Semester Address

Grade Class

Introduction to Database Systems 09/10/2024


File Processing System 22

App – 1
File – 1 (operations + data descriptions)

App – 2
File – 2 (operations + data descriptions)

App – n
File – n (operations + data descriptions)

Introduction to Database Systems 10/09/2024


File Processing System
Duplicate 23
Data

Introduction to Database Systems 09/10/2024


Drawbacks of File System 24

1. Redundancy of Data
2. Inconsistent Data
3. Poor Enforcement of Standards
4. Data Dependence
5. Limited Data Sharing
6. Inflexible
7. Lack of provision for security
8. Limited recovery from failure
9. Atomicity 09/10/2024

10. Maintaince
Drawbacks of File System 25

1. Redundancy of Data
• Redundancy means duplication of data.
• Higher storage

Introduction to Database Systems 09/10/2024


Drawbacks of File System 26

2. Data Inconsistencies or Data Anomalies


• Redundancy leads to data inconsistency or data anomalies.
• A data anomaly occurs if an operation (update, insert, delete) has not yet
been performed against all the occurrences. Consequently, same data
stored at different places will disagree with each other
3. Poor Enforcement of Standards
• Organization wide enforcement of standards is poor. This leads to the
following types of inconsistencies:
a) Synonym: Using different names for same data item
Example: Stud-Id, Reg-No.
b) Homonym: Using same name for different data items.
Example: “course” for a single subject or entire program.
09/10/2024
Drawbacks of File System 27
4. Data Dependence
• The definition of data is embedded in the application
programs, rather than being stored separately and
independently.
• The applications are constrained to work only with the given
file description. Any change in the file structure or data
requires changes to all the applications using that file. Such
applications are called Data Dependent Applications.
• Data dependence leads to excessive program maintenance.
• Often difficult to locate all programs affected by change
• Errors are often introduced when making changes. 09/10/2024
Drawbacks of File System 28

5. Limited Data Sharing


• As each application has its own private files so little
opportunity to share data with others.
6. Inflexible: Fixed queries
7. Lack of provision for security
• Access right
8. Limited recovery from failure
9. Atomicity
10. Maintenance
09/10/2024
Integrated Database Environment (IDE) 29

• IDE has a single large repository of data, called database,


where data definition is separated from application programs.
• Emphasizes the integration & sharing of data throughout the
organization.
• The organization wide requirements are analyzed as a whole
and there is no longer concept of MY FILE or Private Files.
• A Database Management System (DBMS) is a software
designed to assist in maintaining and utilizing large collections
of data. Introduction to Database Systems 09/10/2024
Integrated Database Environment (IDE) 30

• A database can handle any kind of records, like text,


number, images, date, sounds etc.

• The database in not owned by a single department, but it is


owned by the whole organization and is managed by a
single person called Database Administrator (DBA)

Introduction to Database Systems 09/10/2024


Advantages of Database
31
Approach
Library Examination Registration

Library Examination Registration


Applications Applications Applications

Database
Management
System

University
Students
Database 10/09/2024
Database System 32

D App – 1 (Operations)

B
App – 2 (Operations)
M
Database
(Data + Data Descriptions)
S
App – n (Operations)

DBMS manages data resources like an operating system manages hardware resources
10/09/2024
33

Introduction to Database Systems 09/10/2024


Advantages of Database
Approach 34

1. Reduced or Controlled Data Redundancy


2. Improved Data Consistency
3. Enforcement of Standards
4. Reduced Program Maintenance
5. Data Sharing
6. Data Integrity (Improved Data Quality)
7. Improved Security Restrictions
8. Improved Accessibility & Responsiveness
9. Improved Decision Making 09/10/2024

10. Data Independence


Advantages of Database
Approach 35

1. Reduced or Controlled Data Redundancy


• Since all the data items are stored in a single database, therefore
Redundancy is minimized.
• Separate data files are integrated into a single logical structure to reduce
redundancy
• 100% elimination of redundancy is not possible in order keep the logical
connections among the data items.
2. Improved Data Consistency
• Reduction in redundancy automatically avoids inconsistency.
• If a data item appears only once, any change to its value needs to be
performed only for once and the database will always be in some
consistent /Introduction
correctto state.
Database Systems 09/10/2024
Advantages of Database
Approach 36

3. Enforcement of Standards
• This is possible as database is designed to meet the
organization wide requirements.
• The standards can be name of data items and their
format, data codes, documentation standards, operation
standards, security policies etc.
4. Reduced Program Maintenance & Development Cost
• When all the organization’s requirements are satisfied by
one database instead of many separate files, the
maintenance and development cost automatically
reduces. 09/10/2024
Advantages of Database
Approach 37

5. Data Sharing
• Sharing means that the same data source is used by multiple
applications.
• Data is centralized and hence can be shared not only by the
existing applications but also new applications can be
developed to operate against the same data.
• The applications that can access same data simultaneously
are called Online Transaction Processing (OLTP) applications
and DBMS uses Concurrency Control Mechanism to ensure that
multiple users can access and update data correctly.
09/10/2024
Advantages of Database
Approach 38
6. Data Integrity (Improved Data Quality)
• Data integrity refers to the correctness of data.
• Integrity constraints or rules ensure that the data stored in the
database is purified and accurate.
7. Improved Security Restrictions
• Database security is the protection of database from unauthorized
disclosure, alteration or destruction.
• DBMS provides strong security measures against such threats.
Some of them are:
• Password checks
• User defined procedures
• Defining user privileges 09/10/2024

• Audit trial system


• Data encryption
Advantages of Database
Approach 39

8. Improved Accessibility & Responsiveness.


• In File Processing System, data accessibility is quite
difficult as it is procedural based. You should know the
detailed procedural steps. On the other hand, accessing
data is lot easier in DBMS with the help of a non
procedural language – SQL
9. Improved Decision Making
• Consolidated reports
• Ad-hoc queries
• Multiple views of data
09/10/2024
Advantages of Database
Approach 40
10. Data Independence.
• The separation of data descriptions from the applications using
the data is called data independence.
• Data Independence can also be defined as: “The immunity of an
application to change in storage structure – which implies that the
applications don’t depend on any particular storage structure”.
• Allows change & evolution of database systems without changing
the application programs
• Without data independence, it is must to understand the
arrangements of data elements in order to perform an operation
against them.
• Different data arrangements will need different algorithms even
09/10/2024

for the same operation.


Advantages of Database
Approach
41

Data Independence cont..


• Clearly, data dependence is not desired because of the
following reasons:
a) Each user should be able to access data in a customized way.
b) Users should not have to deal directly with the physical database
storage details.
c) Different application may need different physical structure for the
efficiency of their operations.
d) The DBA should have freedom to change the storage structure or
access technique or both in response to changing requirements
without much disturbing the existing applications.
09/10/2024
Cost & Risk of Database Approach 42

1. Need for new specialized personnel


2. Installation cost & complexity
3. Conversion from legacy system to modern database
system
4. Organizational conflict
5. Higher impact of failure

09/10/2024
43

You might also like