SlideShare a Scribd company logo
Institute of Southern Punjab,
Multan
Mr. Muhammad Nouman Farooq
BSC-H (Computer Science)
MS (Telecomm. and Networks)
Honors:
Magna Cumm Laude Honors Degree
Gold Medalist!
Blog Url: noumanfarooqatisp.wordpress.com
E-Mail: noman.iefr@hotmail.com
Advance Database Systems
Lecture# 7
Physical Database Design & Performance
Lecture 7: Physical Database Design & Performance
 Introduction of Physical Database Design Process
 Designing Fields
 Choosing Data Types
 Controlling Data Integrity
 Denormalizing and Partitioning Data
 Designing Physical Database Files
 File Organizations
 Clustering Files
 Indexes
 Optimizing Queries
3
Introduction of Physical Database Design &
Performance
4
 In previous lectures; We have learned how to describe and model
organizational data during the conceptual data modeling and logical
database design phases of the database development process. We
learned how to use EER notation, the relational data model, and
normalization to develop constructs of organizational data that
capture the meaning of data; however, these notations do not
explain how data will be processed or stored.
 The purpose of physical database design is to translate the logical
description of data into the technical specifications for storing and
retrieving data. The goal is to create a design for storing data that
will provide high performance and ensure database integrity,
security, and recoverability. Physical database design does not
include implementing files and databases (i.e., creating them and
loading data)
 Introduction of Physical Database Design
Process
5
6
 The primary goal of physical database design is data processing
efficiency. It is very important for database developer to design the
physical database to minimize the time required by users to interact with
the information system.
 Designing physical files and databases requires certain information that
should have been collected and produced during prior database
development phases. The information needed for physical file and
database design includes these requirements:
• Normalizing Relations to eliminate anomalies
• Definitions of each attribute, along with physical specifications such as
maximum possible length
• Descriptions of where and when data are used: entered, retrieved,
deleted, and updated
• Requirements for response time and data security, backup, recovery
and integrity
• Descriptions of the simulator (database management systems) used for
implementing the database
Introduction of Physical Database Design Process
7
 Physical database design requires several critical decisions that
will affect the integrity and performance of the application system.
These key decisions include the following:
• Choosing the storage format (called data type) for each attribute
from the logical data model. The format and associated
parameters are chosen to minimize storage space and to
maximize data integrity.
• Selecting structures (called indexes and database architectures)
for storing and connecting files to make retrieving related data
more efficient.
• Preparing strategies for handling queries against the database
that will optimize performance and take advantage of the file
organizations and indexes that you have specified.
Continued..
 Designing Fields
8
9
Designing Fields
The basic decisions you must make in specifying each field concern
the type of data (or storage type) used to represent values of this
field, data integrity controls built into the database.
 Choosing Data Types
10
11
Choosing Data Types
 A data type is a detailed coding scheme recognized by system
software, such as a DBMS, for representing organizational data.
 Selecting a data type involves four objectives that will have
different levels of importance for different applications:
1. Minimizing Storage Space
2. Represent all possible Values
3. Improve Data Integrity (only Legal Values allowed as per Field)
4. Support all Data Manipulations
12
13
14
 Some attributes have set of values so large that, given data
volumes, considerable storage space will be consumed. A field with
a limited number of possible values can be translated into a CODE
that requires less space.
 Consider the example of the ProductFinish field illustrated in
Figure 5-2 on next slide. Products at Pine Valley Furniture come in
only a limited number of woods: Birch, Maple, and Oak. By creating
a code or translation table, each ProductFinish field value can be
replaced by a code, a cross-reference to the lookup table, similar to
a foreign key. This will decrease the amount of space for the
ProductFinish field and hence for the PRODUCT file. There will be
additional space for the PRODUCT FINISH lookup table, and when
the ProductFinish field value is needed, an EXTRA ACCESS (called a
JOIN) to this lookup table will be required.
CODING TECHNIQUES
15
 Controlling Data Integrity
16
17
 For many DBMS, data integrity controls (controls on the possible value a
field can assume) can be built into the physical structure of the fields and
controls enforced by the DBMS on those fields.
 The data type enforces one form of data integrity control because it
may limit the type of data (numeric or character) and the length of a field
value.
 Some other typical integrity controls that a DBMS may support are the
