Team Dosen UMN Physical DB Design Connolly Book Chapter 18.

Slides:



Advertisements
Similar presentations
1 Term 2, 2004, Lecture 5, Physical DesignMarian Ursu, Department of Computing, Goldsmiths College Physical Design 3.
Advertisements

1 Pertemuan > > Matakuliah: >/ > Tahun: > Versi: >
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.
Physical Database Monitoring and Tuning the Operational System.
1 Methodology : Conceptual Databases Design © Pearson Education Limited 1995, 2005.
Lecture Fourteen Methodology - Conceptual Database Design
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.
Chapter 14 & 15 Conceptual & Logical Database Design Methodology
Query Processing Presented by Aung S. Win.
CSC271 Database Systems Lecture # 21. Summary: Previous Lecture  Phases of database SDLC  Prototyping (optional)  Implementation  Data conversion.
Overview of the Database Development Process
Chapters 17 & 18 Physical Database Design Methodology.
CSC271 Database Systems Lecture # 30.
ITEC224 Database Programming
Lecture 9 Methodology – Physical Database Design for Relational Databases.
Chapter 16 Methodology - Conceptual Database Design.
1 Introduction to Database Systems. 2 Database and Database System / A database is a shared collection of logically related data designed to meet the.
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.
CSCI 3140 Module 2 – Conceptual Database Design Theodore Chiasson Dalhousie University.
1 Chapter 15 Methodology Conceptual Databases Design Transparencies Last Updated: April 2011 By M. Arief
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.
CSCI 3140 Module 3 – Logical Database Design for the Relational Model Theodore Chiasson Dalhousie University.
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 9 Logical database design – Step 1 Transparencies.
Object Persistence (Data Base) Design Chapter 13.
Object Persistence Design Chapter 13. Key Definitions Object persistence involves the selection of a storage format and optimization for performance.
Conceptual Database Design
© 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.
Chapter 8 Methodology - Conceptual Database Design Chapter 15 in Textbook.
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.
Chapter 9 Logical Database Design : Mapping ER Model To Tables.
University of Sunderland COM 220 Lecture Ten Slide 1 Database Performance.
Physical Database Design Purpose- translate the logical description of data into the technical specifications for storing and retrieving data Goal - create.
Modelling Methodologies Chapter 16, 17, 18. Modeling Methodologies2 Database Design Physical DB design Logical DB design Conceptual DB design Hardware.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Chapter 9 Designing Databases 9.1.
B. Information Technology (Hons.) CMPB245: Database Design Physical Design.
April 20022/CS/3X1 Database Design Design method John Wordsworth Department of Computer Science The University of Reading Room.
10/3/2017 Chapter 6 Index Structures.
Methodology Conceptual Databases Design
Indexes By Adrienne Watt.
Record Storage, File Organization, and Indexes
Methodology Conceptual Database Design
Physical Database Design
Methodology – Physical Database Design for Relational Databases
Physical Database Design for Relational Databases Step 3 – Step 8
國立臺北科技大學 課程:資料庫系統 fall Chapter 18
Conceptual Database Design
Methodology Conceptual Databases Design
Presentation transcript:

Team Dosen UMN Physical DB Design Connolly Book Chapter 18

Team Dosen UMN Comparing Logical vs Physical DB Design Sources of information for physical design process includes logical data model and documentation that describes model. Logical database design is concerned with the what, physical database design is concerned with the how.

Team Dosen UMN Physical Database Design The process of producing a description of the implementation of the database on secondary storage; it describes the base relations, file organizations, and indexes used to achieve efficient access to the data, and any associated integrity constraints and security measures.

Team Dosen UMN The steps of Physical Database Design Physical Database Design Step 3 Translate logical data model for target DBMS Step 4 Design file organizations and indexes Step 5 Design user views Step 6 Design security mechanisms Step 7 Consider the introduction of controlled redundancy Step 8 Monitor and tune the operational system

Team Dosen UMN Step 3 Translate logical data model for target DBMS To produce a relational database schema from the logical data model that can be implemented in the target DBMS. Need to know functionality of target DBMS such as how to create base relations and whether the system supports the definition of: – PKs, FKs, and AKs; – required data – i.e. whether system supports NOT NULL; – domains; – relational integrity constraints; – general constraints. Steps: – Step 3.1 Design base relations – Step 3.2 Design representation of derived data – Step 3.3 Design general constraints

Team Dosen UMN Step 3.1 Design Base Relations Objective: To decide how to represent base relations identified in logical model in target DBMS. For each relation, need to define: – the name of the relation; – a list of simple attributes in brackets; – the PK and, where appropriate, AKs and FKs. – referential integrity constraints for any FKs identified. From data dictionary, we have for each attribute: – its domain, consisting of a data type, length, and any constraints on the domain; – an optional default value for the attribute; – whether it can hold nulls; – whether it is derived, and if so, how it should be computed.

