Beruflich Dokumente
Kultur Dokumente
Design
By
Liyakathunisa
Dept of CS & E,
SJCE, Mysore
Introduction
In this chapter we move from the
theory to the practice of DB design.
The overall DB design activity has to
undergo a systematic process called
design methodology
Information System Life Cycle
Resources that enable the collection, management, control, and
dissemination of information throughout an organization are
called Information System (IS).
Here we examine the typical life cycle of IS and how DB fits into
this life cycle.
The IS life cycle is often called the macro life cycle and the
DB life cycle is referred to as micro life cycle.
- Typical Phases of a Macro
Life-Cycle …
1. Feasibility analysis: Analyzing potential application areas,
costing, and setting priorities among applications.
2. Requirements collection and analysis: Gathering detailed
requirements and specifications from users of the system.
3. Design: Design of DB systems and associated applications.
4. Implementation: IS is implemented, DB loaded and
transactions performed.
5. Validation and testing: The system is tested against
performance criteria and behavior specifications.
6. Deployment, operation, and maintenance: The system is
deployed in real life. As new requirements crop up, they are
passed through all previous phases and later incorporated into
the system.
… - Typical Phases of a Macro
Life-Cycle
Feasibility analysis
Requirements collection and
analysis
Design
Implementation
Validation and testing
Deployment, operation, and
maintenance
- Typical Phases of a Micro
Life-Cycle …
1. System definition: The scope of DB systems, its users, and its
applications are defined.
2. DB Design: At the end of this phase, complete logical and
physical design of the chosen DBMS is ready.
3. DB implementation: Define conceptual, external, internal
database definitions, creating empty DB files.
4. Loading or data conversion: Loading the system data to the
DB system format.
5. Application Conversion: Any software application from a
previous systems are converted into the new system.
6. Testing and validation: The new system is tested and
validated.
7. Operation: The DB system and its applications are put into
operation.
8. Monitoring and maintenance: The system is constantly
monitored and maintained.
… - Typical Phases of a Micro
Life-Cycle
System definition
DB Design
DB implementation
Loading or data conversion
Application Conversion
Testing and validation
Operation
Monitoring and maintenance
- Database Design Process
We will now focus on step 2 of the database application life,
cycle, which is the DB design.
The problem of DB design can be stated as follows:
Design the logical and physical structures of one or more
information.
Satisfy the data requirements of user or application.
Phase 1: Requirements
Collection and Analysis Data Requirements Processing Requirements
Frequencies
Logical schema & Performances
Phase 4: Data Model
view Design Constraints
Mapping
DBMS-Dependent
Internal Schema
Phase 5: Physical Design Design
Transaction &
Phase 6: System DDL Statements Applications
Implementation and Tuning SDL statement implementation
Phase 1: requirement
Collection and Analysis
Before we can effectively design a
database ,we must know and analyze
the expectations of the users and the
intended uses of the DB in as much
detail as possible.
This process is called requirement
collection and analysis.
Phase 2:Conceptual Data Base
Design
The goal of this phase is to produce a
conceptual schema for the database
that is independent of a specific DBMS.
A high level data model such as ER or
EER model is used during this phase.
Phase 3: Choice of DBMS …
Factors affecting the Choice of DBMS
Technical
Type of DBMS (RDBMS, ORDBMS, etc)
Storage structures
User and Programmer interfaces available
Access paths that the DBMS supports
Users and programmer interfaces available
Client-server environment, etc
Cost
Phase 4: Data Model Mapping
Also called logical database design
We map (or transform) the conceptual
from the high level data model used in
phase 2 into the data model of the
chosen DBMS.
Phase 5:Physical Data base
Design
During this phase , we deign the
specifications for the stored database in
terms of physical storage structure,
record placement, and indexes
Corresponds to designing internal
schema in three level DBMS
architecture.
Phase 6: Database system
Implementation and Tuning
During this phase, the database and
application programs are implemented ,
tested and eventually deployed for
service.
Various transactions and applications
are tested individually and then in
conjunction with each other .
Phase 6: Database system
Implementation and Tuning …
This typically reveals opportunities for
physical design , changes, data indexing ,
reorganization , and different placement of
data- an activity referred to as database
tuning.
Tuning is an ongoing activity
A part of system maintenance that continues for
the life cycle of a database as long as the data
base and applications keep evolving and
performance problems are detected.
Physical Database Design
in
Relational Databases
Factors that Influence Physical
Database Design
queries/transactions
To improve the overall throughput of
transactions
An Overview of Database Tuning
in Relational Systems (2)
Statistics internally Statistics obtained
collected in DBMSs: from monitoring:
Size of individual tables Storage statistics
Number of distinct values in a
I/O and device performance
column
statistics
The number of times a
particular query or transaction Query/transaction
is submitted/executed in an processing statistics
interval of time Locking/logging related
The times required for statistics
different phases of query and Index statistics
transaction processing
An Overview of Database Tuning in
Relational Systems (3)
Problems to be considered in tuning:
How to avoid excessive lock contention?
How to minimize overhead of logging and
unnecessary dumping of data?
How to optimize buffer size and scheduling of
processes?
How to allocate resources such as disks, RAM
and processes for most efficient utilization?
An Overview of Database Tuning in
Relational Systems (4)
Tuning Indexes
Reasons to tuning indexes
Certain queries may take too long to run for lack of an index;
Certain indexes may not get utilized at all;
Certain indexes may be causing excessive overhead because the
index is on an attribute that undergoes frequent changes