SlideShare a Scribd company logo
1 of 36
1
© Prentice Hall, 2002
Chapter 6:Chapter 6:
Physical Database DesignPhysical Database Design
and Performanceand Performance
Modern Database Management
6th
Edition
Jeffrey A. Hoffer, Mary B. Prescott, Fred R.
McFadden
2Chapter 6 © Prentice Hall,
The Physical Design Stage of SDLCThe Physical Design Stage of SDLC
(figures 2.4, 2.5 revisited)(figures 2.4, 2.5 revisited)
Project Identification
and Selection
Project Initiation
and Planning
Analysis
Physical Design
Implementation
Maintenance
Logical Design
Purpose –develop technology specs
Deliverable – pgm/data structures,
technology purchases, organization
redesigns
Database activity –
physical database design
3Chapter 6 © Prentice Hall,
Physical Database DesignPhysical 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
insure database integrity, security and
recoverability
4Chapter 6 © Prentice Hall,
Physical Design ProcessPhysical Design Process
Normalized relations
Volume estimates
Attribute definitions
Response time expectations
Data security needs
Backup/recovery needs
Integrity expectations
DBMS technology used
Inputs
Attribute data types
Physical record descriptions
(doesn’t always match logical
design)
File organizations
Indexes and database
architectures
Query optimization
Leads to
Decisions
5Chapter 6 © Prentice Hall,
Figure 6.1 - Composite usage map
(Pine Valley Furniture Company)
6Chapter 6 © Prentice Hall,
Figure 6.1 - Composite usage map
(Pine Valley Furniture Company)
Data volumes
7Chapter 6 © Prentice Hall,
Figure 6.1 - Composite usage map
(Pine Valley Furniture Company)
Access Frequencies
(per hour)
8Chapter 6 © Prentice Hall,
Figure 6.1 - Composite usage map
(Pine Valley Furniture Company)
Usage analysis:
200 purchased parts accessed
per hour 
80 quotations accessed from
these 200 purchased part
accesses 
70 suppliers accessed from
these 80 quotation accesses
9Chapter 6 © Prentice Hall,
Figure 6.1 - Composite usage map
(Pine Valley Furniture Company)
Usage analysis:
75 suppliers accessed per hour

40 quotations accessed from
these 75 supplier accesses 
40 purchased parts accessed
from these 40 quotation
accesses
10Chapter 6 © Prentice Hall,
Designing FieldsDesigning Fields
Field: smallest unit of data in
database
Field design
– Choosing data type
– Coding, compression, encryption
– Controlling data integrity
11Chapter 6 © Prentice Hall,
Choosing Data TypesChoosing Data Types
CHAR – fixed-length character
VARCHAR2 – variable-length character
(memo)
LONG – large number
NUMBER – positive/negative number
DATE – actual date
BLOB – binary large object (good for
graphics, sound clips, etc.)
12Chapter 6 © Prentice Hall,
Figure 6.2
Example code-look-up table (Pine Valley Furniture Company)
Code saves space, but
costs an additional lookup
to obtain actual value.
13Chapter 6 © Prentice Hall,
Field Data IntegrityField Data Integrity
 Default value - assumed value if no explicit
value
 Range control – allowable value limitations
(constraints or validation rules)
 Null value control – allowing or prohibiting
empty fields
 Referential integrity – range control (and null
value allowances) for foreign-key to primary-
key match-ups
14Chapter 6 © Prentice Hall,
Handling Missing DataHandling Missing Data
Substitute an estimate of the missing value
(e.g. using a formula)
Construct a report listing missing values
In programs, ignore missing data unless the
value is significant
Triggers can be used to perform these operations
15Chapter 6 © Prentice Hall,
Physical RecordsPhysical Records
Physical Record: A group of fields stored in
adjacent memory locations and retrieved
together as a unit
Page: The amount of data read or written in
one I/O operation
Blocking Factor: The number of physical
records per page
16Chapter 6 © Prentice Hall,
DenormalizationDenormalization
 Transforming normalized relations into unnormalized physical
record specifications
 Benefits:
– Can improve performance (speed) be reducing number of table lookups
(i.e reduce number of necessary join queries)
 Costs (due to data duplication)
– Wasted storage space
– Data integrity/consistency threats
 Common denormalization opportunities
– One-to-one relationship (Fig 6.3)
– Many-to-many relationship with attributes (Fig. 6.4)
– Reference data (1:N relationship where 1-side has data not used in any
other relationship) (Fig. 6.5)
17Chapter 6 © Prentice Hall,
Fig 6.5 –
A possible
denormalization
situation:
reference data
Extra table
access
required
Data duplication
18Chapter 6 © Prentice Hall,
PartitioningPartitioning
 Horizontal Partitioning: Distributing the rows of a table
into several separate files
– Useful for situations where different users need access to different
rows
– Three types: Key Range Partitioning, Hash Partitioning, or
Composite Partitioning
 Vertical Partitioning: Distributing the columns of a table