Team Dosen UMN DBDL for the PropertyForRent Relation Documentation

Team Dosen UMN Step 3.2 Design representation of Derived Data Objective: To decide how to represent any derived data present in logical data model in target DBMS. Examine logical data model and data dictionary, and produce list of all derived attributes. Derived attribute can be stored in database or calculated every time it is needed. Database Designer will calculate – additional cost to store the derived data and keep it consistent with operational data from which it is derived; – cost to calculate it each time it is required. Less expensive option is chosen subject to performance constraints.

Team Dosen UMN PropertyforRent Relation and Staff Relation with Derived Attribute noOfProperties Documentation

Team Dosen UMN Step 3.3 Design general constraints Objective: To design the general constraints for target DBMS. Some DBMS provide more facilities than others for defining enterprise constraints. Example: CONSTRAINT StaffNotHandlingTooMuch CHECK (NOT EXISTS (SELECT staffNo FROM PropertyForRent GROUP BY staffNo HAVING COUNT(*) > 100))

Team Dosen UMN 4. Design File Organization and Indexes Objective: To determine the optimum file organization to store the base relations and the indexes that are required to achieve acceptable performances, that is the way in which relations and tuples will be held on the data storage. Database Designer must understand the typical workload that database must support.

Team Dosen UMN Step 4.1 Analyze transactions Objective: 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: – How frequently we use them: transactions that run frequently and will have a significant impact on performance; – How important they are: transactions that are critical to the business; – When we need them: times during the day/week when there will be a high demand made on the database (called the peak load). 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.

Team Dosen UMN Step 4.1 Analyze transactions Often not possible to analyze all transactions, so investigate most ‘important’ ones. To help identify these can use: – transaction/relation cross-reference matrix, showing relations that each transaction accesses, and/or – transaction usage map, indicating which relations are potentially heavily used.

Team Dosen UMN Cross-referencing transactions and relations Documentation

Team Dosen UMN Example Transaction Usage Map Documentation

Team Dosen UMN Example Transaction Analysis Form Documentation

Team Dosen UMN Step 4.2 Choose file organizations Objective: 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.

Team Dosen UMN Step 4.3 Choose indexes Objective: To determine whether adding indexes will improve the performance of the system. 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. In this case, choose the attribute for ordering or clustering the tuples as: – attribute that is used most often for join operations - this makes join operation more efficient, or – attribute that is used most often to access the tuples in a relation in order of that attribute.

Team Dosen UMN Step 4.3 Choose indexes If ordering attribute chosen is key of relation, index will be a primary index; otherwise, index will be a clustering index. Each relation can only have either a primary index or a clustering index. Secondary indexes provide a mechanism for specifying an additional key for a base relation that can be used to retrieve data more efficiently. Have to balance overhead involved in maintenance and use of secondary indexes against performance improvement gained when retrieving data. This includes: – adding an index record to every secondary index whenever tuple is inserted; – updating secondary index when corresponding tuple updated; – increase in disk space needed to store secondary index; – possible performance degradation during query optimization to consider all secondary indexes.

Team Dosen UMN Step 4.3 Choose indexes – Guidelines for choosing ‘wish-list’ 1: Index small relations. 2. Index PK of a relation if it is not a key of the file organization. 3: Add secondary index to a FK 4. Add secondary index to any attribute heavily used as a secondary key. 5. Add secondary index on attributes involved in: selection or join criteria; ORDER BY; GROUP BY; and other operations involving sorting (such as UNION or DISTINCT). Choose TRUE or FALSE

Team Dosen UMN Step 4.3 Choose indexes – Guidelines for choosing ‘wish-list’ 6. Add secondary index on attributes involved in built-in functions. 7. Add secondary index on attributes that could result in an index-only plan. 8: Indexing an attribute or relation that is frequently updated. 9: Indexing an attribute if the query will retrieve a significant proportion of the relation. 10: Indexing attributes that consist of long character strings.

Team Dosen UMN What index we need? Select branchNo, AVG(salary) From Staff Group By branchNo; Select * from PropertyForRent Where type=‘Flat’ OR rent>500 OR rooms>5; Select * from PropertyForRent Where type=‘Flat’ AND rent>500 AND rooms>5; branchNo and salary Rooms won’t help Type & Rent others will help

Team Dosen UMN Step 4.4 Estimate disk space requirements Objective: To estimate the amount of disk space that will be required by the database.

Team Dosen UMN Step 5 Design User Views Objective: To design the user views that were identified during the Requirements Collection and Analysis stage of the database system development lifecycle.

Team Dosen UMN Step 6 Design Security Measures Objective : To design the security measures for the database as specified by the users.