following:
1. Default Value:
A default value is the value a field will assume unless a user
enters an explicit value for an instance of that field. Assigning a default
value to a field can reduce data entry time because entry of a value can
be skipped and it can also help to reduce data entry errors for the most
common value. It can be achieved by implementing an Auto-Increment
check on field having data type Integer.
Controlling Data Integrity
18
2. Range Control:
A range control limits the set of allowable
values a field may assume. Range controls must be used with
caution because the limits of the range may change over time. A
combination of range controls and coding led to the Year 2000
problem faced by many Organizations, in which a field for year is
represented by only the numbers 00 to 99.
Continued..
19
3. Null Value Control:
A null value was also defined in previous
lectures as an empty value. Each Primary Key must have an Integrity
control that prohibits a null value. Any other required field may also
have a Null Value control placed on it if that is the policy of the
organization. For example, a university may prohibit adding a
course to its database unless that course has a Title as well as a
value of the Primary Key field CourseID.
Continued..
20
4. Referential Integrity:
The term “Referential Integrity" was also
defined in previous lectures. Referential Integrity on a field is a
form of range control in which the value of that field must exist as
the value in some field in another Row of the same or (most
commonly) different table.
Continued..
 Denormalizing and Partitioning Data
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
 Designing Physical Database Files
40
41
 File Organizations
42
43
44
45
46
47
48
49
50
51
52
53
54
 Clustering Files
55
56
57
58
59
 Indexes
60
61
62
63
64
65
 Optimizing Queries
66
67
68
69
70
71
72
73
74
75
Recommended Readings
Chapter 6 from: -
 Modern Database Management by Jeffrey A. Hoffer, Marry B.
Presscott & Fred R. McFadden; 8th Edition (Page No. 273-319)
Chapter 5 from: -
 Modern Database Management by Jeffrey A. Hoffer, V. Ramesh
& H. Toppi; 10th Edition (Page No. 247-280)
76
Summary of Lecture
77
Lecture 7➦
 Introduction of Physical Database Design Process
 Designing Filed
 Choosing Data Types
 Controlling Data Integrity
 Denormalizing and Partitioning Data
 Designing Physical Database Files
 File Organizations
 Clustering Files
 Indexes
 Optimizing Queries
 END OF LECTURE 7
78

More Related Content

What's hot

Chapter 2 Relational Data Model-part1
Chapter 2 Relational Data Model-part1Chapter 2 Relational Data Model-part1
Chapter 2 Relational Data Model-part1
Eddyzulham Mahluzydde
 
2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMSkoolkampus
 
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
FUNCTION DEPENDENCY  AND TYPES & EXAMPLEFUNCTION DEPENDENCY  AND TYPES & EXAMPLE
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
Vraj Patel
 
Database systems - Chapter 2
Database systems - Chapter 2Database systems - Chapter 2
Database systems - Chapter 2
shahab3
 
Object oriented database concepts
Object oriented database conceptsObject oriented database concepts
Object oriented database concepts
Temesgenthanks
 
Object Oriented Database Management System
Object Oriented Database Management SystemObject Oriented Database Management System
Object Oriented Database Management System
Ajay Jha
 
The Relational Model
The Relational ModelThe Relational Model
The Relational Model
Bhandari Nawaraj
 
Database design
Database designDatabase design
Database design
Jennifer Polack
 
File systems versus a dbms
File systems versus a dbmsFile systems versus a dbms
File systems versus a dbms
RituBhargava7
 
Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity Constraints
madhav bansal
 
Relational Database Design
Relational Database DesignRelational Database Design
Relational Database Design
Archit Saxena
 
Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship ModelSlideshare
 
data modeling and models
data modeling and modelsdata modeling and models
data modeling and models
sabah N
 
1. Introduction to DBMS
1. Introduction to DBMS1. Introduction to DBMS
1. Introduction to DBMSkoolkampus
 
Distributed Database System
Distributed Database SystemDistributed Database System
Distributed Database SystemSulemang
 
Object database standards, languages and design
Object database standards, languages and designObject database standards, languages and design
Object database standards, languages and design
Dabbal Singh Mahara
 
Data Modeling PPT
Data Modeling PPTData Modeling PPT
Data Modeling PPT
Trinath
 
