CSC271 Database Systems Lecture # 30.

Slides:



Advertisements
Similar presentations
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide
Advertisements

Chapter 18 Methodology – Monitoring and Tuning the Operational System Transparencies © Pearson Education Limited 1995, 2005.
1 Pertemuan > > Matakuliah: >/ > Tahun: > Versi: >
Topic Denormalisation S McKeever Advanced Databases 1.
Database Systems: A Practical Approach to Design, Implementation and Management International Computer Science S. Carolyn Begg, Thomas Connolly Lecture.
Chapter Physical Database Design Methodology Software & Hardware Mapping Logical Design to DBMS Physical Implementation Security Implementation Monitoring.
Chapter 6 Methodology Conceptual Databases Design Transparencies © Pearson Education Limited 1995, 2005.
IS 4420 Database Fundamentals Chapter 6: Physical Database Design and Performance Leon Chen.
Physical Database Monitoring and Tuning the Operational System.
1 Methodology : Conceptual Databases Design © Pearson Education Limited 1995, 2005.
Database Systems: A Practical Approach to Design, Implementation and Management International Computer Science S. Carolyn Begg, Thomas Connolly Lecture.
Methodology Conceptual Database Design
Modeling & Designing the Database
Chapter 17 Methodology – Physical Database Design for Relational Databases Transparencies © Pearson Education Limited 1995, 2005.
© Pearson Education Limited, Chapter 12 Physical Database Design – Step 3 (Translate Logical Design) Transparencies.
Team Dosen UMN Physical DB Design Connolly Book Chapter 18.
CSC271 Database Systems Lecture # 21. Summary: Previous Lecture  Phases of database SDLC  Prototyping (optional)  Implementation  Data conversion.
CSC271 Database Systems Lecture # 6. Summary: Previous Lecture  Relational model terminology  Mathematical relations  Database relations  Properties.
Chapter 6 Physical Database Design. Introduction The purpose of physical database design is to translate the logical description of data into the technical.
Chapters 17 & 18 Physical Database Design Methodology.
Practical Database Design and Tuning. Outline  Practical Database Design and Tuning Physical Database Design in Relational Databases An Overview of Database.
1 © Prentice Hall, 2002 Physical Database Design Dr. Bijoy Bordoloi.
ITEC224 Database Programming
Lecture 9 Methodology – Physical Database Design for Relational Databases.
Methodology - Conceptual Database Design Transparencies
Software School of Hunan University Database Systems Design Part III Section 5 Design Methodology.
Methodology Conceptual Databases Design
9/14/2012ISC329 Isabelle Bichindaritz1 Database System Life Cycle.
1 Chapter 15 Methodology Conceptual Databases Design Transparencies Last Updated: April 2011 By M. Arief
© Pearson Education Limited, Chapter 16 Physical Database Design – Step 7 (Monitor and Tune the Operational System) Transparencies.
TM 7-1 Copyright © 1999 Addison Wesley Longman, Inc. Physical Database Design.
Physical Database Design Chapter 6. Physical Design and implementation 1.Translate global logical data model for target DBMS  1.1Design base relations.
Chapter 16 Methodology – Physical Database Design for Relational Databases.
Chapter 6 1 © Prentice Hall, 2002 The Physical Design Stage of SDLC (figures 2.4, 2.5 revisited) Project Identification and Selection Project Initiation.
Physical Database Design
CSC271 Database Systems Lecture # 29. Summary: Previous Lecture  The normalization process  1NF, 2NF, 3NF  Inference rules for FDs  BCNF.
1 Index Structures. 2 Chapter : Objectives Types of Single-level Ordered Indexes Primary Indexes Clustering Indexes Secondary Indexes Multilevel Indexes.
Methodology - Conceptual Database Design. 2 Design Methodology u Structured approach that uses procedures, techniques, tools, and documentation aids to.
1/26/2004TCSS545A Isabelle Bichindaritz1 Database Management Systems Design Methodology.
Methodology: Conceptual Databases Design
DATABASE MGMT SYSTEM (BCS 1423) Chapter 5: Methodology – Conceptual Database Design.
Team Dosen UMN Database Design Connolly Book Chapter
© Pearson Education Limited, Chapter 15 Physical Database Design – Step 7 (Consider Introduction of Controlled Redundancy) Transparencies.
Chapter 16 Practical Database Design and Tuning Copyright © 2004 Pearson Education, Inc.
© Pearson Education Limited, Chapter 13 Physical Database Design – Step 4 (Choose File Organizations and Indexes) Transparencies.
10/10/2012ISC239 Isabelle Bichindaritz1 Physical Database Design.
Physical Database Design Transparencies. ©Pearson Education 2009 Chapter 11 - Objectives Purpose of physical database design. How to map the logical database.
Methodology - Conceptual Database Design
Part4 Methodology of Database Design Chapter 07- Overview of Conceptual Database Design Lu Wei College of Software and Microelectronics Northwestern Polytechnical.
Methodology – Physical Database Design for Relational Databases.
Methodology – Monitoring and Tuning the Operational System.
Sekolah Tinggi Ilmu Statistik (STIS). Main Topics Denormalizing and introducing controlled redundancy  Meaning of denormalization.  When to denormalize.
Physical Database Design Purpose- translate the logical description of data into the technical specifications for storing and retrieving data Goal - create.
Lec 7 Practical Database Design and Tuning Copyright © 2004 Pearson Education, Inc.
B. Information Technology (Hons.) CMPB245: Database Design Physical Design.
Practical Database Design and Tuning
Methodology Conceptual Databases Design
Record Storage, File Organization, and Indexes
Methodology Conceptual Database Design
Physical Database Design
Methodology – Physical Database Design for Relational Databases
Methodology – Monitoring and Tuning the Operational System
Physical Database Design for Relational Databases Step 3 – Step 8
國立臺北科技大學 課程:資料庫系統 fall Chapter 18
Physical Database Design
Practical Database Design and Tuning
The Physical Design Stage of SDLC (figures 2.4, 2.5 revisited)
Methodology – Monitoring and Tuning the Operational System
Methodology Conceptual Databases Design
Presentation transcript:

