SlideShare a Scribd company logo
Data base
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
Data base
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

PPT
File organisation
PPTX
File Organization
PPT
File organization and indexing
PPT
File organization
DOCX
File organization in database
PPT
File organization
PDF
File organization
File organisation
File Organization
File organization and indexing
File organization
File organization in database
File organization
File organization

What's hot (20)

PDF
itft-File design
PPT
Lecture #1 Introduction
PDF
File Organization
PPT
File organisation
PPT
baim_ch08
PPT
Ch08 records management
PPT
Ch10 records management
PPT
Ch06 records management
PPT
Database management systems
PPT
Ch09 records management
PPT
Introduction to computer
PPT
Chapter 06
PPT
Ardbms
PPTX
Concept of computer files
PPT
File organisation in system analysis and design
PPT
Ch05 records management
PPT
Fundamental File Processing Operations
PPT
Fileorganization AbnMagdy
itft-File design
Lecture #1 Introduction
File Organization
File organisation
baim_ch08
Ch08 records management
Ch10 records management
Ch06 records management
Database management systems
Ch09 records management
Introduction to computer
Chapter 06
Ardbms
Concept of computer files
File organisation in system analysis and design
Ch05 records management
Fundamental File Processing Operations
Fileorganization AbnMagdy
Ad

Similar to Data base (20)

PPT
Data Indexing Presentation-My.pptppt.ppt
PPTX
Week - 06, 07, 08 DataMgt Chapter 3.pptx
PPTX
File Organization in database management.pptx
PPTX
FILE ORGANIZATION.pptx
PPT
File organization 1
PPTX
File Structure.pptx
PPTX
Physical database design(database)
PPT
1650607.ppt
PPTX
Lec20.pptx introduction to data bases and information systems
PPTX
File Management
PPT
Main MeMory Data Base
PPTX
Database Management System-Module-IV(part-1).pptx
PPTX
Presentation DBMS (1)
PPT
File Management
PDF
File system in operating system e learning
PPTX
Data Never Lies Presentation for beginners in data field.pptx
PPTX
OS Unit5.pptx
PDF
16119 - Get to Know Your Data Sets (1).pdf
PPTX
Relational databases
Data Indexing Presentation-My.pptppt.ppt
Week - 06, 07, 08 DataMgt Chapter 3.pptx
File Organization in database management.pptx
FILE ORGANIZATION.pptx
File organization 1
File Structure.pptx
Physical database design(database)
1650607.ppt
Lec20.pptx introduction to data bases and information systems
File Management
Main MeMory Data Base
Database Management System-Module-IV(part-1).pptx
Presentation DBMS (1)
File Management
File system in operating system e learning
Data Never Lies Presentation for beginners in data field.pptx
OS Unit5.pptx
16119 - Get to Know Your Data Sets (1).pdf
Relational databases
Ad

Recently uploaded (20)

PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PDF
Digital Logic Computer Design lecture notes
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
DOCX
573137875-Attendance-Management-System-original
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PDF
PPT on Performance Review to get promotions
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPTX
Internet of Things (IOT) - A guide to understanding
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PPTX
Lesson 3_Tessellation.pptx finite Mathematics
PPTX
Lecture Notes Electrical Wiring System Components
PPTX
web development for engineering and engineering
PDF
composite construction of structures.pdf
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
UNIT 4 Total Quality Management .pptx
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PDF
Arduino robotics embedded978-1-4302-3184-4.pdf
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Digital Logic Computer Design lecture notes
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
573137875-Attendance-Management-System-original
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PPT on Performance Review to get promotions
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Internet of Things (IOT) - A guide to understanding
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
Lesson 3_Tessellation.pptx finite Mathematics
Lecture Notes Electrical Wiring System Components
web development for engineering and engineering
composite construction of structures.pdf
Model Code of Practice - Construction Work - 21102022 .pdf
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
CH1 Production IntroductoryConcepts.pptx
UNIT 4 Total Quality Management .pptx
Foundation to blockchain - A guide to Blockchain Tech
Arduino robotics embedded978-1-4302-3184-4.pdf

Data base

  • 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
  • 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