Lecture 2 Database Architecture and Life Cycle

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 24

Database Architecture

and
Database Lifecycle
Lecture 2
Overview

• ANSI/SPARC architecture
• Database Design Lifecycle
• Project briefing
• Group presentations for next lecture
Database Architecture
Introduction
• In 1975 ANSI-SPARC proposed a framework
for DBs
– ANSI - American National Standards Institute
– SPARC - Standards Planning and Requirements
Committee
• This framework is a three-level architecture
with:
– Internal level: For systems designers
– Conceptual level: For database designers and
administrators
– External level: For database users
ANSI/SPARC architecture
Internal Schema/Level

• Deals with physical storage of data


– Structure of records on disk - files, pages, blocks
– Indexes and ordering of records
– Used by database system programmers
• describes the files and indexes used.
• A.K.A. physical schema
Internal Schema example

RECORD EMP
LENGTH=44
HEADER: BYTE(5)
OFFSET=0
NAME: BYTE(25)
OFFSET=5
SALARY: FULLWORD
OFFSET=30
DEPT: BYTE(10)
OFFSET=34
Conceptual Level
• Deals with the organisation of the
data as a whole
– Abstractions are used to remove
unnecessary details of the internal level
– Used by DBAs and application
programmers
Conceptual Shema example

CREATE TABLE
Employee (
Name VARCHAR(25),
Salary REAL,
Dept_Name VARCHAR(10));
External Level
• Provides a view of the database tailored to a
user
– Parts of the data may be hidden
– Data is presented in a useful form
– Used by end users and application
programmers
External Schema

Payroll:
String Name
double Salary

Personnel:
char *Name
char *Department
Mappings
• Mappings translate information from one
level to the next
– External/Conceptual
– Conceptual/Internal
• These mappings provide data independence
Data Independence
• Physical data independence
– Changes to internal level shouldn’t
affect conceptual level
• Logical data independence
– Conceptual level changes shouldn’t
affect external levels
Data Independence
 Applications insulated from
how data is structured and
stored.
 Logical data independence: View 1 View 2 View 3

Protection from changes in


logical structure of data. Conceptual Schema

 Physicaldata independence: Physical Schema


Protection from changes in
physical structure of data.
DB
 Q:
Why are these particularly
important for DBMS?
The database design lifecycle
Introduction
• Database design, like any other design follows certain
stages to ensure it is done perfectly
• There are a number of versions of these lifecycles but
we are going to follow the one with the following
stages:
– Requirements analysis
– Database Design
– Evaluation and selection
– Logical Design
– Physical Design
– Implementation
– Testing
– Maintenance
Requirements Analysis
• The most important step in implementing a
database system is to find out what is needed —
What type of a database is required for the
organisation, daily volume of the data, how much
data needs to be stored in the files etc.
• In order to collect all this required information, a
database analyst needs to spend a lot of time
within the organisation talking to people, end
users and getting acquainted with day-to-day
process.
• Findings should then be documented
Database Design
• In this stage the database designers will make a
decision on the database model that is perfectly
suited for the organisation’s requirements.
• The database designers will study the documents
prepared by the analysts in the requirements
analysis stage and then start designing a system
that fulfils the needs.
Evaluation and selection
• Once the data model is designed, the next phase
is to evaluate the diverse database management
systems and choose the one that is perfectly
suited for the requirements of the organisation.
• In order to identify best performing database for
the organisation, end users should be involved in
this phase.
Logical Design
• Once the evaluation and selection phase is completed
successfully, the next step in the database
development life cycle is logical database design.
• The conceptual design is translated into an internal
model in the logical design phase.
Physical Design
• Physical database design is the procedure of selecting
and characterizing the data storage and data access of
the database. The data storage depends on the type
of devices supported by the hardware, the data
access methods and the DBMS.
• Physical design is mainly significant for older database
models like hierarchical and network models. Physical
design is very vital in database development life cycle
and has great significance as a bad design can result in
deprived performance.
Implementation
• In most databases a new database implementation
needs the formation of special storage related
constructs to house the end user tables. These
constructs typically comprise storage group, tables, etc.
• Once the database has been created, the data must be
loaded into the database. The data required to be
converting and migrating to the new database, if the
loaded data is currently stored n a different system or
in a different format.
Testing

• The next phase is testing and performance tuning,


this phase starts soon the data is loaded into the
database.
• In this phase, database is tested and fine-tuned for
performance, integrity, access and security
constraints.
• It is very important that the database
administrators and application programmers work
together during this phase, because testing and
performance tuning happens in parallel.
Maintenance

• Database maintenance phase is very


important and it is one of the ongoing phases
in DDLC. Factors such as new business needs,
new information requirements, acquisition of
new data etc will make it essential to
formulate ongoing changes and improvements
to the existing design.
• The major tasks in this phase include:
database backup and recovery, performance
tuning, design modifications, access
management and audits, usage monitoring,
hardware maintenance, upgradation etc.

You might also like