CSC271 Database Systems Lecture # 30

Summary: Previous Lecture Normalization summary/example Remaining steps/activities in building logical data model Physical database design Translate logical data model for target DBMS

Physical Database Design Methodology Translate logical data model for target DBMS Design base relations Design representation of derived data Design general constraints Design file organizations and indexes Analyze transactions Choose file organizations Choose indexes Estimate disk space requirements Design user views Design security mechanisms Consider the introduction of controlled redundancy Monitor and tune the operational system

Physical Database Design Methodology Design file organizations and indexes To determine optimal file organizations to store the base relations and the indexes that are required to achieve acceptable performance; that is, the way in which relations and tuples will be held on secondary storage The types of file organization available are dependent on the target DBMS The DB designer must understand the typical workload that database must support

Physical Database Design Methodology Analyze transactions To understand the functionality of the transactions that will run on the database and to analyze the important transactions Attempt to identify performance criteria, such as: Transactions that run frequently and will have a significant impact on performance Transactions that are critical to the business Times during the day/week when there will be a high demand made on the database (called the peak load)

Physical Database Design Methodology Analyze transactions Use this information to identify the parts of the database that may cause performance problems Also need to know high-level functionality of the transactions, such as: Attributes that are updated Search criteria used in a query Use this information to select appropriate file organization

Physical Database Design Methodology Analyze transactions Difficult to estimate all transactions, most important The most active 20% of user queries account for 80% of the total data access Use of Transaction/relation cross-reference matrix, showing relations that each transaction accesses Transaction usage map, indicating which relations are potentially heavily used To focus on areas that may be problematic: Map all transaction paths to relations Most frequently accessed relations by transactions Data usage of selected transactions involving relations

Cross-Referencing Transactions/Relations

Transaction Usage Map

Transaction Analysis Form

Physical Database Design Methodology Design file organizations and indexes Choose file organizations To determine an efficient file organization for each base relation File organizations include Heap, Hash, Indexed Sequential Access Method (ISAM), B+-Tree, and Clusters Some DBMSs may not allow selection of file organizations

Physical Database Design Methodology Design file organizations and indexes Choose indexes To determine whether adding indexes will improve the performance of the system Primary/Secondary/Clustering index One approach is to keep tuples unordered and create as many secondary indexes as necessary Another approach is to order tuples in the relation by specifying a primary or clustering index For more details follow the guidelines