into several separate files
– Useful for situations where different users need access to different
columns
– The primary key must be repeated in each file
 Combinations of Horizontal and Vertical
Partitions often correspond with User Schemas (user views)
19Chapter 6 © Prentice Hall,
PartitioningPartitioning
Advantages of Partitioning:
– Records used together are grouped together
– Each partition can be optimized for performance
– Security, recovery
– Partitions stored on different disks: contention
– Take advantage of parallel processing capability
Disadvantages of Partitioning:
– Slow retrievals across partitions
– Complexity
20Chapter 6 © Prentice Hall,
Data ReplicationData Replication
Purposely storing the same data in multiple
locations of the database
Improves performance by allowing multiple
users to access the same data at the same
time with minimum contention
Sacrifices data integrity due to data
duplication
Best for data that is not updated often
21Chapter 6 © Prentice Hall,
Designing Physical FilesDesigning Physical Files
 Physical File:
– A named portion of secondary memory allocated for
the purpose of storing physical records
 Constructs to link two pieces of data:
– Sequential storage.
– Pointers.
 File Organization:
– How the files are arranged on the disk.
 Access Method:
– How the data can be retrieved based on the file
organization.
22Chapter 6 © Prentice Hall,
Figure 6-7 (a)
Sequential file
organization
If not sorted
Average time to find
desired record = n/2.
1
2
n
 Records of the
file are stored
in sequence by
the primary key
field values.
If sorted –
every insert or
delete requires
resort
23Chapter 6 © Prentice Hall,
Indexed File OrganizationsIndexed File Organizations
 Index – a separate table that contains organization
of records for quick retrieval
 Primary keys are automatically indexed
 Oracle has a CREATE INDEX operation, and MS
ACCESS allows indexes to be created for most
field types
 Indexing approaches:
– B-tree index, Fig. 6-7b
– Bitmap index, Fig. 6-8
– Hash Index, Fig. 6-7c
– Join Index, Fig 6-9
24Chapter 6 © Prentice Hall,
Fig. 6-7b – B-tree index
uses a tree search
Average time to find desired
record = depth of the tree
Leaves of the tree
are all at same
level 
consistent access
time
25Chapter 6 © Prentice Hall,
Fig 6-7c
Hashed file or
index
organization
Hash algorithm
Usually uses division-
remainder to determine
record position. Records
with same position are
grouped in lists.
26Chapter 6 © Prentice Hall,
Fig 6-8
Bitmap index
index
organization
Bitmap saves on space requirements
Rows - possible values of the attribute
Columns - table rows
Bit indicates whether the attribute of a row has the values
27Chapter 6 © Prentice Hall,
Fig 6-9 Join Index – speeds up join operations
28Chapter 6 © Prentice Hall,
Clustering FilesClustering Files
 In some relational DBMSs, related records from
different tables can be stored together in the same
disk area
 Useful for improving performance of join
operations
 Primary key records of the main table are stored
adjacent to associated foreign key records of the
dependent table
 e.g. Oracle has a CREATE CLUSTER command
29Chapter 6 © Prentice Hall,
Rules for Using IndexesRules for Using Indexes
1. Use on larger tables
2. Index the primary key of each table
3. Index search fields (fields frequently in
WHERE clause)
4. Fields in SQL ORDER BY and GROUP
BY commands
5. When there are >100 values but not when
there are <30 values
30Chapter 6 © Prentice Hall,
Rules for Using IndexesRules for Using Indexes
6. DBMS may have limit on number of
indexes per table and number of bytes per
indexed field(s)
7. Null values will not be referenced from an
index
8. Use indexes heavily for non-volatile
databases; limit the use of indexes for
volatile databases
Why? Because modifications (e.g. inserts,
deletes) require updates to occur in index files
31Chapter 6 © Prentice Hall,
RAIDRAID
Redundant Array of Inexpensive Disks
A set of disk drives that appear to the user
to be a single disk drive
Allows parallel access to data (improves
access speed)
Pages are arranged in stripes
32Chapter 6 © Prentice Hall,
Figure 6-10 –
RAID with four
disks and
striping
Here, pages 1-4
can be
read/written
simultaneously
33Chapter 6 © Prentice Hall,
Raid Types (Figure 6-11)Raid Types (Figure 6-11)
 Raid 0
– Maximized parallelism
– No redundancy
– No error correction
– no fault-tolerance
 Raid 1
– Redundant data – fault tolerant
– Most common form
 Raid 2
– No redundancy
– One record spans across data
disks
– Error correction in multiple
disks– reconstruct damaged data
 Raid 3
– Error correction in one disk
– Record spans multiple data disks (more
than RAID2)
– Not good for multi-user environments,
 Raid 4
– Error correction in one disk
– Multiple records per stripe
– Parallelism, but slow updates due to
error correction contention
 Raid 5
