Chapter 6 Physical Database Design. Introduction The purpose of physical database design is to translate the logical description of data into the technical.

Slides:



Advertisements
Similar presentations
Physical DataBase Design
Advertisements

Chapter 5: Physical Database Design and Performance
Physical Database Design and Performance Dr. Mohamed Osman Ali Hegazi1.
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter.
Chapter Physical Database Design Methodology Software & Hardware Mapping Logical Design to DBMS Physical Implementation Security Implementation Monitoring.
© 2007 by Prentice Hall 1 Chapter 6: Physical Database Design and Performance Modern Database Management 8 th Edition Jeffrey A. Hoffer, Mary B. Prescott,
IS 4420 Database Fundamentals Chapter 6: Physical Database Design and Performance Leon Chen.
Data Storage Formats Files Databases
Physical Database Monitoring and Tuning the Operational System.
© 2005 by Prentice Hall 1 Chapter 6: Physical Database Design and Performance Modern Database Management 7 th Edition Jeffrey A. Hoffer, Mary B. Prescott,
Modern Systems Analysis and Design Third Edition
Chapter 9 Designing Databases
Chapter 8 Physical Database Design. McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Outline Overview of Physical Database.
10/3/2000SIMS 257: Database Management -- Ray Larson Relational Algebra and Calculus University of California, Berkeley School of Information Management.
© 2005 by Prentice Hall 1 Chapter 6: Physical Database Design and Performance Modern Database Management 7 th Edition Jeffrey A. Hoffer, Mary B. Prescott,
Chapter 6: Physical Database Design and Performance
10-1 Chapter 10 Designing Databases Modern Systems Analysis and Design Jeffrey A. Hoffer Joey F. George Joseph S. Valacich.
1 C omputer information systems Design Instructor: Mr. Ahmed Al Astal IGGC1202 College Requirement University Of Palestine.
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.1.
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.1.
Chapters 17 & 18 Physical Database Design Methodology.
CSC271 Database Systems Lecture # 30.
1 © Prentice Hall, 2002 Physical Database Design Dr. Bijoy Bordoloi.
MBA 664 Database Management Systems
CS 8630 Database Administration, Dr. Guimaraes , Physical Design and Performance Class Will Start Momentarily… CS8630 Database Administration.
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management
© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 2 Slide 1 Chapter 10 Designing Databases.
Chapter 9 Designing Databases Modern Systems Analysis and Design Sixth Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich.
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.
Lecture 12 Designing Databases 12.1 COSC4406: Software Engineering.
Copyright 2006 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Third Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter.
1 © Prentice Hall, 2002 Chapter 6: Physical Database Design and Performance Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott,
Chapter 8 Physical Database Design
Chapter 6 1 © Prentice Hall, 2002 The Physical Design Stage of SDLC (figures 2.4, 2.5 revisited) Project Identification and Selection Project Initiation.
CHAPTER 5: PHYSICAL DATABASE DESIGN AND PERFORMANCE © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition.
Chapter 10 Designing Databases Modern Systems Analysis and Design Fifth Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich.
Database Management COP4540, SCS, FIU Physical Database Design (ch. 16 & ch. 3)
Copyright 2006 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Third Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter.
Database Management COP4540, SCS, FIU Physical Database Design (2) (ch. 16 & ch. 6)
File and Database Design Class 22. File and database design: 1. Choosing the storage format for each attribute from the logical data model. 2. Grouping.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 6: Physical Database Design and Performance Modern Database Management 9 th Edition.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 UNIT 5: Physical Database Design and Performance Modern Database Management 9 th Edition Jeffrey.
Physical Database Design Purpose- translate the logical description of data into the technical specifications for storing and retrieving data Goal - create.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Essentials of Systems Analysis and Design Fourth Edition Joseph S. Valacich Joey F.
Chapter 8 Physical Database Design. Outline Overview of Physical Database Design Inputs of Physical Database Design File Structures Query Optimization.
Copyright 2001 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter 9 Designing Databases.
Chapter 10 Designing Databases. Objectives:  Define key database design terms.  Explain the role of database design in the IS development process. 
Session 1 Module 1: Introduction to Data Integrity
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Chapter 9 Designing Databases 9.1.
Physical Database Design DeSiaMorePowered by DeSiaMore 1.
11-1 © Prentice Hall, 2004 Chapter 11: Physical Database Design Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich,
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 12 Designing.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Lecture 6: Physical Database Design and Performance Modern Database Management 9 th Edition.
Copyright © 2016 Pearson Education, Inc. Modern Database Management 12 th Edition Jeff Hoffer, Ramesh Venkataraman, Heikki Topi CHAPTER 5: PHYSICAL DATABASE.
Converting ER/EER to logical schema; physical design issues 1.
Chapter 9 Designing Databases
Physical Database Design
Physical Database Design and Performance
ITD1312 Database Principles Chapter 5: Physical Database Design
Modern Systems Analysis and Design Third Edition
What is Database Administration
CHAPTER 5: PHYSICAL DATABASE DESIGN AND PERFORMANCE
Chapter 9 Designing Databases
Physical Database Design
Chapter 12 Designing Databases
Chapter 6: Physical Database Design and Performance
Chapter 10 Designing Databases
The Physical Design Stage of SDLC (figures 2.4, 2.5 revisited)
Presentation transcript:

Chapter 6 Physical Database Design

Introduction 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 adequate performance and insure database integrity, security and recoverability.

Inputs to Physical Design Normalized relations. Volume estimates. Attribute definitions. Data usage: entered, retrieved, deleted, updated. Response time requirements. Requirements for security, backup, recovery, retention, integrity. DBMS characteristics.

Physical Design Decisions Specifying attribute data types. Modifying the logical design. Specifying the file organization. Choosing indexes.

Designing Fields Choosing data type. Coding, compression, encryption. Controlling data integrity. –Default value. –Range control. –Null value control. –Referential integrity.

Example of Data Dictionary (for team deliverable)

Example code-look-up table (Pine Valley Furniture Company)

Composite usage map (Pine Valley Furniture Company)

Designing Fields Handling missing data. –Substitute an estimate of the missing value. –Trigger a report listing missing values. –In programs, ignore missing data unless the value is significant.

Designing Physical Files Physical File: A file as stored on the disk. Constructs to link two pieces of data: –Sequential storage. –Pointers. File Organization: How the files are arranged on the disk. Access Method: How the data can be retrieved based on the file organization

Creating Indexes Consider this table: EMPLOYEE(E_ID, Name, Salary_Grade, Phone) Where E_ID is the primary key And the domain for Salary_Grade is 1, 2, 3 or 4.

Rules for Using Indexes 1. Use on larger tables. 2. Index the primary key of each table. 3. Index search fields. 4. Fields in WHERE clause of SQL commands. 5. When there are >100 values but not when there are <30 values.

Rules for Using Indexes 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.

Physical Design Decisions Denormalization Partitioning Selection of File Organization Clustering Files Placement of Indexes Derived Columns Repeating Groups Across Columns –e.g., skill attribute

Denormalization One-to-one relationship. Fig. 6-3 (former 7-3) STUDENT and APPLICATION become a single relation STUDENT Many-to-many relationship. Fig. 6-4 (former 7-4) Initial logical design suggests a need for 3 entities Physical design suggests collapsing ITEM and PRICE_QUOTE into a single relation ITEM_QUOTE Small amount of data duplication in Description field One-to-many relationship. (next slide) Initial logical design suggests 2 relations STORAGE relation is combined into ITEM relation yielding a single relation ITEM containing some redundant data in Description field.

A possible denormalization situation: reference data

Partitioning Horizontal Partitioning: Distributing the rows of a table into several separate files. Vertical Partitioning: Distributing the columns of a table into several separate files. – The primary key must be repeated in each file.

Partitioning Advantages of Partitioning: –Records used together are grouped together. –Each partition can be optimized for performance. –Security, recovery. –Partitions stored on different disks: contention. –Take advantage of parallel processing capability. Disadvantages of Partitioning: –Slow retrievals across partitions. –Complexity.

Designing Physical Files Physical file: a named portion of secondary memory (tape, hard disk, etc) allocated for the purpose of storing physical records. Logical versus physical: –Biblio.MDB – physical file containing a MS Access database –Authors.MDB is composed of tables, or logical files – Author, Title, Title_Author, Publisher

Physical File Organization Sequential files –Similar to alphabetical listing in the white pages, or cassette tape Indexed –A table (index) is created to determine the location of rows in a file that satisfy some condition –Secondary key: a field or combination of fields used in the condition of a WHERE clause eg, state, zip code Hashed: the address of each record is determined using an algorithm that converts a primary key into a physical record address

Rules for Adding Derived Columns Use when aggregate values are regularly retrieved. Use when aggregate values are costly to calculate. Permit updating only of source data. Create triggers to cascade changes from source data.

Rules for Storing Repeating Groups Across Columns Consider storing repeating groups across columns rather than down rows when: –The repeating group has a fixed number of occurrences, each of which has a different meaning or –The entire repeating group is normally accessed and updated as one unit.

Rules for Storing Repeating Groups Across Columns EMPLOYEE Phone Design Option: EMPLOYEE(EmpID, EmpName, …) EMP_PHONE(EmpID, Phone) Another Design Option: EMPLOYEE(EmpID, EmpName, Phone1, Phone2, …)

Selection of a Primary Key Consider contriving a shorter field or selecting another candidate key to substitute for a long, multi-field primary key (and all associated foreign keys.) –System-generated non-information-carrying key –Versus –Primary key like Phone number

RAID with four disks and striping

RAID A set of physical disks that appear to the db user/programs as if they are one large logical storage unit. Striping: balances the workload by storing sequential files across several disks; can then access them sequentially more rapidly Risk: a disk drive failure –Solution: redundant data stores