Functional dependencies and normalization
Functional dependencies and normalizationFunctional dependencies and normalization
Functional dependencies and normalizationdaxesh chauhan
 
ER MODEL
ER MODELER MODEL
ER MODEL
Rupali Rana
 
Lecture 01 introduction to database
Lecture 01 introduction to databaseLecture 01 introduction to database
Lecture 01 introduction to databaseemailharmeet
 

What's hot (20)

Chapter 2 Relational Data Model-part1
Chapter 2 Relational Data Model-part1Chapter 2 Relational Data Model-part1
Chapter 2 Relational Data Model-part1
 
2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS
 
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
FUNCTION DEPENDENCY  AND TYPES & EXAMPLEFUNCTION DEPENDENCY  AND TYPES & EXAMPLE
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
 
Database systems - Chapter 2
Database systems - Chapter 2Database systems - Chapter 2
Database systems - Chapter 2
 
Object oriented database concepts
Object oriented database conceptsObject oriented database concepts
Object oriented database concepts
 
Object Oriented Database Management System
Object Oriented Database Management SystemObject Oriented Database Management System
Object Oriented Database Management System
 
The Relational Model
The Relational ModelThe Relational Model
The Relational Model
 
Database design
Database designDatabase design
Database design
 
File systems versus a dbms
File systems versus a dbmsFile systems versus a dbms
File systems versus a dbms
 
Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity Constraints
 
Relational Database Design
Relational Database DesignRelational Database Design
Relational Database Design
 
Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship Model
 
data modeling and models
data modeling and modelsdata modeling and models
data modeling and models
 
1. Introduction to DBMS
1. Introduction to DBMS1. Introduction to DBMS
1. Introduction to DBMS
 
Distributed Database System
Distributed Database SystemDistributed Database System
Distributed Database System
 
Object database standards, languages and design
Object database standards, languages and designObject database standards, languages and design
Object database standards, languages and design
 
Data Modeling PPT
Data Modeling PPTData Modeling PPT
Data Modeling PPT
 
Functional dependencies and normalization
Functional dependencies and normalizationFunctional dependencies and normalization
Functional dependencies and normalization
 
ER MODEL
ER MODELER MODEL
ER MODEL
 
Lecture 01 introduction to database
Lecture 01 introduction to databaseLecture 01 introduction to database
Lecture 01 introduction to database
 

Similar to Physical Database Design & Performance

Normalisation in Database management System (DBMS)
Normalisation in Database management System (DBMS)Normalisation in Database management System (DBMS)
Normalisation in Database management System (DBMS)
Prof Ansari
 
data base management system (DBMS)
data base management system (DBMS)data base management system (DBMS)
data base management system (DBMS)
Varish Bajaj
 
data base manage ment
data base manage mentdata base manage ment
data base manage ment
kaleemullah125
 
Dbms
DbmsDbms
Notes of DBMS Introduction to Database Design
Notes of DBMS Introduction to Database DesignNotes of DBMS Introduction to Database Design
Notes of DBMS Introduction to Database Design
AthiraNair143542
 
Lecture 1 to 3intro to normalization in database
Lecture 1 to 3intro to  normalization in databaseLecture 1 to 3intro to  normalization in database
Lecture 1 to 3intro to normalization in database
maqsoodahmedbscsfkhp
 
D.dsgn + dbms
D.dsgn + dbmsD.dsgn + dbms
D.dsgn + dbms
Dori Dorian
 
1414Database DesignDatabase design is the process o.docx
 1414Database DesignDatabase design is the process o.docx 1414Database DesignDatabase design is the process o.docx
1414Database DesignDatabase design is the process o.docx
joyjonna282
 
TID Chapter 10 Introduction To Database
TID Chapter 10 Introduction To DatabaseTID Chapter 10 Introduction To Database
TID Chapter 10 Introduction To DatabaseWanBK Leo
 
Physical Database Requirements.pdf
Physical Database Requirements.pdfPhysical Database Requirements.pdf
Physical Database Requirements.pdf
seifusisay06
 
Db lecture 1
Db lecture 1Db lecture 1
Bca examination 2016 dbms
Bca examination 2016 dbmsBca examination 2016 dbms
Bca examination 2016 dbms
Anjaan Gajendra
 
DBMS
DBMSDBMS
Database system Handbook.docx
Database system Handbook.docxDatabase system Handbook.docx
Database system Handbook.docx
Bahria University Islamabad, Pakistan
 
