Physical Database Design

Slides:



Advertisements
Similar presentations
Irwin/McGraw-Hill Copyright © 2000 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS5th Edition.
Advertisements

Physical DataBase Design
Chapter 5: Physical Database Design and Performance
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management Dave Salisbury ( )
Chapter 13 (Web): Distributed Databases
Topic Denormalisation S McKeever Advanced Databases 1.
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.
Overview Distributed vs. decentralized Why distributed 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
© 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
Chapter 6 Physical Database Design. Introduction The purpose of physical database design is to translate the logical description of data into the technical.
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.1.
1 © Prentice Hall, 2002 Physical Database Design Dr. Bijoy Bordoloi.
MBA 664 Database Management Systems
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management
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.
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 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.
1 Distributed Databases BUAD/American University Distributed Databases.
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.
GLOBEX INFOTEK Copyright © 2013 Dr. Emelda Ntinglet-DavisSYSTEMS ANALYSIS AND DESIGN METHODSINTRODUCTORY SESSION EFFECTIVE DATABASE DESIGN for BEGINNERS.
© 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.
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. 
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Chapter 9 Designing Databases 9.1.
Physical Database Design DeSiaMorePowered by DeSiaMore 1.
 Distributed Database Concepts  Parallel Vs Distributed Technology  Advantages  Additional Functions  Distribution Database Design  Data Fragmentation.
1 Information Retrieval and Use De-normalisation and Distributed database systems Geoff Leese September 2008, revised October 2009.
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.
Databases and DBMSs Todd S. Bacastow January
Database Management.
Chapter 9 Designing Databases
Physical Database Design and Performance
MIS 322 – Enterprise Business Process Analysis
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
MANAGING DATA RESOURCES
G063 - Distributed Databases
Chapter 9 Designing Databases
Physical Database Design
Chapter 12 Designing Databases
Chapter 6: Physical Database Design and Performance
Chapter 10 Designing Databases
Chapter 9 Designing Databases
The Physical Design Stage of SDLC (figures 2.4, 2.5 revisited)
Chapter 17 Designing Databases
The Database Environment
Presentation transcript:

Physical Database Design MGIS 641 Koç University

Learning objectives Define the terms: Physical database design, and its major objectives. Describe major components of physical DB design. Describe the purpose of data volume and usage analysis. Describe basic purposes of indexes. Query Optimization Storage Technology RAID Describe basic data distribution strategies.

Introduction Physical database design is the last stage of DB design process. Major objective is to implement the the DB as a set of stored records, files, indexes etc that will provide adequate performance and ensure DB integrity, security and recoverability.

DB development process Planning Enterprise data model Analysis Conceptual data model Logical DB design Logical data model Physical DB design Technology model Implementation DB & repositories

Physical Design Process Normalized relations Volume estimates Attribute definitions Response time expectations Data security needs Backup/recovery needs Integrity expectations DBMS technology used Inputs Attribute data types Physical record descriptions File organizations Indexes Query optimization Leads to Decisions

Figure 6.1 - Composite usage map (Pine Valley Furniture Company)

Figure 6.1 - Composite usage map (Pine Valley Furniture Company) Data volumes

Figure 6.1 - Composite usage map (Pine Valley Furniture Company) Access Frequencies (per hour)

Figure 6.1 - Composite usage map (Pine Valley Furniture Company) Usage analysis: 200 purchased parts accessed per hour  80 quotations accessed from these purchased part accesses  70 suppliers accessed from these 80 quotation accesses

Figure 6.1 - Composite usage map (Pine Valley Furniture Company) Usage analysis: 75 suppliers accessed per hour  40 quotations accessed from these 75 supplier accesses  40 purchased parts accessed from these 40 quotation accesses

Volume Analysis TREATMENT PHYSICIAN PATIENT 4000 50 1000 (20) (4) (10) CHARGE PATIENT PHYSICIAN ITEM TREATMENT 1000 50 500 4000 10,000 (4) (20) (10) Estimated No. of Entity instances After an Avg. period of 30 days patient records are archived. There are 100 beds on Avg. A patient stays for 3 days. 4 treatments during stay. 10 charges. No. of charges outstanding for an item is 20. A physician treats 20 patients in 30 days.

