SlideShare a Scribd company logo
DENORMALIZATION
AND
DESIGNING PHYSICAL
FILES
PRESENTED BY:
MAHNOOR YASEEN
DENORMALIZATION
• Transforming normalized relations into unnormalized physical record
specifications
• – The process of splitting or combining normalized relations into physical tables
based on affinity of use of rows and fields
• 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
DENORMALIZATION
• Three common situations where denormalization may be used
Two entities with a one-to-one relationship
A many-to-many relationship with nonkey attributes
Reference data
A POSSIBLE DENORMALIZATION SITUATION: TWO
ENTITIES WITH ONE-TO-ONE RELATIONSHIP
EXAMPLE
CONTINUE………………..
DESIGNING PHYSICAL FILES
• Physical File:
• A named portion of secondary memory allocated for the purpose of
storing physical records
• Tablespace – named set of disk storage elements in which physical
files for database tables can be stored
• Extent – contiguous section of disk space
• Constructs to link two pieces of data:
• Sequential storage
• Pointers – field of data that can be used to locate related fields or
records
FILE ORGANIZATIONS
• Technique for physically arranging records of a file on
secondary storage
• Factors for selecting file organization:
• Fast data retrieval and throughput
• Efficient storage space utilization
• Protection from failure and data loss
• Minimizing need for reorganization
• Accommodating growth
• Security from unauthorized use
File Organization Continue…
How the files are arranged on the disk.
In modern RDBMS user do not have to design file
organization but may be allowed to select a file-
organization and its parameter.
Access Method:
How the data can be retrieved based on the file
TYPES OF FILE ORGANIZATIONS
• Sequential
• Indexed
• Hashed
SEQUENTIAL
• • The rows in the file are stored in sequence according to a primary key value
• • Updating and adding records may require rewriting the file
• • Deleting records results in wasted space
SEQUENTIAL FILE
ORGANIZATION
Records of the file are stored
in sequence by the primary
key field values
INDEXED FILE ORGANIZATION
• • An indexed file contains records ordered by a record key . A record key uniquely identifies a
record and determines the sequence in which it is accessed with respect to other records. .
• The rows are stored either sequentially or non-sequentially and an index is created that allows
software to locate individual rows
Indexing approaches:
• B-tree index
• Bitmap index
• Hash Index
• Join Index
B- TREE INDEX
Leaves of the tree are all at
same level 
consistent access time
HASHED FILE
ORGANIZATION
• – The address for each row
is determined using an
algorithm
RULES 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
CONTINUE…
5. When there are >100 values but not when there are <30 values
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
Data base
Data base

More Related Content

What's hot

Indexing
IndexingIndexing
Lecture #1 Introduction
Lecture #1 IntroductionLecture #1 Introduction
Lecture #1 IntroductionRico
 
File Organization
File OrganizationFile Organization
File Organization
Amrit Kaur
 
File organisation
File organisationFile organisation
File organisation
Samuel Igbanogu
 
baim_ch08
baim_ch08baim_ch08
baim_ch08baim08
 
Ch08 records management
Ch08 records managementCh08 records management
Ch08 records managementxtin101
 
Ch10 records management
Ch10 records managementCh10 records management
Ch10 records managementxtin101
 
Ch06 records management
Ch06 records managementCh06 records management
Ch06 records managementxtin101
 
Database management systems
Database management systemsDatabase management systems
Database management systemsUjjwal 'Shanu'
 
Ch09 records management
Ch09 records managementCh09 records management
Ch09 records managementxtin101
 
Introduction to computer
Introduction to computerIntroduction to computer
Introduction to computerUjjwal 'Shanu'
 
Chapter 06
Chapter 06Chapter 06
Chapter 06
Kristin Harrison
 
Concept of computer files
Concept of computer filesConcept of computer files
Concept of computer files
Samuel Igbanogu
 
File organisation in system analysis and design
File organisation in system analysis and designFile organisation in system analysis and design
File organisation in system analysis and design
Mohitgauri
 