01-database-management.pptx
01-database-management.pptx01-database-management.pptx
01-database-management.pptx
dhanajimirajkar1
 
Database administration
Database administrationDatabase administration
Database administration
Anish Gupta
 
Unit 1: Introduction to DBMS Unit 1 Complete
Unit 1: Introduction to DBMS Unit 1 CompleteUnit 1: Introduction to DBMS Unit 1 Complete
Unit 1: Introduction to DBMS Unit 1 Complete
Raj vardhan
 
Database fundamentals
Database fundamentalsDatabase fundamentals
Database fundamentals
Then Murugeshwari
 
Database Systems Concepts, 5th Ed
Database Systems Concepts, 5th EdDatabase Systems Concepts, 5th Ed
Database Systems Concepts, 5th Ed
Daniel Francisco Tamayo
 
Database Systems - introduction
Database Systems - introductionDatabase Systems - introduction
Database Systems - introduction
Jananath Banuka
 

Similar to Physical Database Design & Performance (20)

Normalisation in Database management System (DBMS)
Normalisation in Database management System (DBMS)Normalisation in Database management System (DBMS)
Normalisation in Database management System (DBMS)
 
data base management system (DBMS)
data base management system (DBMS)data base management system (DBMS)
data base management system (DBMS)
 
data base manage ment
data base manage mentdata base manage ment
data base manage ment
 
Dbms
DbmsDbms
Dbms
 
Notes of DBMS Introduction to Database Design
Notes of DBMS Introduction to Database DesignNotes of DBMS Introduction to Database Design
Notes of DBMS Introduction to Database Design
 
Lecture 1 to 3intro to normalization in database
Lecture 1 to 3intro to  normalization in databaseLecture 1 to 3intro to  normalization in database
Lecture 1 to 3intro to normalization in database
 
D.dsgn + dbms
D.dsgn + dbmsD.dsgn + dbms
D.dsgn + dbms
 
1414Database DesignDatabase design is the process o.docx
 1414Database DesignDatabase design is the process o.docx 1414Database DesignDatabase design is the process o.docx
1414Database DesignDatabase design is the process o.docx
 
TID Chapter 10 Introduction To Database
TID Chapter 10 Introduction To DatabaseTID Chapter 10 Introduction To Database
TID Chapter 10 Introduction To Database
 
Physical Database Requirements.pdf
Physical Database Requirements.pdfPhysical Database Requirements.pdf
Physical Database Requirements.pdf
 
Db lecture 1
Db lecture 1Db lecture 1
Db lecture 1
 
Bca examination 2016 dbms
Bca examination 2016 dbmsBca examination 2016 dbms
Bca examination 2016 dbms
 
DBMS
DBMSDBMS
DBMS
 
Database system Handbook.docx
Database system Handbook.docxDatabase system Handbook.docx
Database system Handbook.docx
 
01-database-management.pptx
01-database-management.pptx01-database-management.pptx
01-database-management.pptx
 
Database administration
Database administrationDatabase administration
Database administration
 
Unit 1: Introduction to DBMS Unit 1 Complete
Unit 1: Introduction to DBMS Unit 1 CompleteUnit 1: Introduction to DBMS Unit 1 Complete
Unit 1: Introduction to DBMS Unit 1 Complete
 
Database fundamentals
Database fundamentalsDatabase fundamentals
Database fundamentals
 
Database Systems Concepts, 5th Ed
Database Systems Concepts, 5th EdDatabase Systems Concepts, 5th Ed
Database Systems Concepts, 5th Ed
 
Database Systems - introduction
Database Systems - introductionDatabase Systems - introduction
Database Systems - introduction
 

More from Abdullah Khosa

Chanel and H&M Brand Comparison.pdf
Chanel and H&M Brand Comparison.pdfChanel and H&M Brand Comparison.pdf
Chanel and H&M Brand Comparison.pdf
Abdullah Khosa
 
Mycin presentation
Mycin presentationMycin presentation
Mycin presentation
Abdullah Khosa
 
Policy directives of federal government of pakistan for Enterprise Architecture
Policy directives of federal government of pakistan for Enterprise ArchitecturePolicy directives of federal government of pakistan for Enterprise Architecture
Policy directives of federal government of pakistan for Enterprise Architecture
Abdullah Khosa
 