‒ Rotating parity array
‒ Error correction takes place in same disks as
data storage
‒ Parallelism, better performance than Raid4
34Chapter 6 © Prentice Hall,
DatabaseArchitecturesDatabaseArchitectures
(figure6-12(figure6-12
Legacy
Systems
Current
Technology
Data
Warehouses
35Chapter 6 © Prentice Hall,
Query OptimizationQuery Optimization
Parallel Query Processing
Override Automatic Query Optimization
Data Block Size -- Performance tradeoffs:
– Block contention
– Random vs. sequential row access speed
– Row size
– Overhead
Balancing I/O Across Disk Controllers
36Chapter 6 © Prentice Hall,
Query OptimizationQuery Optimization
Wise use of indexes
Compatible data types
Simple queries
Avoid query nesting
Temporary tables for query groups
Select only needed columns
No sort without index

More Related Content

What's hot

Ch 2 D B Dvlpt Process
Ch 2  D B  Dvlpt  ProcessCh 2  D B  Dvlpt  Process
Ch 2 D B Dvlpt Processguest8fdbdd
 
Physical Database Design & Performance
Physical Database Design & PerformancePhysical Database Design & Performance
Physical Database Design & PerformanceAbdullah Khosa
 
Ch 1 D B Environment
Ch 1  D B  EnvironmentCh 1  D B  Environment
Ch 1 D B Environmentguest8fdbdd
 
Tuning data warehouse
Tuning data warehouseTuning data warehouse
Tuning data warehouseSrinivasan R
 
Module 02 teradata basics
Module 02 teradata basicsModule 02 teradata basics
Module 02 teradata basicsMd. Noor Alam
 
Db2 migration -_tips,_tricks,_and_pitfalls
Db2 migration -_tips,_tricks,_and_pitfallsDb2 migration -_tips,_tricks,_and_pitfalls
Db2 migration -_tips,_tricks,_and_pitfallssam2sung2
 
Chap02: The database Development process
Chap02: The database Development processChap02: The database Development process
Chap02: The database Development processahmed naveed
 
Week 17 slides 1 7 multidimensional, parallel, and distributed database
Week 17 slides 1 7 multidimensional, parallel, and distributed databaseWeek 17 slides 1 7 multidimensional, parallel, and distributed database
Week 17 slides 1 7 multidimensional, parallel, and distributed databaseAnne Lee
 
Etl - Extract Transform Load
Etl - Extract Transform LoadEtl - Extract Transform Load
Etl - Extract Transform LoadABDUL KHALIQ
 
Data Warehouses & Deployment By Ankita dubey
Data Warehouses & Deployment By Ankita dubeyData Warehouses & Deployment By Ankita dubey
Data Warehouses & Deployment By Ankita dubeyAnkita Dubey
 
Migration services (DB2 to Teradata)
Migration services (DB2  to Teradata)Migration services (DB2  to Teradata)
Migration services (DB2 to Teradata)ModakAnalytics
 
Ibm db2 analytics accelerator high availability and disaster recovery
Ibm db2 analytics accelerator  high availability and disaster recoveryIbm db2 analytics accelerator  high availability and disaster recovery
Ibm db2 analytics accelerator high availability and disaster recoverybupbechanhgmail
 
Oracle R12 OBIEE, Better Decisions Faster with Advanced Analytics
Oracle R12 OBIEE, Better Decisions Faster with Advanced AnalyticsOracle R12 OBIEE, Better Decisions Faster with Advanced Analytics
Oracle R12 OBIEE, Better Decisions Faster with Advanced AnalyticsSpiro (Stuart) Patsos
 
Building the DW - ETL
Building the DW - ETLBuilding the DW - ETL
Building the DW - ETLganblues
 
Datastage to ODI
Datastage to ODIDatastage to ODI
Datastage to ODINagendra K
 

What's hot (20)

Ch 2 D B Dvlpt Process
Ch 2  D B  Dvlpt  ProcessCh 2  D B  Dvlpt  Process
Ch 2 D B Dvlpt Process
 
Physical Database Design & Performance
Physical Database Design & PerformancePhysical Database Design & Performance
Physical Database Design & Performance
 
Data warehouse
Data warehouseData warehouse
Data warehouse
 
Ch 1 D B Environment
Ch 1  D B  EnvironmentCh 1  D B  Environment
Ch 1 D B Environment
 
Tuning data warehouse
Tuning data warehouseTuning data warehouse
Tuning data warehouse
 
Module 02 teradata basics
Module 02 teradata basicsModule 02 teradata basics
Module 02 teradata basics
 
Distributed D B
Distributed  D BDistributed  D B
Distributed D B
 
Ch 13 D B Admin
Ch 13  D B  AdminCh 13  D B  Admin
Ch 13 D B Admin
 
Db2 migration -_tips,_tricks,_and_pitfalls
Db2 migration -_tips,_tricks,_and_pitfallsDb2 migration -_tips,_tricks,_and_pitfalls
Db2 migration -_tips,_tricks,_and_pitfalls
 
Chap02: The database Development process
Chap02: The database Development processChap02: The database Development process
Chap02: The database Development process
 
Week 17 slides 1 7 multidimensional, parallel, and distributed database
Week 17 slides 1 7 multidimensional, parallel, and distributed databaseWeek 17 slides 1 7 multidimensional, parallel, and distributed database
Week 17 slides 1 7 multidimensional, parallel, and distributed database
 
Teradata a z
Teradata a zTeradata a z
Teradata a z
 
Etl - Extract Transform Load
Etl - Extract Transform LoadEtl - Extract Transform Load
Etl - Extract Transform Load
 
What is ETL?
What is ETL?What is ETL?
What is ETL?
 
Data Warehouses & Deployment By Ankita dubey
Data Warehouses & Deployment By Ankita dubeyData Warehouses & Deployment By Ankita dubey
Data Warehouses & Deployment By Ankita dubey
 
Migration services (DB2 to Teradata)
Migration services (DB2  to Teradata)Migration services (DB2  to Teradata)
Migration services (DB2 to Teradata)
 
Ibm db2 analytics accelerator high availability and disaster recovery
Ibm db2 analytics accelerator  high availability and disaster recoveryIbm db2 analytics accelerator  high availability and disaster recovery
Ibm db2 analytics accelerator high availability and disaster recovery
 
Oracle R12 OBIEE, Better Decisions Faster with Advanced Analytics
Oracle R12 OBIEE, Better Decisions Faster with Advanced AnalyticsOracle R12 OBIEE, Better Decisions Faster with Advanced Analytics
Oracle R12 OBIEE, Better Decisions Faster with Advanced Analytics
 
Building the DW - ETL
Building the DW - ETLBuilding the DW - ETL
Building the DW - ETL
 
Datastage to ODI
Datastage to ODIDatastage to ODI
Datastage to ODI
 

Similar to The Database Environment Chapter 6

Physical database design(database)
Physical database design(database)Physical database design(database)
Physical database design(database)welcometofacebook
 
Chapter 6 Database SC025 2017/2018
Chapter 6 Database SC025 2017/2018Chapter 6 Database SC025 2017/2018
Chapter 6 Database SC025 2017/2018Fizaril Amzari Omar
 
De-duplicated Refined Zone in Healthcare Data Lake Using Big Data Processing ...
De-duplicated Refined Zone in Healthcare Data Lake Using Big Data Processing ...De-duplicated Refined Zone in Healthcare Data Lake Using Big Data Processing ...
De-duplicated Refined Zone in Healthcare Data Lake Using Big Data Processing ...CitiusTech
 
Databases and Information Management (1).ppt
Databases and Information Management (1).pptDatabases and Information Management (1).ppt
Databases and Information Management (1).pptAlaaShaqfa2
 
Session 6 - Data resources and information management.ppt
Session 6 - Data resources and information management.pptSession 6 - Data resources and information management.ppt
Session 6 - Data resources and information management.pptENRIQUE EGLESIAS
 
MIS-CH6: Foundation of BUsiness Intelligence: Databases & IS
MIS-CH6: Foundation of BUsiness Intelligence: Databases & ISMIS-CH6: Foundation of BUsiness Intelligence: Databases & IS
MIS-CH6: Foundation of BUsiness Intelligence: Databases & ISSukanya Ben
 
Chapter 6 foundations of business intelligence
Chapter 6 foundations of business intelligenceChapter 6 foundations of business intelligence
Chapter 6 foundations of business intelligenceVan Chau
 
2 extreme performance - smaller is better
2   extreme performance - smaller is better2   extreme performance - smaller is better
2 extreme performance - smaller is bettersqlserver.co.il
 
Laudon_MIS13_ch06.ppt
Laudon_MIS13_ch06.pptLaudon_MIS13_ch06.ppt
Laudon_MIS13_ch06.pptanisur_rehman
 
Introduction to Big Data
Introduction to Big DataIntroduction to Big Data
Introduction to Big DataVipin Batra
 
Hadoop - A big data initiative
Hadoop - A big data initiativeHadoop - A big data initiative
Hadoop - A big data initiativeMansi Mehra
 
NIST Big Data Working Group.pdf
NIST Big Data Working Group.pdfNIST Big Data Working Group.pdf
NIST Big Data Working Group.pdfBob Marcus
 
Implementation of Multi-node Clusters in Column Oriented Database using HDFS
Implementation of Multi-node Clusters in Column Oriented Database using HDFSImplementation of Multi-node Clusters in Column Oriented Database using HDFS
Implementation of Multi-node Clusters in Column Oriented Database using HDFSIJEACS
 
SURVEY ON IMPLEMANTATION OF COLUMN ORIENTED NOSQL DATA STORES ( BIGTABLE & CA...
SURVEY ON IMPLEMANTATION OF COLUMN ORIENTED NOSQL DATA STORES ( BIGTABLE & CA...SURVEY ON IMPLEMANTATION OF COLUMN ORIENTED NOSQL DATA STORES ( BIGTABLE & CA...
SURVEY ON IMPLEMANTATION OF COLUMN ORIENTED NOSQL DATA STORES ( BIGTABLE & CA...IJCERT JOURNAL
 

Similar to The Database Environment Chapter 6 (20)

Mis11e ch06
Mis11e ch06Mis11e ch06
Mis11e ch06
 
Physical database design(database)
Physical database design(database)Physical database design(database)
Physical database design(database)
 
Chapter 6 Database SC025 2017/2018
Chapter 6 Database SC025 2017/2018Chapter 6 Database SC025 2017/2018
Chapter 6 Database SC025 2017/2018
 
De-duplicated Refined Zone in Healthcare Data Lake Using Big Data Processing ...
De-duplicated Refined Zone in Healthcare Data Lake Using Big Data Processing ...De-duplicated Refined Zone in Healthcare Data Lake Using Big Data Processing ...
De-duplicated Refined Zone in Healthcare Data Lake Using Big Data Processing ...
 
Databases and Information Management (1).ppt
Databases and Information Management (1).pptDatabases and Information Management (1).ppt
Databases and Information Management (1).ppt
 
Database Part 2
Database Part 2Database Part 2
Database Part 2
 
Session 6 - Data resources and information management.ppt
Session 6 - Data resources and information management.pptSession 6 - Data resources and information management.ppt
Session 6 - Data resources and information management.ppt
 
ADAPTER
ADAPTERADAPTER
ADAPTER
 
MIS-CH6: Foundation of BUsiness Intelligence: Databases & IS
MIS-CH6: Foundation of BUsiness Intelligence: Databases & ISMIS-CH6: Foundation of BUsiness Intelligence: Databases & IS
MIS-CH6: Foundation of BUsiness Intelligence: Databases & IS
 
Chapter 6 foundations of business intelligence
Chapter 6 foundations of business intelligenceChapter 6 foundations of business intelligence
Chapter 6 foundations of business intelligence
 
2 extreme performance - smaller is better
2   extreme performance - smaller is better2   extreme performance - smaller is better
2 extreme performance - smaller is better
 
Big data concepts
Big data conceptsBig data concepts
Big data concepts
 
Dbms
DbmsDbms
Dbms
 
Laudon_MIS13_ch06.ppt
Laudon_MIS13_ch06.pptLaudon_MIS13_ch06.ppt
Laudon_MIS13_ch06.ppt
 
Introduction to Big Data
Introduction to Big DataIntroduction to Big Data
Introduction to Big Data
 
Chap09
Chap09Chap09
Chap09
 
Hadoop - A big data initiative
Hadoop - A big data initiativeHadoop - A big data initiative
Hadoop - A big data initiative
 
NIST Big Data Working Group.pdf
NIST Big Data Working Group.pdfNIST Big Data Working Group.pdf
NIST Big Data Working Group.pdf
 
Implementation of Multi-node Clusters in Column Oriented Database using HDFS
Implementation of Multi-node Clusters in Column Oriented Database using HDFSImplementation of Multi-node Clusters in Column Oriented Database using HDFS
Implementation of Multi-node Clusters in Column Oriented Database using HDFS
 
SURVEY ON IMPLEMANTATION OF COLUMN ORIENTED NOSQL DATA STORES ( BIGTABLE & CA...
SURVEY ON IMPLEMANTATION OF COLUMN ORIENTED NOSQL DATA STORES ( BIGTABLE & CA...SURVEY ON IMPLEMANTATION OF COLUMN ORIENTED NOSQL DATA STORES ( BIGTABLE & CA...
SURVEY ON IMPLEMANTATION OF COLUMN ORIENTED NOSQL DATA STORES ( BIGTABLE & CA...
 

More from Jeanie Arnoco

The Database Environment Chapter 15
The Database Environment Chapter 15The Database Environment Chapter 15
The Database Environment Chapter 15Jeanie Arnoco
 
The Database Environment Chapter 14
The Database Environment Chapter 14The Database Environment Chapter 14
The Database Environment Chapter 14Jeanie Arnoco
 
The Database Environment Chapter 13
The Database Environment Chapter 13The Database Environment Chapter 13
The Database Environment Chapter 13Jeanie Arnoco
 
The Database Environment Chapter 8
The Database Environment Chapter 8The Database Environment Chapter 8
The Database Environment Chapter 8Jeanie Arnoco
 
The Database Environment Chapter 5
The Database Environment Chapter 5The Database Environment Chapter 5
The Database Environment Chapter 5Jeanie Arnoco
 
The Database Environment Chapter 4
The Database Environment Chapter 4The Database Environment Chapter 4
The Database Environment Chapter 4Jeanie Arnoco
 
The Database Environment Chapter 3
The Database Environment Chapter 3The Database Environment Chapter 3
The Database Environment Chapter 3Jeanie Arnoco
 
Introduction to BOOTSTRAP
Introduction to BOOTSTRAPIntroduction to BOOTSTRAP
Introduction to BOOTSTRAPJeanie Arnoco
 
Introduction to programming using Visual Basic 6
Introduction to programming using Visual Basic 6Introduction to programming using Visual Basic 6
Introduction to programming using Visual Basic 6Jeanie Arnoco
 
Hacking and Online Security
Hacking and Online SecurityHacking and Online Security
Hacking and Online SecurityJeanie Arnoco
 
(CAR)Cordillera Administrative Region
(CAR)Cordillera Administrative Region (CAR)Cordillera Administrative Region
(CAR)Cordillera Administrative Region Jeanie Arnoco
 
Quick sort-Data Structure
Quick sort-Data StructureQuick sort-Data Structure
Quick sort-Data StructureJeanie Arnoco
 
Quality Gurus Student
Quality Gurus StudentQuality Gurus Student
Quality Gurus StudentJeanie Arnoco
 
Partnering for Competition: External Partnership
Partnering for Competition: External PartnershipPartnering for Competition: External Partnership
Partnering for Competition: External PartnershipJeanie Arnoco
 
Partnering for Competition:Internal Partnership
Partnering for Competition:Internal PartnershipPartnering for Competition:Internal Partnership
Partnering for Competition:Internal PartnershipJeanie Arnoco
 
CROSBY’S PHILOSOPHY
CROSBY’S PHILOSOPHYCROSBY’S PHILOSOPHY
CROSBY’S PHILOSOPHYJeanie Arnoco
 
Deming’s 14 Points for Management
Deming’s 14 Points for ManagementDeming’s 14 Points for Management
Deming’s 14 Points for ManagementJeanie Arnoco
 
Deming’s PDCA and Constant Learning
Deming’s PDCA and Constant LearningDeming’s PDCA and Constant Learning
Deming’s PDCA and Constant LearningJeanie Arnoco
 

More from Jeanie Arnoco (20)

The Database Environment Chapter 15
The Database Environment Chapter 15The Database Environment Chapter 15
The Database Environment Chapter 15
 
The Database Environment Chapter 14
The Database Environment Chapter 14The Database Environment Chapter 14
The Database Environment Chapter 14
 
The Database Environment Chapter 13
The Database Environment Chapter 13The Database Environment Chapter 13
The Database Environment Chapter 13
 
The Database Environment Chapter 8
The Database Environment Chapter 8The Database Environment Chapter 8
The Database Environment Chapter 8
 
The Database Environment Chapter 5
The Database Environment Chapter 5The Database Environment Chapter 5
The Database Environment Chapter 5
 
The Database Environment Chapter 4
The Database Environment Chapter 4The Database Environment Chapter 4
The Database Environment Chapter 4
 
The Database Environment Chapter 3
The Database Environment Chapter 3The Database Environment Chapter 3
The Database Environment Chapter 3
 
Introduction to BOOTSTRAP
Introduction to BOOTSTRAPIntroduction to BOOTSTRAP
Introduction to BOOTSTRAP
 
Introduction to programming using Visual Basic 6
Introduction to programming using Visual Basic 6Introduction to programming using Visual Basic 6
Introduction to programming using Visual Basic 6
 
Hacking and Online Security
Hacking and Online SecurityHacking and Online Security
Hacking and Online Security
 
(CAR)Cordillera Administrative Region
(CAR)Cordillera Administrative Region (CAR)Cordillera Administrative Region
(CAR)Cordillera Administrative Region
 
Quick sort-Data Structure
Quick sort-Data StructureQuick sort-Data Structure
Quick sort-Data Structure
 
Quality Gurus Student
Quality Gurus StudentQuality Gurus Student
Quality Gurus Student
 
QUALITY STANDARDS
QUALITY STANDARDSQUALITY STANDARDS
QUALITY STANDARDS
 
Partnering for Competition: External Partnership
Partnering for Competition: External PartnershipPartnering for Competition: External Partnership
Partnering for Competition: External Partnership
 
Partnering for Competition:Internal Partnership
Partnering for Competition:Internal PartnershipPartnering for Competition:Internal Partnership
Partnering for Competition:Internal Partnership
 
CROSBY’S PHILOSOPHY
CROSBY’S PHILOSOPHYCROSBY’S PHILOSOPHY
CROSBY’S PHILOSOPHY
 
Juran’s Trilogy
Juran’s TrilogyJuran’s Trilogy
Juran’s Trilogy
 
Deming’s 14 Points for Management
Deming’s 14 Points for ManagementDeming’s 14 Points for Management
Deming’s 14 Points for Management
 
Deming’s PDCA and Constant Learning
Deming’s PDCA and Constant LearningDeming’s PDCA and Constant Learning
Deming’s PDCA and Constant Learning
 

Recently uploaded

Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 

Recently uploaded (20)

Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 

The Database Environment Chapter 6

  • 1. 1 © Prentice Hall, 2002 Chapter 6:Chapter 6: Physical Database DesignPhysical Database Design and Performanceand Performance Modern Database Management 6th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred R. McFadden
  • 2. 2Chapter 6 © Prentice Hall, The Physical Design Stage of SDLCThe Physical Design Stage of SDLC (figures 2.4, 2.5 revisited)(figures 2.4, 2.5 revisited) Project Identification and Selection Project Initiation and Planning Analysis Physical Design Implementation Maintenance Logical Design Purpose –develop technology specs Deliverable – pgm/data structures, technology purchases, organization redesigns Database activity – physical database design
  • 3. 3Chapter 6 © Prentice Hall, Physical Database DesignPhysical 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 insure database integrity, security and recoverability
  • 4. 4Chapter 6 © Prentice Hall, Physical Design ProcessPhysical Design Process Normalized relations Volume estimates Attribute definitions Response time expectations Data security needs Backup/recovery needs Integrity expectations DBMS technology used Inputs Attribute data types Physical record descriptions (doesn’t always match logical design) File organizations Indexes and database architectures Query optimization Leads to Decisions
  • 5. 5Chapter 6 © Prentice Hall, Figure 6.1 - Composite usage map (Pine Valley Furniture Company)
  • 6. 6Chapter 6 © Prentice Hall, Figure 6.1 - Composite usage map (Pine Valley Furniture Company) Data volumes
  • 7. 7Chapter 6 © Prentice Hall, Figure 6.1 - Composite usage map (Pine Valley Furniture Company) Access Frequencies (per hour)
  • 8. 8Chapter 6 © Prentice Hall, Figure 6.1 - Composite usage map (Pine Valley Furniture Company) Usage analysis: 200 purchased parts accessed per hour  80 quotations accessed from these 200 purchased part accesses  70 suppliers accessed from these 80 quotation accesses
  • 9. 9Chapter 6 © Prentice Hall, Figure 6.1 - Composite usage map (Pine Valley Furniture Company) Usage analysis: 75 suppliers accessed per hour  40 quotations accessed from these 75 supplier accesses  40 purchased parts accessed from these 40 quotation accesses
  • 10. 10Chapter 6 © Prentice Hall, Designing FieldsDesigning Fields Field: smallest unit of data in database Field design – Choosing data type – Coding, compression, encryption – Controlling data integrity
  • 11. 11Chapter 6 © Prentice Hall, Choosing Data TypesChoosing Data Types CHAR – fixed-length character VARCHAR2 – variable-length character (memo) LONG – large number NUMBER – positive/negative number DATE – actual date BLOB – binary large object (good for graphics, sound clips, etc.)
  • 12. 12Chapter 6 © Prentice Hall, Figure 6.2 Example code-look-up table (Pine Valley Furniture Company) Code saves space, but costs an additional lookup to obtain actual value.
  • 13. 13Chapter 6 © Prentice Hall, Field Data IntegrityField Data Integrity  Default value - assumed value if no explicit value  Range control – allowable value limitations (constraints or validation rules)  Null value control – allowing or prohibiting empty fields  Referential integrity – range control (and null value allowances) for foreign-key to primary- key match-ups
  • 14. 14Chapter 6 © Prentice Hall, Handling Missing DataHandling Missing Data Substitute an estimate of the missing value (e.g. using a formula) Construct a report listing missing values In programs, ignore missing data unless the value is significant Triggers can be used to perform these operations
  • 15. 15Chapter 6 © Prentice Hall, Physical RecordsPhysical Records Physical Record: A group of fields stored in adjacent memory locations and retrieved together as a unit Page: The amount of data read or written in one I/O operation Blocking Factor: The number of physical records per page
  • 16. 16Chapter 6 © Prentice Hall, DenormalizationDenormalization  Transforming normalized relations into unnormalized physical record specifications  Benefits: – Can improve performance (speed) be reducing number of table lookups (i.e reduce number of necessary join queries)  Costs (due to data duplication) – Wasted storage space – Data integrity/consistency threats  Common denormalization opportunities – One-to-one relationship (Fig 6.3) – Many-to-many relationship with attributes (Fig. 6.4) – Reference data (1:N relationship where 1-side has data not used in any other relationship) (Fig. 6.5)
  • 17. 17Chapter 6 © Prentice Hall, Fig 6.5 – A possible denormalization situation: reference data Extra table access required Data duplication
  • 18. 18Chapter 6 © Prentice Hall, PartitioningPartitioning  Horizontal Partitioning: Distributing the rows of a table into several separate files – Useful for situations where different users need access to different rows – Three types: Key Range Partitioning, Hash Partitioning, or Composite Partitioning  Vertical Partitioning: Distributing the columns of a table into several separate files – Useful for situations where different users need access to different columns – The primary key must be repeated in each file  Combinations of Horizontal and Vertical Partitions often correspond with User Schemas (user views)
  • 19. 19Chapter 6 © Prentice Hall, PartitioningPartitioning Advantages of Partitioning: – Records used together are grouped together – Each partition can be optimized for performance – Security, recovery – Partitions stored on different disks: contention – Take advantage of parallel processing capability Disadvantages of Partitioning: – Slow retrievals across partitions – Complexity
  • 20. 20Chapter 6 © Prentice Hall, Data ReplicationData Replication Purposely storing the same data in multiple locations of the database Improves performance by allowing multiple users to access the same data at the same time with minimum contention Sacrifices data integrity due to data duplication Best for data that is not updated often
  • 21. 21Chapter 6 © Prentice Hall, Designing Physical FilesDesigning Physical Files  Physical File: – A named portion of secondary memory allocated for the purpose of storing physical records  Constructs to link two pieces of data: – Sequential storage. – Pointers.  File Organization: – How the files are arranged on the disk.  Access Method: – How the data can be retrieved based on the file organization.
  • 22. 22Chapter 6 © Prentice Hall, Figure 6-7 (a) Sequential file organization If not sorted Average time to find desired record = n/2. 1 2 n  Records of the file are stored in sequence by the primary key field values. If sorted – every insert or delete requires resort
  • 23. 23Chapter 6 © Prentice Hall, Indexed File OrganizationsIndexed File Organizations  Index – a separate table that contains organization of records for quick retrieval  Primary keys are automatically indexed  Oracle has a CREATE INDEX operation, and MS ACCESS allows indexes to be created for most field types  Indexing approaches: – B-tree index, Fig. 6-7b – Bitmap index, Fig. 6-8 – Hash Index, Fig. 6-7c – Join Index, Fig 6-9
  • 24. 24Chapter 6 © Prentice Hall, Fig. 6-7b – B-tree index uses a tree search Average time to find desired record = depth of the tree Leaves of the tree are all at same level  consistent access time
  • 25. 25Chapter 6 © Prentice Hall, Fig 6-7c Hashed file or index organization Hash algorithm Usually uses division- remainder to determine record position. Records with same position are grouped in lists.
  • 26. 26Chapter 6 © Prentice Hall, Fig 6-8 Bitmap index index organization Bitmap saves on space requirements Rows - possible values of the attribute Columns - table rows Bit indicates whether the attribute of a row has the values
  • 27. 27Chapter 6 © Prentice Hall, Fig 6-9 Join Index – speeds up join operations
  • 28. 28Chapter 6 © Prentice Hall, Clustering FilesClustering Files  In some relational DBMSs, related records from different tables can be stored together in the same disk area  Useful for improving performance of join operations  Primary key records of the main table are stored adjacent to associated foreign key records of the dependent table  e.g. Oracle has a CREATE CLUSTER command
  • 29. 29Chapter 6 © Prentice Hall, Rules for Using IndexesRules for Using Indexes 1. Use on larger tables 2. Index the primary key of each table 3. Index search fields (fields frequently in WHERE clause) 4. Fields in SQL ORDER BY and GROUP BY commands 5. When there are >100 values but not when there are <30 values
  • 30. 30Chapter 6 © Prentice Hall, Rules for Using IndexesRules for Using Indexes 6. DBMS may have limit on number of indexes per table and number of bytes per indexed field(s) 7. Null values will not be referenced from an index 8. Use indexes heavily for non-volatile databases; limit the use of indexes for volatile databases Why? Because modifications (e.g. inserts, deletes) require updates to occur in index files
  • 31. 31Chapter 6 © Prentice Hall, RAIDRAID Redundant Array of Inexpensive Disks A set of disk drives that appear to the user to be a single disk drive Allows parallel access to data (improves access speed) Pages are arranged in stripes
  • 32. 32Chapter 6 © Prentice Hall, Figure 6-10 – RAID with four disks and striping Here, pages 1-4 can be read/written simultaneously
  • 33. 33Chapter 6 © Prentice Hall, Raid Types (Figure 6-11)Raid Types (Figure 6-11)  Raid 0 – Maximized parallelism – No redundancy – No error correction – no fault-tolerance  Raid 1 – Redundant data – fault tolerant – Most common form  Raid 2 – No redundancy – One record spans across data disks – Error correction in multiple disks– reconstruct damaged data  Raid 3 – Error correction in one disk – Record spans multiple data disks (more than RAID2) – Not good for multi-user environments,  Raid 4 – Error correction in one disk – Multiple records per stripe – Parallelism, but slow updates due to error correction contention  Raid 5 ‒ Rotating parity array ‒ Error correction takes place in same disks as data storage ‒ Parallelism, better performance than Raid4
  • 34. 34Chapter 6 © Prentice Hall, DatabaseArchitecturesDatabaseArchitectures (figure6-12(figure6-12 Legacy Systems Current Technology Data Warehouses
  • 35. 35Chapter 6 © Prentice Hall, Query OptimizationQuery Optimization Parallel Query Processing Override Automatic Query Optimization Data Block Size -- Performance tradeoffs: – Block contention – Random vs. sequential row access speed – Row size – Overhead Balancing I/O Across Disk Controllers
  • 36. 36Chapter 6 © Prentice Hall, Query OptimizationQuery Optimization Wise use of indexes Compatible data types Simple queries Avoid query nesting Temporary tables for query groups Select only needed columns No sort without index