Ch05 records management
Ch05 records managementCh05 records management
Ch05 records managementxtin101
 
Fundamental File Processing Operations
Fundamental File Processing OperationsFundamental File Processing Operations
Fundamental File Processing OperationsRico
 
Fileorganization AbnMagdy
Fileorganization AbnMagdyFileorganization AbnMagdy
Fileorganization AbnMagdyMohamed Magdy
 

What's hot (20)

itft-File design
itft-File designitft-File design
itft-File design
 
Indexing
IndexingIndexing
Indexing
 
Lecture #1 Introduction
Lecture #1 IntroductionLecture #1 Introduction
Lecture #1 Introduction
 
File Organization
File OrganizationFile Organization
File Organization
 
File organisation
File organisationFile organisation
File organisation
 
baim_ch08
baim_ch08baim_ch08
baim_ch08
 
Ch08 records management
Ch08 records managementCh08 records management
Ch08 records management
 
Ch10 records management
Ch10 records managementCh10 records management
Ch10 records management
 
4 create database
4 create database4 create database
4 create database
 
Ch06 records management
Ch06 records managementCh06 records management
Ch06 records management
 
Database management systems
Database management systemsDatabase management systems
Database management systems
 
Ch09 records management
Ch09 records managementCh09 records management
Ch09 records management
 
Introduction to computer
Introduction to computerIntroduction to computer
Introduction to computer
 
Chapter 06
Chapter 06Chapter 06
Chapter 06
 
Ardbms
ArdbmsArdbms
Ardbms
 
Concept of computer files
Concept of computer filesConcept of computer files
Concept of computer files
 
File organisation in system analysis and design
File organisation in system analysis and designFile organisation in system analysis and design
File organisation in system analysis and design
 
Ch05 records management
Ch05 records managementCh05 records management
Ch05 records management
 
Fundamental File Processing Operations
Fundamental File Processing OperationsFundamental File Processing Operations
Fundamental File Processing Operations
 
Fileorganization AbnMagdy
Fileorganization AbnMagdyFileorganization AbnMagdy
Fileorganization AbnMagdy
 

Similar to Data base

Data Indexing Presentation-My.pptppt.ppt
Data Indexing Presentation-My.pptppt.pptData Indexing Presentation-My.pptppt.ppt
Data Indexing Presentation-My.pptppt.ppt
sdsm2
 
Week - 06, 07, 08 DataMgt Chapter 3.pptx
Week - 06, 07, 08 DataMgt Chapter 3.pptxWeek - 06, 07, 08 DataMgt Chapter 3.pptx
Week - 06, 07, 08 DataMgt Chapter 3.pptx
TALHA RIAZ PERSOTA
 
FILE ORGANIZATION.pptx
FILE ORGANIZATION.pptxFILE ORGANIZATION.pptx
FILE ORGANIZATION.pptx
Kavya990096
 
File organization 1
File organization 1File organization 1
File organization 1
Rupali Rana
 
File Structure.pptx
File Structure.pptxFile Structure.pptx
File Structure.pptx
zedd15
 
Physical database design(database)
Physical database design(database)Physical database design(database)
Physical database design(database)welcometofacebook
 
Rdbms
RdbmsRdbms
1650607.ppt
1650607.ppt1650607.ppt
1650607.ppt
KalsoomTahir2
 
Lec20.pptx introduction to data bases and information systems
Lec20.pptx introduction to data bases and information systemsLec20.pptx introduction to data bases and information systems
Lec20.pptx introduction to data bases and information systems
samiullahamjad06
 
File Management
File ManagementFile Management
File Management
ramya marichamy
 
Main MeMory Data Base
Main MeMory Data BaseMain MeMory Data Base
Main MeMory Data BaseSiva Rushi
 
Database Management System-Module-IV(part-1).pptx
Database Management System-Module-IV(part-1).pptxDatabase Management System-Module-IV(part-1).pptx
Database Management System-Module-IV(part-1).pptx
AiswaryaMohan31
 
