Академический Документы
Профессиональный Документы
Культура Документы
Database
Management
Systems
Flat-File Environment
User 1
Transactions
Data
Program 1
A,B,C
User 2
Transactions
Program 2
User 3
Transactions
Program 3
X,B,Y
L,B,M
Database Approach
User 1
Transactions
Database
Program 1
User 2
Transactions
Program 2
User 3
Transactions
Program 3
D
B
M
S
A,
B,
C,
X,
Y,
L,
M
Advantages of the
Database Approach
Data sharing/centralize database resolves flat-file problems:
No data redundancy - Data is stored only once, eliminating
data redundancy and reducing storage costs.
Single update - Because data is in only one place, it requires
only a single update procedure, reducing the time and cost of
keeping the database current.
Current values - A change to the database made by any user
yields current data values for all other users.
Task-data independence - As users information needs
expand beyond their immediate domain, the new needs can
be more easily satisfied than under the flat-file approach.
Disadvantages of the
Database Approach
Can be costly to implement
additional hardware, software, storage, and network
resources are required
System Requests
Applications
Transactions
U
S
E
R
S
Database
Administrator
Transactions
Transactions
User
Programs
User
Programs
User
Programs
User Queries
DBMS
Data
Definition
Language
Data
Manipulation
Language
Query
Language
Host
Operating
System
Physical
Database
DBMS Features
User Programs - makes the presence of the DBMS
transparent to the user
Direct Query - allows authorized users to access
data without programming
Application Development - user created
applications
Backup and Recovery - copies database
Database Usage Reporting - captures statistics on
database usage (who, when, etc.)
Database Access - authorizes access to sections of
the database
Query Language
The query capability permits end users
and professional programmers to access
data in the database without the need for
conventional programs.
ANSIs Structured Query Language
(SQL) is a fourth-generation language
that has emerged as the standard query
language.
JOIN
X1
Y1
Y1
Z1
X1
Y1
Z1
X2
Y2
Y2
Z2
X2
Y2
Z2
X3
Y1
Y3
Z3
X3
Y1
Z1
(1:1)
(1:0,M)
(1:M)
(M:M)
Advantages of Relational
Tables
Removes all three anomalies
Various items of interest (customers,
inventory, sales) are stored in separate
tables.
Space is used efficiently.
Very flexible. Users can form ad hoc
relationships.
Steps in Normalization
Table with
repeating groups
Remove
repeating
groups
First normal
form 1NF
Second normal
form 2NF
Third normal
form 3NF
Higher normal
forms
Remove
partial
dependencies
Remove
transitive
dependencies
Remove
remaining
anomalies
Distributed Data
Processing
Central
Site
Site A
Centralized
Database
Site B
Site C
Potential Disadvantages of
DDP
Loss of control
Mismanagement of organization-wide
resources
Hardware and software incompatibility
Redundant tasks and data
Consolidating incompatible tasks
Difficulty attracting qualified personnel
Lack of standards
Data Currency
Occurs in DDP with a centralized database
During transaction processing, the data
will temporarily be inconsistent as a record
is being read and updated.
Database lockout procedures are
necessary to keep IPUs from reading
inconsistent data and from writing over a
transaction being written by another IPU.
Distributed Databases:
Partitioning
Splits the central database into segments that are
distributed to their primary users
Advantages:
users control is increased by having data stored
at local sites
transaction processing response time is improved
the volume of transmitted data between IPUs is
reduced
reduces the potential data loss from a disaster
A,B
E, F
C,D
Locked C, waiting for E
Distributed Databases:
Replication
The duplication of the entire database
for multiple IPUs
This method is effective for situations
with a high degree of data sharing, but
no primary user, and supports read-only
queries.
The data traffic between sites is reduced
considerably.