Data Usage Analysis Identify major transactions required Analyse transactions to determine access paths and usage frequency TRANSACTION ANALYSIS FORM Transaction No : xxx-555 Date :3/5/2005 Transaction Name : Create Patient Bill Transaction Volume : Avg : 2/Hr Max : 10/Hr PATIENT 1 Transaction Map : Diagram showing the sequence of logical DB accesses. 1000 2 3 ITEM CHARGE 500 10,000 No Name Type of No of References Access Per Trans. Per Period 1 Entry-PATIENT R 1 10 2 PATIENT-CHARGE R 10 100 3 CHARGE-ITEM R 10 100

Composite Usage Map (75) (25) (100) (30) (60) (25) TREATMENT PATIENT PHYSICIAN 4000 1000 50 (25) (50) (125) (50) (250) ITEM CHARGE Composite Usage Map : Concise reference to the estimated volume and usage of data in the DB 500 10,000 Composite Usage Map including other types of transactions

Designing Fields Field: smallest unit of data in database Field design Choosing data type Coding, compression, encryption Controlling data integrity

Choosing Data Types CHAR – fixed-length character VARCHAR2 – variable-length character (memo) LONG – large number NUMBER – positive/negative number DATE – actual date BLOB – binary large object (good for graphics, sound clips, etc.)

Example code-look-up table (Pine Valley Furniture Company) Figure 6.2 Example code-look-up table (Pine Valley Furniture Company) Code saves space, but costs an additional lookup to obtain actual value.

Field Data Integrity Default value - assumed value if no explicit value Range control – allowable value limitations (constraints or validation rules) Null value control – allowing or prohibiting empty fields Referential integrity –for foreign-key to primary-key match-ups

Handling Missing Data Substitute an estimate of the missing value (e.g. using a formula) Construct a report listing missing values In programs, ignore missing data unless the value is significant Triggers can be used to perform these operations

File Organisation File organisation : A technique for physically arranging the records of a file on secondary storage Important factors to consider: Fast data retrieval High throuhput for processing data input and maintenance transactions Efficient usage of storage space Protection from failures or data loss Minimizing the need for reorganization Accomodating growth Security from unauthorized access

Indexes Index : A table or other data structure that is used to determine the locations of rows in a table that satisfy a condition. PRODUCT PRODUCT NO RECORD NO 50 3 100 1 400 2 625 4 Index tables are small and can be kept in the main memory.

When to use Indexes Larger tables Primary key, foreign key Specify index for nonkey attributes that are referred to in qualification, sorting, and grouping commands (e.g. WHERE, ORDER BY, GROUP BY) Check DBMS for the limit

Query Optimization Wise use of indexes Compatible data types Simple queries Avoid query nesting Temporary tables for query groups Select only needed columns No sort without index

File Access-Storage Technology RAID RAID An array of physical disk drives to the database user as if they form one logical storage unit.

RAID-0

RAID-1

RAID-5

Definitions Distributed Database: A single logical database that is spread physically across computers in multiple locations that are connected by a data communications link Decentralized Database: A collection of independent databases on non-networked computers They are NOT the same thing!

Reasons for Distributed Database Business unit autonomy and distribution Data sharing Data communication costs Data communication reliability and costs Multiple application vendors Database recovery Transaction and analytic processing

Data Distribution Strategy Basic data distribution strategies : Centralised : All data are centralised at a single site. Access problems for for remote users, data comms. cost, DB fails when central system fails. Replicated : A full copy of DB is assigned to more than one site. Maximise local access, update problems. Partitioned : DB is partitioned into is divided into non-overlapping partitions and assigned to a particular site. Data closer to local users Hybrid: DB is fragmented into critical and non-critical fragments, non-critical fragments stored at only one site others at multiple sites etc.

Partitioning Horizontal Partitioning: Distributing the rows of a table into several separate files Useful for situations where different users need access to different rows Vertical Partitioning: Distributing the columns of a table into several separate files Useful for situations where different users need access to different columns The primary key must be repeated in each file Combinations of Horizontal and Vertical Partitions often correspond with User Schemas (user views)

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

Data Replication Purposely storing the same data in multiple locations of the database Improves performance by allowing multiple users to access the same data at the same time with minimum contention Sacrifices data integrity due to data duplication