Presentation DBMS (1)
Presentation DBMS (1)Presentation DBMS (1)
Presentation DBMS (1)
Ali Raza
 
File Management
File ManagementFile Management
File Management
Ramasubbu .P
 
File system in operating system e learning
File system in operating system e learningFile system in operating system e learning
File system in operating system e learning
Lavanya Sharma
 
Data Never Lies Presentation for beginners in data field.pptx
Data Never Lies Presentation for beginners in data field.pptxData Never Lies Presentation for beginners in data field.pptx
Data Never Lies Presentation for beginners in data field.pptx
TusharAgarwal49094
 
OS Unit5.pptx
OS Unit5.pptxOS Unit5.pptx
OS Unit5.pptx
DHANABALSUBRAMANIAN
 
16119 - Get to Know Your Data Sets (1).pdf
16119 - Get to Know Your Data Sets (1).pdf16119 - Get to Know Your Data Sets (1).pdf
16119 - Get to Know Your Data Sets (1).pdf
3operatordcslipiPeng
 
storage techniques_overview-1.pptx
storage techniques_overview-1.pptxstorage techniques_overview-1.pptx
storage techniques_overview-1.pptx
20CS102RAMMPRASHATHK
 

Similar to Data base (20)

Data Indexing Presentation-My.pptppt.ppt
Data Indexing Presentation-My.pptppt.pptData Indexing Presentation-My.pptppt.ppt
Data Indexing Presentation-My.pptppt.ppt
 
Week - 06, 07, 08 DataMgt Chapter 3.pptx
Week - 06, 07, 08 DataMgt Chapter 3.pptxWeek - 06, 07, 08 DataMgt Chapter 3.pptx
Week - 06, 07, 08 DataMgt Chapter 3.pptx
 
FILE ORGANIZATION.pptx
FILE ORGANIZATION.pptxFILE ORGANIZATION.pptx
FILE ORGANIZATION.pptx
 
File organization 1
File organization 1File organization 1
File organization 1
 
File Structure.pptx
File Structure.pptxFile Structure.pptx
File Structure.pptx
 
Physical database design(database)
Physical database design(database)Physical database design(database)
Physical database design(database)
 
Rdbms
RdbmsRdbms
Rdbms
 
1650607.ppt
1650607.ppt1650607.ppt
1650607.ppt
 
Lec20.pptx introduction to data bases and information systems
Lec20.pptx introduction to data bases and information systemsLec20.pptx introduction to data bases and information systems
Lec20.pptx introduction to data bases and information systems
 
File Management
File ManagementFile Management
File Management
 
Main MeMory Data Base
Main MeMory Data BaseMain MeMory Data Base
Main MeMory Data Base
 
Database Management System-Module-IV(part-1).pptx
Database Management System-Module-IV(part-1).pptxDatabase Management System-Module-IV(part-1).pptx
Database Management System-Module-IV(part-1).pptx
 
Presentation DBMS (1)
Presentation DBMS (1)Presentation DBMS (1)
Presentation DBMS (1)
 
File Management
File ManagementFile Management
File Management
 
File system in operating system e learning
File system in operating system e learningFile system in operating system e learning
File system in operating system e learning
 
Data Never Lies Presentation for beginners in data field.pptx
Data Never Lies Presentation for beginners in data field.pptxData Never Lies Presentation for beginners in data field.pptx
Data Never Lies Presentation for beginners in data field.pptx
 
OS Unit5.pptx
OS Unit5.pptxOS Unit5.pptx
OS Unit5.pptx
 
16119 - Get to Know Your Data Sets (1).pdf
16119 - Get to Know Your Data Sets (1).pdf16119 - Get to Know Your Data Sets (1).pdf
16119 - Get to Know Your Data Sets (1).pdf
 
Relational databases
Relational databasesRelational databases
Relational databases
 
storage techniques_overview-1.pptx
storage techniques_overview-1.pptxstorage techniques_overview-1.pptx
storage techniques_overview-1.pptx
 

