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

Introduction To Databases (Week 1) : Remedios de Dios Bulos

The document discusses manual filing systems and limitations of file-based database systems used in the pre-computer period to store and manage data records. It notes that in manual filing systems, data was stored in physical files and records were added, updated, deleted, and queried manually. This process was time-consuming, costly, and prone to errors. File-based database systems organized application programs and files, but each program defined and managed its own data, leading to data redundancy.

Uploaded by

Edmar Sta Maria
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views

Introduction To Databases (Week 1) : Remedios de Dios Bulos

The document discusses manual filing systems and limitations of file-based database systems used in the pre-computer period to store and manage data records. It notes that in manual filing systems, data was stored in physical files and records were added, updated, deleted, and queried manually. This process was time-consuming, costly, and prone to errors. File-based database systems organized application programs and files, but each program defined and managed its own data, leading to data redundancy.

Uploaded by

Edmar Sta Maria
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 68

Introduction To Databases

(week 1)
Remedios de Dios Bulos
How
How were
were data
data records
records maintained
maintained
in
in the
the pre-computer
pre-computer period?
period?
Manual Filing System prepared by:RdDB

Projects
Projects Clients
Clients

Products
Products Employees
Employees

Equipment
Equipment Sales
Sales …
Collection
Collectionof
of
related
relateddata
data
At this stage, for purpose of discussion, we
define:

• Database is a collection of related data.


Manual Filing System prepared by:RdDB

What
What does
doesan
an employee
employee
record
recordcontain?
contain?
Clients
Clients

Employee
Employeeid
id

}
Employees
Employees

Name
Name Structure
Structure
Sales
Sales
Address
Address
organization
organization
Position
Position
Manual Filing System prepared by:RdDB

Add
Addaarecord
record

Update
Updateaarecord
record
Projects
Projects Clients
Clients

Delete
Deleteaarecord
record
Products
Products Employees
Employees
Query
Queryaarecord
record
Equipment
Equipment Sales
Sales
Generate
Generatereports
reports
using
using aafile
file
What
Whatdo
doyou
youdo
dowith
with Generate
Generatereports
reports
records?
records? using
using22or
or more
more
files
files
Manual Filing System prepared by:RdDB

Store
Store
Projects
Projects Clients
Clients Update
Update
Query
Query
Products
Products Employees
Employees

Time
Timeconsuming
consuming
Equipment
Equipment Sales
Sales
Costly
Costly

Prone
Proneto
toerrors
errors
Goals of the Course
1. Logical design of a database
2. Implement the logical design
a) Database Schema creation
b) Manipulation of database
i. Add
ii. Delete
iii. Update
iv. Query
How
How can
canaauser
user access
accessthe
the database?
database?

Application
Students
Students
programs
DBMS Courses
Courses

Faculty
Faculty

SQL
Exercise
• Given: IDNo, SName, Degree, GPA
• Required:
– List of students sorted alphabetically and their
corresponding GPAs

– List of students and their GPAs sorted in


descending order (from highest to lowest)
• Implementation: use any programmimg
language you know
Presentation of Exercise Solution
Limitations of File-Based Systems
prepared by:RdDB

File-based system
aacollection
collectionofof application
application
programs
programsthatthatperform
perform
services
servicesfor
for the
theend
end users
users
such
suchasasthe
theproduction
productionofof
reports.
reports. Student
Courses
Faculty

Registrar File
enrollment
EAF

Data
Dataentry
entryof
of Data
Dataentry
entryof
of Generation
Generationof
of
courses
courses enrollment
enrollment EAF
EAF
Student
prepared by:RdDB

File-based system Courses


Faculty

Registrar
File
enrollment
EAF