Face to Face Communication and Text Based Communication in HCI
Face to Face Communication and Text Based Communication in HCIFace to Face Communication and Text Based Communication in HCI
Face to Face Communication and Text Based Communication in HCI
Abdullah Khosa
 
STRATEGIC PAY PLANS
STRATEGIC PAY PLANSSTRATEGIC PAY PLANS
STRATEGIC PAY PLANS
Abdullah Khosa
 
AI services in google
AI services in googleAI services in google
AI services in google
Abdullah Khosa
 
Cloud Artificial Intelligence services
Cloud Artificial Intelligence servicesCloud Artificial Intelligence services
Cloud Artificial Intelligence services
Abdullah Khosa
 
Digital centralization
Digital centralizationDigital centralization
Digital centralization
Abdullah Khosa
 
Diamond water-paradox (A Theory)
Diamond water-paradox (A Theory)Diamond water-paradox (A Theory)
Diamond water-paradox (A Theory)
Abdullah Khosa
 
The 5th generation (5G)
The 5th generation (5G)The 5th generation (5G)
The 5th generation (5G)
Abdullah Khosa
 
Report of database of list of Pakistan international cricket stadiums
Report of database of list of Pakistan international cricket stadiumsReport of database of list of Pakistan international cricket stadiums
Report of database of list of Pakistan international cricket stadiums
Abdullah Khosa
 
Database of list of Pakistan international cricket stadiums
Database of list of Pakistan international cricket stadiumsDatabase of list of Pakistan international cricket stadiums
Database of list of Pakistan international cricket stadiums
Abdullah Khosa
 
Attitude and behavior
Attitude and behaviorAttitude and behavior
Attitude and behavior
Abdullah Khosa
 
Digital signature
Digital signatureDigital signature
Digital signature
Abdullah Khosa
 
Benefits of Search engine optimization
Benefits of Search engine optimizationBenefits of Search engine optimization
Benefits of Search engine optimization
Abdullah Khosa
 
Advanced Normalization
Advanced NormalizationAdvanced Normalization
Advanced Normalization
Abdullah Khosa
 
Relational Algebra & Calculus
Relational Algebra & CalculusRelational Algebra & Calculus
Relational Algebra & Calculus
Abdullah Khosa
 
Advance database system(part 8)
Advance database system(part 8)Advance database system(part 8)
Advance database system(part 8)
Abdullah Khosa
 
Advance database system(part 7)
Advance database system(part 7)Advance database system(part 7)
Advance database system(part 7)
Abdullah Khosa
 
Advance database system(part 6)
Advance database system(part 6)Advance database system(part 6)
Advance database system(part 6)
Abdullah Khosa
 

More from Abdullah Khosa (20)

Chanel and H&M Brand Comparison.pdf
Chanel and H&M Brand Comparison.pdfChanel and H&M Brand Comparison.pdf
Chanel and H&M Brand Comparison.pdf
 
Mycin presentation
Mycin presentationMycin presentation
Mycin presentation
 
Policy directives of federal government of pakistan for Enterprise Architecture
Policy directives of federal government of pakistan for Enterprise ArchitecturePolicy directives of federal government of pakistan for Enterprise Architecture
Policy directives of federal government of pakistan for Enterprise Architecture
 
Face to Face Communication and Text Based Communication in HCI
Face to Face Communication and Text Based Communication in HCIFace to Face Communication and Text Based Communication in HCI
Face to Face Communication and Text Based Communication in HCI
 
STRATEGIC PAY PLANS
STRATEGIC PAY PLANSSTRATEGIC PAY PLANS
STRATEGIC PAY PLANS
 
AI services in google
AI services in googleAI services in google
AI services in google
 
Cloud Artificial Intelligence services
Cloud Artificial Intelligence servicesCloud Artificial Intelligence services
Cloud Artificial Intelligence services
 
Digital centralization
Digital centralizationDigital centralization
Digital centralization
 
Diamond water-paradox (A Theory)
Diamond water-paradox (A Theory)Diamond water-paradox (A Theory)
Diamond water-paradox (A Theory)
 
The 5th generation (5G)
The 5th generation (5G)The 5th generation (5G)
The 5th generation (5G)
 
