Sie sind auf Seite 1von 41

Database Systems

CHAPTER 1

An Overview

Introduction to Database, Definitions


, Concepts, Architectures
WEEK -1
LECTURE 1

Database Systems (Spring 2011) - Naveed Anwer Butt @UOG 2


Session Objectives
 Data, Processing & Information
 The Role of Data in Business
 Meta Data& Metameta Data
 What is a Database
 Evolution of databases
 Types of files
 Traditional File Processing Systems
 Types of DBMS

3
Database Systems (Spring 2011) - Naveed Anwer Butt @UOG
Introduction

Definitions

Data:
 “A collection of raw facts and figures”.

 “Data consists of facts, text, graphics,


images,sound and video.”

4
Database Systems (Spring 2011) - Naveed Anwer Butt @UOG
Figure 1-1a Data in Context

5
Database Systems (Spring 2011) - Naveed Anwer Butt @UOG
Information
 Information:
 Data processed to be useful in decision
making.
 Information is, processed data that is
correlated and meaningful.

6
Database Systems (Spring 2011) - Naveed Anwer Butt @UOG
Figure 1-1b Summarized data

7
Database Systems (Spring 2011) - Naveed Anwer Butt @UOG
Metadata: Data that describes data.

Example

Name Type Length Min Max Description

sId Character 11 11 11 Student Id


cId Character 8 8 8 Course Id
Section Integer 1 1 9 Section Number
Year Integer 4 1980 2100 Year Completed
Term Integer 4 1 4 Semester
Grade Character 1 Alpha Grade:
Must be in
(A,B,C,D,F,I)
8
Database Systems (Spring 2011) - Naveed Anwer Butt @UOG
Descriptions of the properties or characteristics of the
data, including data types, field sizes, allowable values,
and data context

9
Database Systems (Spring 2011) - Naveed Anwer Butt @UOG
MetaMeta Data
“Data about a metadata record”

Information about a metadata record, such as


when that record was created, by whom, and
when it was last updated, is called metametadata

10
Database Systems (Spring 2011) - Naveed Anwer Butt @UOG
Data Vs Information

Data are….. Information is….


1.Stored facts 1. Presented facts
2.Inactive (They exist) 2.Active (It enables doing)
3.Technology –based 3.Business Based
4.Gathered from various 4.Transformed from data
sources
5.Refers to the values 5. Refers the meaning of the
actually stored in. values as understood by
some users
11
Database Systems (Spring 2011) - Naveed Anwer Butt @UOG
DATABASE

1. A database is an organized collection of logically


related data.

2. A database is a computerized record keeping system.


3. “A database is a collection of inter-related records
with minimum of data redundancy.”

4. Collection of related data items that are being


stored for record-keeping & analysis
 Could be stored on cards ,file cabinet,
computer, …
12
Database Systems (Spring 2011) - Naveed Anwer Butt @UOG
A collection of related files.

A collection of records about a particular set of people, objects,


entities and so on.

A collection of related fields associated with a single person,


object, entity and so on.

A collection of bytes representing a single attribute.

A collection of bits representing a single character.

A binary digit.

13
Database Systems (Spring 2011) - Naveed Anwer Butt @UOG
3. A database is a self-defined collection
of integrated files.
Integrated : It is possible to navigate from file to file
to extract necessary information.

Note: A FILE is a collection of logical records in a tabular


format.
A RECORD contains fields (or attributes ) about the entity.
A field is same as an ‘attribute’

Implicit
properties
Have a Source
Degree of interaction
Audience 14
Database Systems (Spring 2011) - Naveed Anwer Butt @UOG
SLSREP Slsrep Name Commission Total
Number Rate Commission
3 Mary Jones .05 2150.00
6 Bill Smith .07 4912.00
12 Sam Brown .06 3567.80

CUSTOMER Cust# Name City Balance Credit Slsrep#

124 Sally Adams Delta 418.75 500.00 3


256 Ann SamuelsTiffin 10.90 800.00 6
311 Don Charles Toledo 200.10 300.00 12
315 Tom Daniels Toledo 320.75 300.00 6
405 Al Williams Swanton 408.87 800.00 3
412 Sally Adams Toledo 201.20 500.00 12

ORDERS ORDER DETAIL