Recently uploaded

KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
Victor Morales
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
jpsjournal1
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
anoopmanoharan2
 
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
Mukeshwaran Balu
 
Low power architecture of logic gates using adiabatic techniques
Low power architecture of logic gates using adiabatic techniquesLow power architecture of logic gates using adiabatic techniques
Low power architecture of logic gates using adiabatic techniques
nooriasukmaningtyas
 
Water billing management system project report.pdf
Water billing management system project report.pdfWater billing management system project report.pdf
Water billing management system project report.pdf
Kamal Acharya
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
zwunae
 
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
 
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
dxobcob
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Christina Lin
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
ydteq
 
PROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.ppt
PROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.pptPROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.ppt
PROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.ppt
bhadouriyakaku
 
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
 
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
 
Unbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptxUnbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptx
ChristineTorrepenida1
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
insn4465
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
SUTEJAS
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
MIGUELANGEL966976
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
ClaraZara1
 

Recently uploaded (20)

KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
 
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
 
Low power architecture of logic gates using adiabatic techniques
Low power architecture of logic gates using adiabatic techniquesLow power architecture of logic gates using adiabatic techniques
Low power architecture of logic gates using adiabatic techniques
 
Water billing management system project report.pdf
Water billing management system project report.pdfWater billing management system project report.pdf
Water billing management system project report.pdf
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
 
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
 
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
 
PROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.ppt
PROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.pptPROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.ppt
PROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.ppt
 
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
 
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
 
Unbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptxUnbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptx
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
 

Data base

  • 1.
  • 3. DENORMALIZATION • Transforming normalized relations into unnormalized physical record specifications • – The process of splitting or combining normalized relations into physical tables based on affinity of use of rows and fields • 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
  • 4. DENORMALIZATION • Three common situations where denormalization may be used Two entities with a one-to-one relationship A many-to-many relationship with nonkey attributes Reference data
  • 5. A POSSIBLE DENORMALIZATION SITUATION: TWO ENTITIES WITH ONE-TO-ONE RELATIONSHIP
  • 8. DESIGNING PHYSICAL FILES • Physical File: • A named portion of secondary memory allocated for the purpose of storing physical records • Tablespace – named set of disk storage elements in which physical files for database tables can be stored • Extent – contiguous section of disk space • Constructs to link two pieces of data: • Sequential storage • Pointers – field of data that can be used to locate related fields or records
  • 9. FILE ORGANIZATIONS • Technique for physically arranging records of a file on secondary storage • Factors for selecting file organization: • Fast data retrieval and throughput • Efficient storage space utilization • Protection from failure and data loss • Minimizing need for reorganization • Accommodating growth • Security from unauthorized use
  • 10. File Organization Continue… How the files are arranged on the disk. In modern RDBMS user do not have to design file organization but may be allowed to select a file- organization and its parameter. Access Method: How the data can be retrieved based on the file
  • 11. TYPES OF FILE ORGANIZATIONS • Sequential • Indexed • Hashed
  • 12. SEQUENTIAL • • The rows in the file are stored in sequence according to a primary key value • • Updating and adding records may require rewriting the file • • Deleting records results in wasted space
  • 13. SEQUENTIAL FILE ORGANIZATION Records of the file are stored in sequence by the primary key field values
  • 14. INDEXED FILE ORGANIZATION • • An indexed file contains records ordered by a record key . A record key uniquely identifies a record and determines the sequence in which it is accessed with respect to other records. . • The rows are stored either sequentially or non-sequentially and an index is created that allows software to locate individual rows Indexing approaches: • B-tree index • Bitmap index • Hash Index • Join Index
  • 15. B- TREE INDEX Leaves of the tree are all at same level  consistent access time
  • 16. HASHED FILE ORGANIZATION • – The address for each row is determined using an algorithm
  • 17.
  • 18. RULES 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
  • 19. CONTINUE… 5. When there are >100 values but not when there are <30 values 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