Report of database of list of Pakistan international cricket stadiums
Report of database of list of Pakistan international cricket stadiumsReport of database of list of Pakistan international cricket stadiums
Report of database of list of Pakistan international cricket stadiums
 
Database of list of Pakistan international cricket stadiums
Database of list of Pakistan international cricket stadiumsDatabase of list of Pakistan international cricket stadiums
Database of list of Pakistan international cricket stadiums
 
Attitude and behavior
Attitude and behaviorAttitude and behavior
Attitude and behavior
 
Digital signature
Digital signatureDigital signature
Digital signature
 
Benefits of Search engine optimization
Benefits of Search engine optimizationBenefits of Search engine optimization
Benefits of Search engine optimization
 
Advanced Normalization
Advanced NormalizationAdvanced Normalization
Advanced Normalization
 
Relational Algebra & Calculus
Relational Algebra & CalculusRelational Algebra & Calculus
Relational Algebra & Calculus
 
Advance database system(part 8)
Advance database system(part 8)Advance database system(part 8)
Advance database system(part 8)
 
Advance database system(part 7)
Advance database system(part 7)Advance database system(part 7)
Advance database system(part 7)
 
Advance database system(part 6)
Advance database system(part 6)Advance database system(part 6)
Advance database system(part 6)
 

Recently uploaded

The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 

Recently uploaded (20)

The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 