Order# Part# Qty Selling Price
Order# Date Cust#
2561 P110 10 154.56
2561 07/11/94 256 2561 P120 20 234.00
2562 12/12/94 256 2562 P110 20 150.20
3111 05/16/95 311 3111 M075 1 1200.70
3112 08/01/95 311 3111 P110 5 165.89
3112 M075 10 1120.00

PRODUCT Product# Description Qty. on Hand Unit Price

P005 5 GPM Pump 456 78.98


P110 10 GPM Pump 100 178.89
P120 20 GPM Pump 50 278.98
M010 10 HP Motor 8 767.00
M075 75 HP Motor 5 1150.00 15
Database Systems (Spring 2011) - Naveed Anwer Butt @UOG
Databases
 Web indexes  Train timetable
 Library catalogues  Airline bookings
 Medical records  Credit card details
 Bank accounts  Student records
 Stock control
 Customer histories
 Personnel systems
 Stock market prices
 Product catalogues
 Telephone directories  And so on….

16
Database Systems (Spring 2011) - Naveed Anwer Butt @UOG
Types of Files
 Master File
“A master file is a relatively permanent file relating to a
standard. The records changes less frequently. “
Example:Customers, student’s, employee’s

 Table File
“A table file contains references data used by information
system.These are relatively permanent. Updated by
periodically.”
Example: Tax table, postage rate tables, department code file
Transaction File:
It contains records reflect day-to-day activities.These are
temporarily files.
Example: New employees, patient release, cash receipt,
commission and customer payments
17
Database Systems (Spring 2011) - Naveed Anwer Butt @UOG
 Security File

“Is a file that is created and saved for backup and recovery
purposes. New security files must be created periodically to
replace old, outdated security files.”
 History File
“Is a file created and saved historical reasons. Don’t replace
old files; usually both the old and new history files are
saved.”

18
Database Systems (Spring 2011) - Naveed Anwer Butt @UOG
File-Based Approach
 A collection of application programs that perform
services for the end-users such as the production of
reports. Each program defines and manages its own
data.

19
Database Systems (Spring 2011) - Naveed Anwer Butt @UOG
What is File Processing Systems
File: a collection of related information defined by its creator.
Physical file: a file actually exists in a storage devise.
( a collection of bites, as seen by the operating system.)
Logical file: a file viewed by users and programs.
( a collection of records.)
A file management system, usually within the operating system, is
used to efficiently access physical files stored in the secondary storage
devices.
Functions: create, updates, retrieval
Examples: Hard copy registers/folders,bill folder, tax folder

20
Database Systems (Spring 2011) - Naveed Anwer Butt @UOG
Database Systems (Spring 2011) - Naveed Anwer Butt @UOG 21
22
Database Systems (Spring 2011) - Naveed Anwer Butt @UOG
Figure Three file processing systems

23
Database Systems (Spring 2011) - Naveed Anwer Butt @UOG
Disadvantages of File Processing
• Program-Data Dependence
– All programs maintain metadata for each file they use
• Data Redundancy (Duplication of data)
– Different systems/programs have separate copies of the
same data
• Limited Data Sharing
– No centralized control of data
• Lengthy Development Times
– Programmers must design their own file formats
• Excessive Program Maintenance
– 80% of of information systems budget 24
Database Systems (Spring 2011) - Naveed Anwer Butt @UOG
Figure 1-2 Three file processing systems

Duplicate
Data

25
Database Systems (Spring 2011) - Naveed Anwer Butt @UOG
Disadvantages File Management
Systems
Uncontrolled redundancy
Inconsistent data
Inflexibility

Limited data sharing


Poor enforcement of standards
Excessive program maintenance
Excessive data maintenance
File formatting issues
Recovery 26
Database Systems (Spring 2011) - Naveed Anwer Butt @UOG
Accounts Department

Empno Name Job Salary Join-Date Deptno Dept-


name
100 Allen Manager 4500 25-Jan-89 3 Marketing
101 John Analyst 3000 13-Mar-92 2 Research
102 Diane Clerk 2000 04-Jul-94 1 Sales
103 Adam Clerk 2000 15-Mar-93 2 Research

Human Resources Department (HRD)

Name Address Tel-No join-Date Birth- Designati Salary


Date on
Allen Aaa 1234 25-Jan-89 25-Jan-49 Manager 4500

John bbb 2345 13-Mar-92 13-Mar-52 Analyst 3000

Diane ccc 3456 04-Jul-94 04-Jul-74 Clerk 2000


