SlideShare a Scribd company logo
Lecture 6:
Physical Database Design
ISOM3260, Spring 2014
2
Where we are now
• Database environment
– Introduction to database
• Database development process
– steps to develop a database
• Conceptual data modeling
– entity-relationship (ER) diagram; enhanced ER
• Logical database design
– transforming ER diagram into relations; normalization
• Physical database design
– technical specifications of the database
• Database implementation
– Structured Query Language (SQL), Advanced SQL
• Advanced topics
– data and database administration
3
Database development activities during SDLC
4
Physical Database Design
• Physical Database Design Process
• Designing Fields
• Designing Physical Records and Denormalization
• Designing Physical Files
• Choosing Database Architectures
5
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 insure database integrity, security and
recoverability
– balance between efficient storage space and processing
speed
– efficient processing tend to dominate as storage is getting
cheaper
6
Physical Design Process
 Normalized relations
 Volume estimates
 Frequency of use estimates
 Attribute definitions
 Response time expectations
 Data security, backup,
recovery, and integrity
requirements
 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
Key Decisions
7
Composite Usage Map
• To estimate data volume and frequency of use
statistics
• First step in physical database design or last step
in logical database design
• Add notations to the EER diagram
8
Figure 5-1: Composite Usage Map
Note: To estimate size and usage patterns of the database.
9
Figure 5-1: Composite Usage Map
Data volumes
10
Figure 5-1: Composite Usage Map
Access Frequencies
(per hour)
11
Figure 5-1: Composite Usage Map
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
12
Figure 5-1: Composite Usage Map
Usage analysis:
75 suppliers accessed per
hour 
40 quotations accessed from
these 75 supplier accesses 
40 purchased parts accessed
from these 40 quotation
accesses
Note: PURCHASED PART and QUOTATION are candidates for denormalization.
13
Designing Fields
• Field
– smallest unit of data in database
– correspond to a simple attribute from the E-R diagram
• Field design
– choosing data types
– coding techniques
– controlling data integrity
– handling missing values
14
Choosing Data Types
• Correct data type to choose for a field should
– minimize storage space
– represent all possible values
– improve data integrity (eliminate illegal values)
– support all data manipulations
• Examples of data types
– CHAR: fixed-length character
– VARCHAR2: variable-length character
– CLOB: capable of storing up to 4GB (e.g. customer’s comment)
– NUMBER: positive/negative number
– DATE: actual date and time
– BLOB: binary large object (e.g. photograph or sound clip)
15
Coding Techniques
• Some attributes may be very large
• These data are further apart; results in slower
data processing
• Create a code look-up table
16
Figure 5-2: Code look-up table (Pine Valley Furniture Company)
Code saves space, but costs
an additional lookup to
obtain actual value and
additional space for the
look-up table.
Note: Acceptable if Finish field is infrequently used.
17
Controlling Data Integrity
• Control on the possible values a field can assume
– Default value
 value a field will assume unless a user enters an explicit
value for that field
– Range control
 limits the set of permissible values a field can assume
– Null value control
 allowing or prohibiting empty fields
 e.g. primary keys
– Referential integrity
 range control for foreign-key to primary-key match-ups