Physical Database Design & Performance

  • 1. Institute of Southern Punjab, Multan Mr. Muhammad Nouman Farooq BSC-H (Computer Science) MS (Telecomm. and Networks) Honors: Magna Cumm Laude Honors Degree Gold Medalist! Blog Url: noumanfarooqatisp.wordpress.com E-Mail: noman.iefr@hotmail.com
  • 2. Advance Database Systems Lecture# 7 Physical Database Design & Performance
  • 3. Lecture 7: Physical Database Design & Performance  Introduction of Physical Database Design Process  Designing Fields  Choosing Data Types  Controlling Data Integrity  Denormalizing and Partitioning Data  Designing Physical Database Files  File Organizations  Clustering Files  Indexes  Optimizing Queries 3
  • 4. Introduction of Physical Database Design & Performance 4  In previous lectures; We have learned how to describe and model organizational data during the conceptual data modeling and logical database design phases of the database development process. We learned how to use EER notation, the relational data model, and normalization to develop constructs of organizational data that capture the meaning of data; however, these notations do not explain how data will be processed or stored.  The purpose of physical database design is to translate the logical description of data into the technical specifications for storing and retrieving data. The goal is to create a design for storing data that will provide high performance and ensure database integrity, security, and recoverability. Physical database design does not include implementing files and databases (i.e., creating them and loading data)
  • 5.  Introduction of Physical Database Design Process 5
  • 6. 6  The primary goal of physical database design is data processing efficiency. It is very important for database developer to design the physical database to minimize the time required by users to interact with the information system.  Designing physical files and databases requires certain information that should have been collected and produced during prior database development phases. The information needed for physical file and database design includes these requirements: • Normalizing Relations to eliminate anomalies • Definitions of each attribute, along with physical specifications such as maximum possible length • Descriptions of where and when data are used: entered, retrieved, deleted, and updated • Requirements for response time and data security, backup, recovery and integrity • Descriptions of the simulator (database management systems) used for implementing the database Introduction of Physical Database Design Process
  • 7. 7  Physical database design requires several critical decisions that will affect the integrity and performance of the application system. These key decisions include the following: • Choosing the storage format (called data type) for each attribute from the logical data model. The format and associated parameters are chosen to minimize storage space and to maximize data integrity. • Selecting structures (called indexes and database architectures) for storing and connecting files to make retrieving related data more efficient. • Preparing strategies for handling queries against the database that will optimize performance and take advantage of the file organizations and indexes that you have specified. Continued..
  • 9. 9 Designing Fields The basic decisions you must make in specifying each field concern the type of data (or storage type) used to represent values of this field, data integrity controls built into the database.
  • 10.  Choosing Data Types 10
  • 11. 11 Choosing Data Types  A data type is a detailed coding scheme recognized by system software, such as a DBMS, for representing organizational data.  Selecting a data type involves four objectives that will have different levels of importance for different applications: 1. Minimizing Storage Space 2. Represent all possible Values 3. Improve Data Integrity (only Legal Values allowed as per Field) 4. Support all Data Manipulations
  • 12. 12
  • 13. 13
  • 14. 14  Some attributes have set of values so large that, given data volumes, considerable storage space will be consumed. A field with a limited number of possible values can be translated into a CODE that requires less space.  Consider the example of the ProductFinish field illustrated in Figure 5-2 on next slide. Products at Pine Valley Furniture come in only a limited number of woods: Birch, Maple, and Oak. By creating a code or translation table, each ProductFinish field value can be replaced by a code, a cross-reference to the lookup table, similar to a foreign key. This will decrease the amount of space for the ProductFinish field and hence for the PRODUCT file. There will be additional space for the PRODUCT FINISH lookup table, and when the ProductFinish field value is needed, an EXTRA ACCESS (called a JOIN) to this lookup table will be required. CODING TECHNIQUES
  • 15. 15
  • 16.  Controlling Data Integrity 16
  • 17. 17  For many DBMS, data integrity controls (controls on the possible value a field can assume) can be built into the physical structure of the fields and controls enforced by the DBMS on those fields.  The data type enforces one form of data integrity control because it may limit the type of data (numeric or character) and the length of a field value.  Some other typical integrity controls that a DBMS may support are the following: 1. Default Value: A default value is the value a field will assume unless a user enters an explicit value for an instance of that field. Assigning a default value to a field can reduce data entry time because entry of a value can be skipped and it can also help to reduce data entry errors for the most common value. It can be achieved by implementing an Auto-Increment check on field having data type Integer. Controlling Data Integrity
  • 18. 18 2. Range Control: A range control limits the set of allowable values a field may assume. Range controls must be used with caution because the limits of the range may change over time. A combination of range controls and coding led to the Year 2000 problem faced by many Organizations, in which a field for year is represented by only the numbers 00 to 99. Continued..
  • 19. 19 3. Null Value Control: A null value was also defined in previous lectures as an empty value. Each Primary Key must have an Integrity control that prohibits a null value. Any other required field may also have a Null Value control placed on it if that is the policy of the organization. For example, a university may prohibit adding a course to its database unless that course has a Title as well as a value of the Primary Key field CourseID. Continued..
  • 20. 20 4. Referential Integrity: The term “Referential Integrity" was also defined in previous lectures. Referential Integrity on a field is a form of range control in which the value of that field must exist as the value in some field in another Row of the same or (most commonly) different table. Continued..
  • 21.  Denormalizing and Partitioning Data 21
  • 22. 22
  • 23. 23
  • 24. 24
  • 25. 25
  • 26. 26
  • 27. 27
  • 28. 28
  • 29. 29
  • 30. 30
  • 31. 31
  • 32. 32
  • 33. 33
  • 34. 34
  • 35. 35
  • 36. 36
  • 37. 37
  • 38. 38
  • 39. 39
  • 40.  Designing Physical Database Files 40
  • 41. 41
  • 43. 43
  • 44. 44
  • 45. 45
  • 46. 46
  • 47. 47
  • 48. 48
  • 49. 49
  • 50. 50
  • 51. 51
  • 52. 52
  • 53. 53
  • 54. 54
  • 56. 56
  • 57. 57
  • 58. 58
  • 59. 59
  • 61. 61
  • 62. 62
  • 63. 63
  • 64. 64
  • 65. 65
  • 67. 67
  • 68. 68
  • 69. 69
  • 70. 70
  • 71. 71
  • 72. 72
  • 73. 73
  • 74. 74
  • 75. 75
  • 76. Recommended Readings Chapter 6 from: -  Modern Database Management by Jeffrey A. Hoffer, Marry B. Presscott & Fred R. McFadden; 8th Edition (Page No. 273-319) Chapter 5 from: -  Modern Database Management by Jeffrey A. Hoffer, V. Ramesh & H. Toppi; 10th Edition (Page No. 247-280) 76
  • 77. Summary of Lecture 77 Lecture 7➦  Introduction of Physical Database Design Process  Designing Filed  Choosing Data Types  Controlling Data Integrity  Denormalizing and Partitioning Data  Designing Physical Database Files  File Organizations  Clustering Files  Indexes  Optimizing Queries
  • 78.  END OF LECTURE 7 78