Physical Database Design Methodology Design file organizations and indexes Estimate disk space requirements To estimate the amount of disk space that will be required by the database

Physical Database Design Methodology Design user views To design the user views that were identified during the ‘Requirements Collection and Analysis’ stage of the database system development lifecycle

Physical Database Design Methodology Design security mechanisms To design the security mechanisms for the database as specified by the users during the ‘Requirements Collection and Analysis’ stage of the database system development lifecycle Depends upon the underlying DBMS System security covers access and use of the database at the system level, such as a user name and password Data security covers access and use of database objects (such as relations and views) and the actions that users can have on the objects e.g. GRANT/REVOKE etc.

Monitoring and Tuning the Operational System Chapter 18

Physical Database Design Methodology Consider the introduction of controlled redundancy To determine whether introducing redundancy in a controlled manner by relaxing normalization rules will improve the performance of the system

Physical Database Design Methodology Consider the introduction of controlled redundancy Result of normalization is a design that is structurally consistent with minimal redundancy However, sometimes a normalized database does not provide maximum processing efficiency May be necessary to accept loss of some benefits of a fully normalized design in favor of performance

Physical Database Design Methodology Consider the introduction of controlled redundancy Also consider that denormalization: Makes implementation more complex Often sacrifices flexibility May speed up retrievals but it slows down updates Example of denormalization: Branch (branchNo, street, city, postcode, mgrStaffNo) 2NF Branch (branchNo, street, postcode, mgrStaffNo) 3NF Postcode (postcode, city) 3NF

Physical Database Design Methodology Consider denormalization in the following situations, specifically to speed up frequent or critical transactions: Combining one-to-one (1:1) relationships Duplicating non-key attributes in one-to-many (1:*) relationships to reduce joins Duplicating foreign key attributes in one-to-many (1:*) relationships to reduce joins Duplicating attributes in many-to-many (*:*) relationships to reduce joins Introducing repeating groups Creating extract tables Partitioning relations

Physical Database Design Methodology Combining one-to-one (1:1) relationships

Physical Database Design Methodology Duplicating non-key attributes in one-to-many (1:*) relationships to reduce joins

Physical Database Design Methodology Duplicating non-key attributes in one-to-many (1:*) relationships to reduce joins (Lookup tables)

Physical Database Design Methodology Duplicating non-key attributes in one-to-many (1:*) relationships to reduce joins (Lookup tables)

Physical Database Design Methodology Duplicating foreign key attributes in one-to-many (1:*) relationships to reduce joins

Physical Database Design Methodology Duplicating attributes in many-to-many (*:*) relationships to reduce joins

Physical Database Design Methodology Introducing repeating groups

Physical Database Design Methodology Creating extract tables Reports can access derived data and perform multi-relation joins on same set of base relations However, data the report is based on may be relatively static or may not have to be current Possible to create a single, highly denormalized extract table based on relations required by reports, and allow users to access extract table directly instead of base relations

Physical Database Design Methodology Partitioning relations Rather than combining relations together, alternative approach is to decompose them into a number of smaller and more manageable partitions Two main types of partitioning: Horizontal Partitioning: Distributing the tuples of a relation across a number of (smaller) relations Vertical Partitioning: Distributing the attributes of a relation across a number of (smaller) relations (the primary key is duplicated to allow the original relation to be reconstructed) Other types include hash, range, list etc.

Physical Database Design Methodology Partitioning relations

Physical Database Design Methodology

Physical Database Design Methodology Monitor and tune the operational system To monitor operational system and improve performance of system to correct inappropriate design decisions or reflect changing requirements

Physical Database Design Methodology Monitor and tune the operational system Number of factors may be used to measure efficiency: Transaction Throughput: Number of transactions processed in given time interval Response Time: Elapsed time for completion of a single transaction Disk Storage: Amount of disk space required to store database files No one factor is always correct Need to understand how the various hardware components interact and affect database performance

Summary Remaining steps/activities in Physical database design methodology Monitoring and performance tuning

References All the material (slides, diagrams etc.) presented in this lecture is taken (with modifications) from the Pearson Education website : http://www.booksites.net/connbegg