27
Database Systems (Spring 2011) - Naveed Anwer Butt @UOG
Problems with Data Dependency
 Each application programmer must maintain
their own data
 Each application program needs to include
code for the metadata of each file
 Each application program must have its own
processing routines for reading, inserting,
updating and deleting data
 Lack of coordination and central control
 Non-standard file formats

28
Database Systems (Spring 2011) - Naveed Anwer Butt @UOG
Problems with Data
Redundancy
• Waste of space to have duplicate data
• Causes more maintenance headaches
• The biggest Problem:
– When data changes in one file, could
cause inconsistencies
– Compromises data integrity

29
Database Systems (Spring 2011) - Naveed Anwer Butt @UOG
SOLUTION:
The DATABASE Approach
• Central repository of shared data
• Data is managed by a controlling
agent
• Stored in a standardized,
convenient form
Requires a Database Management System (DBMS)

30
Database Systems (Spring 2011) - Naveed Anwer Butt @UOG
Database Systems
A database system Database systems
Consists of Allow users to
 Data(The database)  Store
 Software  Update
 Hardware  Retrieve
 Users  Organize

We focus mainly on  Protect


the software their data

The database and DBMS software together make up


what is known as the Database System

31
Database Systems (Spring 2011) - Naveed Anwer Butt @UOG
Database Management
System
• A DBMS is a data storage and retrieval
system which permits data to be stored non-
redundantly while making it appear to the
user as if the data is well-integrated.
Collection of programs that
 allows users to create a new database and

specify its structure


 gives users the ability to query and modify
the data efficiently
 keeps the data secure from accidents or
unauthorized use
 controls the access to the data for many users
at once
32
Database Systems (Spring 2011) - Naveed Anwer Butt @UOG
DBMS is a tool to ease the construction of database

According to Oxford dictionary:

“ A software system that facilitate the


creation and maintenance and use of an
electronic database.”

33
Database Systems (Spring 2011) - Naveed Anwer Butt @UOG
Database Management System
Application
#1

Application
#2

DBMS Database
containing
centralized
shared data

Application DBMS manages data


#3
resources like an operating
system manages hardware
resources

34
Database Systems (Spring 2011) - Naveed Anwer Butt @UOG
Advantages of Database Approach
• Program-Data Independence
– Metadata stored in DBMS, so applications don’t need to
worry about data formats
– Data queries/updates managed by DBMS so programs
don’t need to process data access routines
– Results in: increased application development and
maintenance productivity
• Minimal Data Redundancy
– Leads to increased data integrity/consistency

35
Database Systems (Spring 2011) - Naveed Anwer Butt @UOG
Advantages of Database Approach
• Improved Data Sharing
– Different users get different views of the data
• Enforcement of Standards
– All data access is done in the same way
• Improved Data Quality
– Constraints, data validation rules
• Better Data Accessibility/ Responsiveness
– Use of standard data query language (SQL)
• Security, Backup/Recovery, Concurrency
– Disaster recovery is easier

36
Database Systems (Spring 2011) - Naveed Anwer Butt @UOG
Disadvantages of DBMSs

 Complexity
 Size
 Cost of DBMS
 Additional hardware costs
 Cost of conversion
 Performance
 Higher impact of a failure

Pearson Education © 2009


Costs and Risks of the
Database Approach
• Up-front costs:
– Installation Management Cost and
Complexity
– Conversion Costs
• Ongoing Costs
– Requires New, Specialized Personnel
– Need for Explicit Backup and Recovery
• Organizational Conflict
– Old habits die hard

38
Database Systems (Spring 2011) - Naveed Anwer Butt @UOG
Figure 1-10
Components of
the database
environment

39
Database Systems (Spring 2011) - Naveed Anwer Butt @UOG
Components of the
Database Environment
• CASE Tools – computer-aided software engineering
• Repository – centralized storehouse of metadata
• Database Management System (DBMS) – software for
managing the database
• Database – storehouse of the data
• Application Programs – software using the data
• User Interface – text and graphical displays to users
• Data Administrators – personnel responsible for
maintaining the database
• System Developers – personnel responsible for
designing databases and software
• End Users – people who use the applications and
databases
40
Database Systems (Spring 2011) - Naveed Anwer Butt @UOG
Components of DBMS Environment

Das könnte Ihnen auch gefallen