18
Handling Missing Data
• Substitute an estimate of the missing value
– e.g. using some formula
• Trigger a report listing missing values
• Perform sensitivity analysis
– missing data are ignored unless knowing a value
might be significant
19
Designing Physical Records
• Physical record
– a group of fields stored in adjacent memory locations and
retrieved or written together as a unit by a DBMS
• Sometimes, the normalized relation may not be
converted directly into a physical record
– often all the attributes in a relation are not used together,
and data from different relations are needed together to
produce a report
– efficient processing of data depends on how close together
related data are
20
Denormalization
• Process of transforming normalized relations into unnormalized
physical record specifications
– either by joining files, partitioning files or data replication
• Benefit
– improve processing speed
• Costs
– more storage space needed
– data integrity and inconsistency threats
• Common denormalization opportunities
– e.g. of combining tables to avoid doing joins
– one-to-one relationship
– many-to-many relationship with non-key attributes
– reference data (1:N relationship where 1-side has data not used in any
other relationship)
21
Fig. 5-3: Two entities with a one-to-one relationship
Assume Application_ID is not necessary
but can be included if required.
22
Fig. 5-4: A many-to-many relationship with non-key attributes
Avoids one join operation but
increases data duplication
23
Fig. 5-5:
A possible
denormalization
situation: reference
data
Extra table
access
required
Data duplication
24
Partitioning
• Create more tables
• Horizontal partitioning
– distributing the rows of a table into several separate files
– useful for situations where different users need access to different rows
• Vertical partitioning
– distributing the columns of a table into several separate files
– the primary key must be repeated in each file
– useful for situations where different users need access to different
columns
• Combinations of horizontal and vertical partitioning
– useful for database distributed across multiple computers (distributed
database)
25
Data 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
Figure 5.1 - Composite usage map
Combine into 1 file
Combine into another file
27
Designing Physical Files
• Physical file
– a named portion of secondary memory (e.g. hard disk)
allocated for the purpose of storing physical records
• Basic constructs to link two pieces of data
– sequential storage
 one field or record is stored right after another field or record
– pointers
 a field of data that can be used to locate a related field or record
• File organization
– technique for physically arranging a file on the disk
– three types
 Sequential file organization
 Indexed file organization
 Hashed file organization
28
Fig. 5-7 (a)
Sequential file
organization
1
2
n
Records of the file
are stored in
sequence by the
primary key field
values.
every insert or
delete requires file
to be resorted
Note: Inflexible; not used in database but may be used to backup data from a database.
29
Indexed File Organizations
• More popular is indexed sequential file organization
– the storage of records sequentially with an index that allows
software to locate individual records
• Primary key index
– each index entry points a key value to a unique record
– primary keys are automatically indexed
• Secondary key index
– each index entry points to more than one record
– indexing on a non-primary key field
• Index handled by DBMS
30
Fig. 5-7 (b)
Indexed file
organization
Leaf nodes contain data
records or pointers to each
record
pointer
Root node
31
Fig. 5-7 (c)
Hashed file
organization
Hashing
algorithm
- a routine that converts
a primary key value into
a record address
- typically uses the
technique of dividing
the primary key by a
suitable prime number
and then using the
remainder as the relative
storage position
Address of
each record is
determined
using a
hashing
algorithm
32
DatabaseArchitectures Legacy
Systems
Current
Technology
Data
Warehouse
33
Review Questions
• What is a composite usage map?
• What are the 4 issues in designing fields?
• What are denormalization, partitioning, and data
replication?
• What are the 3 types of file organization?
• What are the types of database architectures?

More Related Content

What's hot

Logical database design and the relational model(database)
Logical database design and the relational model(database)Logical database design and the relational model(database)
Logical database design and the relational model(database)welcometofacebook
 
Lecture 04 normalization
Lecture 04 normalization Lecture 04 normalization
Lecture 04 normalization emailharmeet
 
Degree of relationship set
Degree of relationship setDegree of relationship set
Degree of relationship set
Megha Sharma
 
Object oriented database concepts
Object oriented database conceptsObject oriented database concepts
Object oriented database concepts
Temesgenthanks
 
Indexing and Hashing
Indexing and HashingIndexing and Hashing
Indexing and Hashing
sathish sak
 
Week 3 Classification of Database Management Systems & Data Modeling
Week 3 Classification of Database Management Systems & Data ModelingWeek 3 Classification of Database Management Systems & Data Modeling
Week 3 Classification of Database Management Systems & Data Modeling
oudesign
 
Database Keys
Database KeysDatabase Keys
Database Keys
Forrester High School
 
Data Models
Data ModelsData Models
Data Models
RituBhargava7
 
Data Modeling PPT
Data Modeling PPTData Modeling PPT
Data Modeling PPT
Trinath
 
Dbms relational model
Dbms relational modelDbms relational model
Dbms relational model
Chirag vasava
 
1. Introduction to DBMS
1. Introduction to DBMS1. Introduction to DBMS
1. Introduction to DBMSkoolkampus
 
Entity Relationship Diagrams
Entity Relationship DiagramsEntity Relationship Diagrams
Entity Relationship Diagrams
sadique_ghitm
 