Data
Dataentry
entryof Data
Each
Each program
program inin the
the
of Dataentry
entryof
of
courses
courses enrollment
enrollment system
system defines
defines and
and
manages
manages its
its own
own data.
data.
struct
structcourse
course [CBS98]
[CBS98]
{{char
charcode[5];
code[5];
char
chardesc[20];
desc[20];
int
intunits
units[3];
[3];
}}
Each
Eachuser
user(with
(withthe
theassistance
assistanceofof
File-based systems
prepared by:RdDB

DP
DPstaff)
staff)defines
definesand
andimplements
implements
(including
(includingstorage
storageand
andcontrol)
control)the
the
files
filesneeded
neededfor foraaspecific
specific
application.
application.[CBS98,
[CBS98,EN94]
EN94]
Student
Registrar File Courses
Faculty
enrollment
EAF

Student
Accounting File Fees
payment of fees
OR

Department File Student


Processing of Courses
grades course Grades
cards Faculty
What
What can
canbe
beobserved?
observed? Data
Dataredundancy
prepared by:RdDB

redundancy
Student System (File-based)
Student
Registrar File Courses
Faculty
enrollment
EAF

Student
Accounting File Fees
payment of fees
OR

Department File Student


Processing of Courses
grades course Grades
cards Faculty
What
What can
canbe
beobserved? Separation
Separation and
prepared by:RdDB

observed? and
Student System (File-based) isolation
isolationof
of data
data

Student
Registrar File Courses
Faculty
enrollment
EAF

Student
Accounting File Fees
payment of fees
OR

Department File Student


Processing of Courses
grades course Grades
cards Faculty
What
What can
can be
beobserved?
observed? Program-data
Program-datadependence
dependence
prepared by:RdDB

Student System (File-based)


struct
structperson
person Student
Registrar File Courses
{{char
charfirst[20];
first[20]; Faculty
char
charmiddle[3];
middle[3]; enrollment
EAF
char
charlast[30];
last[30];
}}employees,
employees,managers;
managers;
Student
Accounting File Fees
payment of fees
OR

Department File Student


Processing of Courses
grades course Grades
cards Faculty
What
What can
can be
beobserved?
observed? Incompatibility
Incompatibility of
of files
filesprepared by:RdDB

Student System (File-based)


COBOL
COBOL Student
Registrar File Courses
Faculty
enrollment
EAF

CC
Student
Accounting File Fees
payment of fees
OR

Department File Student


Processing of Courses
grades course Grades
cards Faculty
What
Whatcan
canbe
beobserved?
observed? Fixed
Fixedqueries;
queries; prepared by:RdDB

Student System (File-based)


proliferation
proliferationof
of application
application
programs
programs
Student
Registrar File Courses
Faculty
enrollment
EAF

Student
Accounting File Fees
payment of fees
OR

Department File Student


Processing of Courses
grades course Grades
cards Faculty
prepared by:RdDB

Limitations of File-Based Systems


• Separation and isolation of data
• Duplication of data
• Program-data dependence
• Incompatibility of files (e.g C vs. COBOL)
• Fixed queries / proliferation of application
programs
prepared by:RdDB

Factors that limit File-Based System

• The definition of data is embedded in the


application programs, rather than being
stored separately and independently.
[CBS98]
• There is no control over the access and
manipulation of data beyond that imposed
by the application programs. [CBS98]
Database Approach
Projects
Projects

Products
Products
Projects
Projects Clients
Clients

Equipment
Equipment
Products
Products Employees
Employees

Clients
Clients
Equipment
Equipment Sales
Sales
Employees
Employees

Sales
Sales
What is a database?
• It is a shared collection of logically coherent
data with some inherent meaning;
• It is designed , built and populated with data
for specific purpose such as meeting the
Departments
Departments information needs of an organization;
• It represents some aspect of the real-world.
Employees
Employees
[EN94]
Projects
Projects • Ex: student database, employee database,
library database, air flights database,
hospital database, etc.

prepared by:RdDB
Departments
Can
Canaauser
user Departments
directly
directlyaccess
access
Employees
aadatabase?
database? Employees

Projects
Projects
Application
program

