You are on page 1of 38

PHYSICAL

DATABASE
DESIGN &
PERFORMANCE

THE PHYSICAL
DATABASE DESIGN
PROCESS
Romar V. San Juan

Physical Database Design


Purpose:
translate the logical description of data into the technical
specifications for storing and retrieving data
Goal:
create a design for storing data that will provide adequate
performance and ensure database integrity, security, and recoverability

Physical Design Process


Inputs
Normalized
Volume

Decisions

relations

Attribute

estimates

Attribute

Physical

record
descriptions (doesnt always
match logical design)

definitions

Response

time
expectations
Data

security needs

Backup/recovery
Integrity
DBMS

data types

needs

expectations

technology used

Leads to

File

organizations

Indexes

and database
architectures
Query

optimization

Physical Design for


Regulatory Compliance
Sarbanes- Oxley Act (SOX)
Committee of Sponsoring Organizations (COSO) of the Treadway
Commission
IT Infrastructure Library (ITIL)
Control Objectives for Information and Related Technology (COBIT)
Regulations and standards that impact physical design decisions

Sarbanes- Oxley Act (SOX)


Major Elements:
Public Company Accounting Oversight Board (PCAOB)
Auditor Independence
o Corporate Responsibility
o Enhanced Financial Disclosures
o Analyst Conflicts of Interest
o Commission Resources and Authority
o Studies and Reports
o Corporate and Criminal Fraud Accountability
o White Collar Crime Penalty Enhancement
o Corporate Tax Returns
o Corporate Fraud Accountability

Committee of Sponsoring
Organizations (COSO) of the
Treadway Commission
Is a joint initiative to combat corporate fraud. It was
established in the United States by five private
sector organizations, dedicated to guide executive
management and governance entities on relevant
aspects of organizational governance, business
ethics, internal control, enterprise risk management,
fraud, and financial reporting.

IT Infrastructure Library
(ITIL)
Is designed to standardize the selection, planning,
delivery and support of IT services to a business. The
goal is to improve efficiency and achieve predictable
service levels. The ITIL framework enables IT to be a
business service partner, rather than just back-end
support. ITIL guidelines and best practices align IT
actions and expenses to business needs and change
them as the business grows or shifts direction.

Control Objectives for Information and


Related Technology (COBIT)

Is
a
good-practice
framework
created
by
international professional association ISACA for
information technology (IT) management and IT
governance. COBIT provides an implementable "set
of controls over information technology and
organizes them around a logical framework of ITrelated processes and enablers."

DATA VOLUME AND USAGE


ANALYSIS
For example, there are 3,000 PARTs in this database. The
super type PART has two sub types, MANUFACTURED (40
percent of all PARTs are manufactured) and PURCHASED (70
percent are purchased; because some PARTs are both sub
types, the percentages sum to more than 100 percent). The
analysis at Pine Valley estimate that there are typically 150
SUPPLIERs, and Pine Valley receives, on average, 40
SUPPLIES instances from each SUPPLIER, yielding a total of
6,000 SUPPLIES. The dashed arrows represent access
frequencies. So, for example, across all applications that use
this database, there are on average 20,000 accesses per
hour of PART data, and these yield, based on sub type
percentage, 14,000 accesses per hour to PURCHASED PART

Composite usage map


(Pine Valley Furniture Company)

Composite usage map


(Pine Valley Furniture Company)

Data volumes

Composite usage map


(Pine Valley Furniture Company)

Access Frequencies
(per hour)

Composite usage map


(Pine Valley Furniture Company
Usage analysis:
14,000 purchased parts
accessed per hour
8000 quotations accessed
from these 140 purchased part
accesses
7000 suppliers accessed from
these 8000 quotation accesses

Composite usage map


(Pine Valley Furniture Company)
Usage analysis:
7500 suppliers accessed per
hour
4000 quotations accessed
from these 7500 supplier
accesses
4000 purchased parts
accessed from these 4000
quotation accesses

DESIGNING FIELDS
Francesca B. Villasanta

Field
Smallest unit of application data recognized by system software
Corresponds to a simple attribute in the logical data model
Represents a single component

Field
Name

Fiel
d

Basic Database Field


Concerns
Field Data Type
Data Integrity Controls
Handling Missing Values

Choosing Data Types


Data Type is a detailed coding scheme recognized by system
software, such as a DBMS, for representing organizational data
The space to store data and the speed required to access data are of
consequence in physical database design.
Data type choice available differ depending on the DBMS used.

Choosing Data Types


FOUR OBJECTIVES IN SELECTING:
1.

Represent all possible values

2.

Improve data integrity

3.

Support all data manipulations

4.

Minimize storage space

Choosing Data Types


Some of the data types available in MySQL:
DATA TYPE

DESCRIPTION

INT

A 4-byte integer; signed range is -2,147,483,648 to


2,147,483,647; unsigned range is 0 to 4,294,967,295

VARCHAR

A variable-length (0-65,535) string, the effective maximum


length is subject to the maximum row size

CHAR

A fixed-length (0-255, default 1) string that is always rightpadded with spaces to the specified length when stored

DATE

A date, supported range is 1000-01-01 to 9999-12-31

TIMESTAMP

A timestamp, range is 1970-01-01 00:00:01 UTC to 2038-0109 03:14:07 UTC, stored as the number of seconds since the
epoch (1970-01-01 00:00:00 UTC)

Field Data
Type

Controlling Data Integrity


TYPICAL INTEGRITY CONTROLS SUPPORTED BY DBMS:
Default Value
Range Control
Null Value Control
Referential Integrity

Controlling Data Integrity


DEFAULT VALUE

Controlling Data Integrity


REFERENTIAL INTEGRITY

REFERENTIAL INTEGRITY

Handling Missing Data


When a field may be null, simply entering no value may be sufficient.
Missing data are inevitable
OPTIONS :
Using a default value
Not permitting missing (null) values
Substitute an estimate of the missing value
Track missing data
Perform sensitivity testing

DENORMALIZING
AND PARTITIONING
DATA
Martin John R. Lopez

DBMS have and increasingly important


role in determining how the data are
actually stored in storage media

DENORMALIZATION
The process of transforming
normalized relations into nonnormalize physical record.

OPPORTUNITIES FOR AND


TYPES OF DENORMALIZATION
Two Entities with a one-to-one
relationship
A many to many relationship with a
monkey attribute
Reference Data

PARTITIONING
Horizontal Partitioning implements a
logical relation as multiple physical tables
by placing different rows into different
tables, based on common values.
Vertical Partitioning distributes the
columns of a logical relation into separate
tables, repeating the primary key in each
table.

DATA DISTRIBUTION
METHODS AS BASIC
PARTITIONING APPROACHES
1. Range Partitioning
2. Hash Partitioning
3. List Partitioning

ADVANTAGES OF
PARTITIONING
-Efficiency
-Local Optimization
-Security
-Recovery and Uptime
-Load Balancing

DISADVANTAGES OF
PARTITIONING
-Inconsistent Access Speed
-Complexity
-Extra Space and Update Time

You might also like