Data models
Data modelsData models
Data models
Usman Tariq
 
Fundamentals of Database ppt ch01
Fundamentals of Database ppt ch01Fundamentals of Database ppt ch01
Fundamentals of Database ppt ch01Jotham Gadot
 
Database administrator
Database administratorDatabase administrator
Database administratorTech_MX
 
Relational Database Design
Relational Database DesignRelational Database Design
Relational Database Design
Archit Saxena
 
Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
Prateek Parimal
 
Database backup and recovery
Database backup and recoveryDatabase backup and recovery
Database backup and recovery
Anne Lee
 
Types Of Keys in DBMS
Types Of Keys in DBMSTypes Of Keys in DBMS
Types Of Keys in DBMS
PadamNepal1
 

What's hot (20)

Logical database design and the relational model(database)
Logical database design and the relational model(database)Logical database design and the relational model(database)
Logical database design and the relational model(database)
 
Lecture 04 normalization
Lecture 04 normalization Lecture 04 normalization
Lecture 04 normalization
 
Degree of relationship set
Degree of relationship setDegree of relationship set
Degree of relationship set
 
Object oriented database concepts
Object oriented database conceptsObject oriented database concepts
Object oriented database concepts
 
Indexing and Hashing
Indexing and HashingIndexing and Hashing
Indexing and Hashing
 
Week 3 Classification of Database Management Systems & Data Modeling
Week 3 Classification of Database Management Systems & Data ModelingWeek 3 Classification of Database Management Systems & Data Modeling
Week 3 Classification of Database Management Systems & Data Modeling
 
Database Keys
Database KeysDatabase Keys
Database Keys
 
Data Models
Data ModelsData Models
Data Models
 
Data Modeling PPT
Data Modeling PPTData Modeling PPT
Data Modeling PPT
 
Dbms relational model
Dbms relational modelDbms relational model
Dbms relational model
 
1. Introduction to DBMS
1. Introduction to DBMS1. Introduction to DBMS
1. Introduction to DBMS
 
Entity Relationship Diagrams
Entity Relationship DiagramsEntity Relationship Diagrams
Entity Relationship Diagrams
 
Data models
Data modelsData models
Data models
 
DBMS Keys
DBMS KeysDBMS Keys
DBMS Keys
 
Fundamentals of Database ppt ch01
Fundamentals of Database ppt ch01Fundamentals of Database ppt ch01
Fundamentals of Database ppt ch01
 
Database administrator
Database administratorDatabase administrator
Database administrator
 
Relational Database Design
Relational Database DesignRelational Database Design
Relational Database Design
 
Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
 
Database backup and recovery
Database backup and recoveryDatabase backup and recovery
Database backup and recovery
 
Types Of Keys in DBMS
Types Of Keys in DBMSTypes Of Keys in DBMS
Types Of Keys in DBMS
 

Similar to Physical database design(database)

Chapter 9 Data Design .pptxInformation Technology Project Management
Chapter 9 Data Design .pptxInformation Technology Project ManagementChapter 9 Data Design .pptxInformation Technology Project Management
Chapter 9 Data Design .pptxInformation Technology Project Management
AxmedMaxamuudYoonis
 
Rdbms
RdbmsRdbms
Dbms unit 1
Dbms unit 1Dbms unit 1
Dbms unit 1
SaiGupta18
 
database1.pdf
database1.pdfdatabase1.pdf
database1.pdf
prashanna13
 
chapter09-120827115409-phpapp01.pdf
chapter09-120827115409-phpapp01.pdfchapter09-120827115409-phpapp01.pdf
chapter09-120827115409-phpapp01.pdf
AxmedMaxamuud6
 
4- DB Ch6 18-3-2020.pptx
4- DB Ch6 18-3-2020.pptx4- DB Ch6 18-3-2020.pptx
4- DB Ch6 18-3-2020.pptx
Shoaibmirza18
 
Chapter 5 data resource management
Chapter 5  data resource managementChapter 5  data resource management
Chapter 5 data resource management
Advance Saraswati Prakashan Pvt Ltd
 
Ch 7 Physical D B Design
Ch 7  Physical D B  DesignCh 7  Physical D B  Design
Ch 7 Physical D B Designguest8fdbdd
 