Departments
Departments
Can
Canaauser
user access
access
Employees
aadatabase
databasethrough
through Employees
an
anapplication
application Projects
Projects
program
programalone?
alone?
How
Howcan
canaauser
useraccess
accessthe
the
database?
database?

Application Departments
Departments
programs
DBMS Employees
Employees

Projects
Projects
What is a DBMS?
• Database Management System
• It is a software system that enables users to :
– define, create and maintain the database
• DDL
• DML
– provide controlled access to this database
• Security
• Integrity
• Concurrency control
• Recovery control
• User-accessible catalogue (description of data)
Solution to Exercise:
Database Approach Using Access
How
How can
can we
we create
createan
an
electronic/computerized
electronic/computerizeddatabase?
database?
Projects
Projects

Products
Products

Projects
Projects Clients
Clients Equipment
Equipment

Products Employees Clients


Clients
Products Employees

Employees
Employees
Equipment
Equipment Sales
Sales

Sales
Sales
Steps in
developing an
DB
Information
System
Steps in developing a DB Information System

• 1st Step: Database / Application Planning


• 2nd Step: System Definition
• 3rd Step: Requirements Gathering and Analysis
• 4th Step: Application and Database Design
• 5th Step: DBMS Selection
• 6th Step: Prototyping
• 7th Step: Implementation
• 8th Step: Data Conversion and Loading
• 9th Step: Testing
• 10th Step: Operational Maintenance
prepared by:RdDB

Components of the DBMS Environment[CBS98]

Procedure People
Hardware Software - data admin
Data - log on
- DBMS - database
- stored data - start/stop
- PC - OS - backup admin
- meta-data
- mainframe - network - handle - DB designer
- schema
- network software failures - application
- application - change programmers
structure - end users
programs
Bridge

Machine Human
prepared by:RdDB

A Simple Database System Environment

DATABASE DBMS Software


SYSTEM Software to
Data
process
Definition
programs/
queries
Application
Programs/
Queries
Software to
access stored
data Database
Can
Can you
you give
give some
some examples
examples of
of
database
database systems?
systems?
• Supermarket
• Credit card
• Travel Agent
• Library
• Insurance
• Hospital
• Bank
• University
prepared by:RdDB

Student Database System

enrollment EAF

payment
DBMS DB
of fees

processing course
official
of grades cards
receipt
prepared by:RdDB

Supermarket Database System

inventory &
oil official
milk price check
receipt

sales update DBMS DB

credit
card check DBMS DB
END …. Thank You!
Application programming with connection to a database

• http://www.configure-all.com/java_access_mysql.php
• http://alperguc.blogspot.com/2008/12/c-ms-access-connectio
n-string-ole-db.html
• http://www.easysoft.com/developer/languages/c/odbc_tutori
al.html
Prepared by: RdDB

Hardware [CBS96]
• Ranges of computer hardware:
– a single personal computer
– a single mainframe
– a network of computers
• Multi-User DBMS Architectures
– Teleprocessing : one computer with a single CPU and a
number of terminals
– File-Server : LAN where the file-server acts as a shared
hard disk drive for the database, and the applications
and DBMS run on each workstation
– Client-Server : the DBMS resides in the server
DBMS
Application Programs Database

Teleprocessing topology
File-Server Workstation 1
DBMS

Workstation 2 Workstation 3

DBMS DBMS
LAN
Request for data Files returned

Database

File-server
Client-Server Client 1

Client 2 Client 3

LAN
Request for data Selected data returned
Database
Server with
DBMS
Software

• DBMS with fourth-generation tools


• Application programs
• Operating System
• Network Software
Data
• Operational data
• Meta-data
• Schema (structure)
Prepared by : RdDB