Management information system database management
Management information system database managementManagement information system database management
Management information system database management
Online
 
Main MeMory Data Base
Main MeMory Data BaseMain MeMory Data Base
Main MeMory Data BaseSiva Rushi
 
Ch 2-introduction to dbms
Ch 2-introduction to dbmsCh 2-introduction to dbms
Ch 2-introduction to dbms
Rupali Rana
 
UNIT machine learning unit 1,algorithm pdf
UNIT machine learning  unit 1,algorithm pdfUNIT machine learning  unit 1,algorithm pdf
UNIT machine learning unit 1,algorithm pdf
OmarFarooque9
 
01-database-management.pptx
01-database-management.pptx01-database-management.pptx
01-database-management.pptx
dhanajimirajkar1
 
ITE 101 - Week 7
ITE 101 - Week 7ITE 101 - Week 7
ITE 101 - Week 7
Frank Monaco
 
(Dbms) class 1 & 2 (Presentation)
(Dbms) class 1 & 2 (Presentation)(Dbms) class 1 & 2 (Presentation)
(Dbms) class 1 & 2 (Presentation)
Dr. Mazin Mohamed alkathiri
 
Chapter 4 security part ii auditing database systems
Chapter 4 security part ii auditing database systemsChapter 4 security part ii auditing database systems
Chapter 4 security part ii auditing database systems
jayussuryawan
 
Foundations of business intelligence databases and information management
Foundations of business intelligence databases and information managementFoundations of business intelligence databases and information management
Foundations of business intelligence databases and information management
Amity University | FMS - DU | IMT | Stratford University | KKMI International Institute | AIMA | DTU
 
System Analysis And Design
System Analysis And DesignSystem Analysis And Design
System Analysis And Design
Lijo Stalin
 
Business intelligence and data warehouses
Business intelligence and data warehousesBusiness intelligence and data warehouses
Business intelligence and data warehouses
Dhani Ahmad
 
Introduction to Databases by Dr. Kamal Gulati
Introduction to Databases by Dr. Kamal GulatiIntroduction to Databases by Dr. Kamal Gulati

Similar to Physical database design(database) (20)

Chapter 9 Data Design .pptxInformation Technology Project Management
Chapter 9 Data Design .pptxInformation Technology Project ManagementChapter 9 Data Design .pptxInformation Technology Project Management
Chapter 9 Data Design .pptxInformation Technology Project Management
 
Rdbms
RdbmsRdbms
Rdbms
 
Dbms unit 1
Dbms unit 1Dbms unit 1
Dbms unit 1
 
database1.pdf
database1.pdfdatabase1.pdf
database1.pdf
 
chapter09-120827115409-phpapp01.pdf
chapter09-120827115409-phpapp01.pdfchapter09-120827115409-phpapp01.pdf
chapter09-120827115409-phpapp01.pdf
 
4- DB Ch6 18-3-2020.pptx
4- DB Ch6 18-3-2020.pptx4- DB Ch6 18-3-2020.pptx
4- DB Ch6 18-3-2020.pptx
 
Chapter 5 data resource management
Chapter 5  data resource managementChapter 5  data resource management
Chapter 5 data resource management
 
Ch 7 Physical D B Design
Ch 7  Physical D B  DesignCh 7  Physical D B  Design
Ch 7 Physical D B Design
 
Management information system database management
Management information system database managementManagement information system database management
Management information system database management
 
Main MeMory Data Base
Main MeMory Data BaseMain MeMory Data Base
Main MeMory Data Base
 
Ch 2-introduction to dbms
Ch 2-introduction to dbmsCh 2-introduction to dbms
Ch 2-introduction to dbms
 
UNIT machine learning unit 1,algorithm pdf
UNIT machine learning  unit 1,algorithm pdfUNIT machine learning  unit 1,algorithm pdf
UNIT machine learning unit 1,algorithm pdf
 
01-database-management.pptx
01-database-management.pptx01-database-management.pptx
01-database-management.pptx
 
ITE 101 - Week 7
ITE 101 - Week 7ITE 101 - Week 7
ITE 101 - Week 7
 
(Dbms) class 1 & 2 (Presentation)
(Dbms) class 1 & 2 (Presentation)(Dbms) class 1 & 2 (Presentation)
(Dbms) class 1 & 2 (Presentation)
 
Chapter 4 security part ii auditing database systems
Chapter 4 security part ii auditing database systemsChapter 4 security part ii auditing database systems
Chapter 4 security part ii auditing database systems
 
Foundations of business intelligence databases and information management
Foundations of business intelligence databases and information managementFoundations of business intelligence databases and information management
Foundations of business intelligence databases and information management
 
System Analysis And Design
System Analysis And DesignSystem Analysis And Design
System Analysis And Design
 
Business intelligence and data warehouses
Business intelligence and data warehousesBusiness intelligence and data warehouses
Business intelligence and data warehouses
 
Introduction to Databases by Dr. Kamal Gulati
Introduction to Databases by Dr. Kamal GulatiIntroduction to Databases by Dr. Kamal Gulati
Introduction to Databases by Dr. Kamal Gulati
 

More from welcometofacebook

Quantitative exercise-toasty oven
Quantitative exercise-toasty ovenQuantitative exercise-toasty oven
Quantitative exercise-toasty ovenwelcometofacebook
 
EVC exercise-novel motor oil
EVC exercise-novel motor oilEVC exercise-novel motor oil
EVC exercise-novel motor oilwelcometofacebook
 
cltv calculation-calyx corolla
cltv calculation-calyx corolla cltv calculation-calyx corolla
cltv calculation-calyx corolla welcometofacebook
 
competing in a global market(4210)
competing in a global market(4210)competing in a global market(4210)
competing in a global market(4210)welcometofacebook
 
distribution strategies calyx and corolla(4210)
distribution strategies calyx and corolla(4210)distribution strategies calyx and corolla(4210)
distribution strategies calyx and corolla(4210)welcometofacebook
 
distribution strategies(4210)
distribution strategies(4210)distribution strategies(4210)
distribution strategies(4210)welcometofacebook
 
product and brand strategies(4210)
product and brand strategies(4210)product and brand strategies(4210)
product and brand strategies(4210)welcometofacebook
 
overview of marketing strategy(4210)
overview of marketing strategy(4210)overview of marketing strategy(4210)
overview of marketing strategy(4210)welcometofacebook
 
Class+3+ +quantitative+analysis+exercise+answer+key
Class+3+ +quantitative+analysis+exercise+answer+keyClass+3+ +quantitative+analysis+exercise+answer+key
Class+3+ +quantitative+analysis+exercise+answer+keywelcometofacebook
 

More from welcometofacebook (20)

Quantitative exercise-toasty oven
Quantitative exercise-toasty ovenQuantitative exercise-toasty oven
Quantitative exercise-toasty oven
 
EVC exercise-novel motor oil
EVC exercise-novel motor oilEVC exercise-novel motor oil
EVC exercise-novel motor oil
 
jones blair calculations
jones blair calculationsjones blair calculations
jones blair calculations
 
EVC exercise-odi case
EVC exercise-odi caseEVC exercise-odi case
EVC exercise-odi case
 
cltv calculation-calyx corolla
cltv calculation-calyx corolla cltv calculation-calyx corolla
cltv calculation-calyx corolla
 
consumer behavior(4210)
consumer behavior(4210)consumer behavior(4210)
consumer behavior(4210)
 
competing in a global market(4210)
competing in a global market(4210)competing in a global market(4210)
competing in a global market(4210)
 
promotion strategies(4210)
promotion strategies(4210)promotion strategies(4210)
promotion strategies(4210)
 
pricing strategies(4210)
pricing strategies(4210)pricing strategies(4210)
pricing strategies(4210)
 
Pharmasim
PharmasimPharmasim
Pharmasim
 
distribution strategies calyx and corolla(4210)
distribution strategies calyx and corolla(4210)distribution strategies calyx and corolla(4210)
distribution strategies calyx and corolla(4210)
 
distribution strategies(4210)
distribution strategies(4210)distribution strategies(4210)
distribution strategies(4210)
 