Procedures
These refer to the instructions and rules that govern the use
and design of the database:
• log on to the DBMS
• use a particular DBMS facility or application program
• start and stop the DBMS
• make a backup copies of the database
• handle hardware or software failures
• change the structure of a table, reorganize the database,
improve performance, archive data to secondary storage
Workers Behind the Scene
• DBMS Designers and Implementers
– Data Administrator
– Database Administrator
– Database Designer
• Logical database designer
• Physical database designer
– Application Programmers
• Tool Developers (e.g. performance monitoring,
graphical interfaces, etc.)
• Operators and Maintenance Personnel
• End Users
prepared by RdDB
• Data Administrator manages the data resource including:
– database planning,
– development and maintenance of standards, policies
and procedures and
– logical database design.
• Database Administrator is responsible for the physical
realization of the database including
– physical design and implementation,
– security and integrity control,
– maintenance of the operational system and
– ensuring satisfactory performance for the applications
and users.
prepared by RdDB

• Database Designers identify the data to store and


choose the proper structures.
• System Analysts and Application Programmers
deal with development of applications for end
users.
• End Users actually access the database contents.
End Users
• Casual end users occasionally access the database, using a
query language.
• Naive or parametric end users use standard queries, due
to consistent needs from the database, using canned
transactions.
• Sophisticated end users are engineers, scientists, business
analysts and those who have complex requirements.
• Stand-alone users maintain personal databases, using
ready-made program packages (e.g. tax package).
prepared by:RdDB

Strengths of Database Systems


• Control of data redundancy
• Promote data consistency
• Sharing of data
• Improved data integrity
• Improved security
Strengths of Database Systems
• Improved data accessibility and
responsiveness
• Increased productivity
• Increased concurrency
• Improved backup and recovery services
prepared by:RdDB

Weaknesses of Database Systems [CBS98]

• Complexity
• Size
• Cost of DBMS
• Additional hardware costs
• Cost of conversion
• Performance
• Higher impact of a failure
Steps in
developing a
DB
Information
System
1st Step: Database / Application Planning

• Defining:
– Purpose of the database project
– Objectives that the target application needs to
accomplish and attain
– Development of standards for the target
application as well as the whole process of
developing the application
2nd Step: System Definition
• Defining:
– Scope and
boundaries of
database application
– The different users of
the system and their
perspective over the
target application
– The connection
between these
perspectives
3rd Step: Requirements Gathering and Analysis

• The most exciting part of the process


• Process of collecting and analyzing information
about the part of organization to be supported by
the database application
• Identify users’ requirements for the DB system
• Identify expected information to be generated
and what sets of data are needed to generate it
• One of the most chaotic if not done properly
3rd Step: Requirements Gathering and Analysis
3rd Step: Requirements Gathering and Analysis
4th Step: Application and Database Design
• For Databases, it goes through 3-stages
– Conceptual Design
– Logical Design (done together with the DBMS
Selection)
– Physical Design

• For Applications, it considers:


– Transactions that will need to be supported
– User interface
5 Step: DBMS Selection
th

• Selection of an appropriate DBMS to


support the database application
6 Step: Prototyping
th

• Building a working model of a database


application
• Purpose:
– to identify features of a system that work well,
or are inadequate;
– to suggest improvements or even new features;
– to clarify the users’ requirements;
– to evaluate feasibility of a particular system
design
7 Step: Implementation
th

• Physical realization of the database and


application designs
– Use DDL to create database schemas and
empty database files
– Use DDL to create any specified user views
– Use 3GL or 4GL to create the application
programs. This will include the database
transactions implemented using the DML,
possibly embedded in a host programming
language
8th Step:
Data Conversion and Loading
• Transferring any existing data into new
database and converting any existing
applications to run on new database
9th Step: Testing
• Process of executing application programs
with intent of finding errors
– Use carefully planned test strategies and
realistic data
– Testing cannot show absence of faults; it can
show only that software faults are present
– Demonstrates that database and application
programs appear to be working according to
requirements
10 Step: Operational Maintenance
th

• Process of monitoring and maintaining


system following installation

You might also like