the birth of swatch(4210)
the birth of swatch(4210)the birth of swatch(4210)
the birth of swatch(4210)
 
product and brand strategies(4210)
product and brand strategies(4210)product and brand strategies(4210)
product and brand strategies(4210)
 
stp case jones blair(4210)
stp case jones blair(4210)stp case jones blair(4210)
stp case jones blair(4210)
 
stp(4210)
stp(4210)stp(4210)
stp(4210)
 
situational analysis(4210)
situational analysis(4210)situational analysis(4210)
situational analysis(4210)
 
quantitative analysis(4210)
quantitative analysis(4210)quantitative analysis(4210)
quantitative analysis(4210)
 
overview of marketing strategy(4210)
overview of marketing strategy(4210)overview of marketing strategy(4210)
overview of marketing strategy(4210)
 
Class+3+ +quantitative+analysis+exercise+answer+key
Class+3+ +quantitative+analysis+exercise+answer+keyClass+3+ +quantitative+analysis+exercise+answer+key
Class+3+ +quantitative+analysis+exercise+answer+key
 

Recently uploaded

14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
SyedAbiiAzazi1
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
heavyhaig
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTSHeap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Soumen Santra
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
NidhalKahouli2
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
ydteq
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
Aditya Rajan Patra
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
Intella Parts
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
aqil azizi
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
SUTEJAS
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
gestioneergodomus
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
Online aptitude test management system project report.pdf
Online aptitude test management system project report.pdfOnline aptitude test management system project report.pdf
Online aptitude test management system project report.pdf
Kamal Acharya
 
Fundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptxFundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptx
manasideore6
 

Recently uploaded (20)

14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTSHeap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
Online aptitude test management system project report.pdf
Online aptitude test management system project report.pdfOnline aptitude test management system project report.pdf
Online aptitude test management system project report.pdf
 
Fundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptxFundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptx
 

Physical database design(database)

  • 1. Lecture 6: Physical Database Design ISOM3260, Spring 2014
  • 2. 2 Where we are now • Database environment – Introduction to database • Database development process – steps to develop a database • Conceptual data modeling – entity-relationship (ER) diagram; enhanced ER • Logical database design – transforming ER diagram into relations; normalization • Physical database design – technical specifications of the database • Database implementation – Structured Query Language (SQL), Advanced SQL • Advanced topics – data and database administration
  • 4. 4 Physical Database Design • Physical Database Design Process • Designing Fields • Designing Physical Records and Denormalization • Designing Physical Files • Choosing Database Architectures
  • 5. 5 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 insure database integrity, security and recoverability – balance between efficient storage space and processing speed – efficient processing tend to dominate as storage is getting cheaper
  • 6. 6 Physical Design Process  Normalized relations  Volume estimates  Frequency of use estimates  Attribute definitions  Response time expectations  Data security, backup, recovery, and integrity requirements  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 Key Decisions
  • 7. 7 Composite Usage Map • To estimate data volume and frequency of use statistics • First step in physical database design or last step in logical database design • Add notations to the EER diagram
  • 8. 8 Figure 5-1: Composite Usage Map Note: To estimate size and usage patterns of the database.
  • 9. 9 Figure 5-1: Composite Usage Map Data volumes
  • 10. 10 Figure 5-1: Composite Usage Map Access Frequencies (per hour)
  • 11. 11 Figure 5-1: Composite Usage Map 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
  • 12. 12 Figure 5-1: Composite Usage Map Usage analysis: 75 suppliers accessed per hour  40 quotations accessed from these 75 supplier accesses  40 purchased parts accessed from these 40 quotation accesses Note: PURCHASED PART and QUOTATION are candidates for denormalization.
  • 13. 13 Designing Fields • Field – smallest unit of data in database – correspond to a simple attribute from the E-R diagram • Field design – choosing data types – coding techniques – controlling data integrity – handling missing values
  • 14. 14 Choosing Data Types • Correct data type to choose for a field should – minimize storage space – represent all possible values – improve data integrity (eliminate illegal values) – support all data manipulations • Examples of data types – CHAR: fixed-length character – VARCHAR2: variable-length character – CLOB: capable of storing up to 4GB (e.g. customer’s comment) – NUMBER: positive/negative number – DATE: actual date and time – BLOB: binary large object (e.g. photograph or sound clip)
  • 15. 15 Coding Techniques • Some attributes may be very large • These data are further apart; results in slower data processing • Create a code look-up table
  • 16. 16 Figure 5-2: Code look-up table (Pine Valley Furniture Company) Code saves space, but costs an additional lookup to obtain actual value and additional space for the look-up table. Note: Acceptable if Finish field is infrequently used.
  • 17. 17 Controlling Data Integrity • Control on the possible values a field can assume – Default value  value a field will assume unless a user enters an explicit value for that field – Range control  limits the set of permissible values a field can assume – Null value control  allowing or prohibiting empty fields  e.g. primary keys – Referential integrity  range control for foreign-key to primary-key match-ups
  • 18. 18 Handling Missing Data • Substitute an estimate of the missing value – e.g. using some formula • Trigger a report listing missing values • Perform sensitivity analysis – missing data are ignored unless knowing a value might be significant
  • 19. 19 Designing Physical Records • Physical record – a group of fields stored in adjacent memory locations and retrieved or written together as a unit by a DBMS • Sometimes, the normalized relation may not be converted directly into a physical record – often all the attributes in a relation are not used together, and data from different relations are needed together to produce a report – efficient processing of data depends on how close together related data are
  • 20. 20 Denormalization • Process of transforming normalized relations into unnormalized physical record specifications – either by joining files, partitioning files or data replication • Benefit – improve processing speed • Costs – more storage space needed – data integrity and inconsistency threats • Common denormalization opportunities – e.g. of combining tables to avoid doing joins – one-to-one relationship – many-to-many relationship with non-key attributes – reference data (1:N relationship where 1-side has data not used in any other relationship)
  • 21. 21 Fig. 5-3: Two entities with a one-to-one relationship Assume Application_ID is not necessary but can be included if required.
  • 22. 22 Fig. 5-4: A many-to-many relationship with non-key attributes Avoids one join operation but increases data duplication
  • 23. 23 Fig. 5-5: A possible denormalization situation: reference data Extra table access required Data duplication
  • 24. 24 Partitioning • Create more tables • Horizontal partitioning – distributing the rows of a table into several separate files – useful for situations where different users need access to different rows • Vertical partitioning – distributing the columns of a table into several separate files – the primary key must be repeated in each file – useful for situations where different users need access to different columns • Combinations of horizontal and vertical partitioning – useful for database distributed across multiple computers (distributed database)
  • 25. 25 Data 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
  • 26. Figure 5.1 - Composite usage map Combine into 1 file Combine into another file
  • 27. 27 Designing Physical Files • Physical file – a named portion of secondary memory (e.g. hard disk) allocated for the purpose of storing physical records • Basic constructs to link two pieces of data – sequential storage  one field or record is stored right after another field or record – pointers  a field of data that can be used to locate a related field or record • File organization – technique for physically arranging a file on the disk – three types  Sequential file organization  Indexed file organization  Hashed file organization
  • 28. 28 Fig. 5-7 (a) Sequential file organization 1 2 n Records of the file are stored in sequence by the primary key field values. every insert or delete requires file to be resorted Note: Inflexible; not used in database but may be used to backup data from a database.
  • 29. 29 Indexed File Organizations • More popular is indexed sequential file organization – the storage of records sequentially with an index that allows software to locate individual records • Primary key index – each index entry points a key value to a unique record – primary keys are automatically indexed • Secondary key index – each index entry points to more than one record – indexing on a non-primary key field • Index handled by DBMS
  • 30. 30 Fig. 5-7 (b) Indexed file organization Leaf nodes contain data records or pointers to each record pointer Root node
  • 31. 31 Fig. 5-7 (c) Hashed file organization Hashing algorithm - a routine that converts a primary key value into a record address - typically uses the technique of dividing the primary key by a suitable prime number and then using the remainder as the relative storage position Address of each record is determined using a hashing algorithm
  • 33. 33 Review Questions • What is a composite usage map? • What are the 4 issues in designing fields? • What are denormalization, partitioning, and data replication? • What are the 3 types of file organization? • What are the types of database architectures?