Chapter 4 Logical & Physical Database Design

Slides:



Advertisements
Similar presentations
CHAPTER OBJECTIVE: NORMALIZATION THE SNOWFLAKE SCHEMA.
Advertisements

Relational Terminology. Normalization A method where data items are grouped together to better accommodate business changes Provides a method for representing.
Chapter 10: Designing Databases
BY LECTURER/ AISHA DAWOOD DW Lab # 2. LAB EXERCISE #1 Oracle Data Warehousing Goal: Develop an application to implement defining subject area, design.
Physical DataBase Design
©Silberschatz, Korth and Sudarshan12.1Database System Concepts Chapter 12: Part C Part A:  Index Definition in SQL  Ordered Indices  Index Sequential.
Management Information Systems, Sixth Edition
Physical Database Design Chapter 5 G. Green 1. Agenda Purpose Activities Fields Records Files 2.
Chapter 13 (Web): Distributed Databases
Dimensional Modeling Business Intelligence Solutions.
Chapter 3 The Relational Model Transparencies © Pearson Education Limited 1995, 2005.
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.
Chapter 3. 2 Chapter 3 - Objectives Terminology of relational model. Terminology of relational model. How tables are used to represent data. How tables.
Data Management Design
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,
Introduction to Databases Transparencies
Physical Design CS 543 – Data Warehousing. CS Data Warehousing (Sp ) - Asim LUMS2 Physical Design Steps 1. Develop standards 2.
Data Warehousing - 3 ISYS 650. Snowflake Schema one or more dimension tables do not join directly to the fact table but must join through other dimension.
Modern Systems Analysis and Design Third Edition
Chapter 8 Physical Database Design. McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Outline Overview of Physical Database.
Introduction to 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
Lecture 2 The Relational Model. Objectives Terminology of relational model. How tables are used to represent data. Connection between mathematical relations.
Chapter 4 The Relational Model Pearson Education © 2014.
Chapter 4 The Relational Model.
Chapter 3 The Relational Model Transparencies Last Updated: Pebruari 2011 By M. Arief
Data Warehousing Seminar Chapter 5. Data Warehouse Design Methodology Data Warehousing Lab. HyeYoung Cho.
1 © Prentice Hall, 2002 Physical Database Design Dr. Bijoy Bordoloi.
CS 345: Topics in Data Warehousing Tuesday, October 19, 2004.
Management Information Systems By Effy Oz & Andy Jones
Physical Database Design & Performance. Optimizing for Query Performance For DBs with high retrieval traffic as compared to maintenance traffic, optimizing.
TM 7-1 Copyright © 1999 Addison Wesley Longman, Inc. Physical Database Design.
Lecture 12 Designing Databases 12.1 COSC4406: Software Engineering.
10/3/2012ISC329 Isabelle Bichindaritz1 Logical Design.
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.
PowerPoint Presentation for Dennis, Wixom, & Tegarden Systems Analysis and Design with UML, 4th Edition Copyright © 2009 John Wiley & Sons, Inc. All rights.
1 Data Warehouses BUAD/American University Data Warehouses.
Data Warehouse Design Xintao Wu University of North Carolina at Charlotte Nov 10, 2008.
Chapter 12: Designing Databases
Lecture # 3 & 4 Chapter # 2 Database System Concepts and Architecture Muhammad Emran Database Systems 1.
Database Management COP4540, SCS, FIU Physical Database Design (ch. 16 & ch. 3)
1 Chapter 10 Joins and Subqueries. 2 Joins & Subqueries Joins – Methods to combine data from multiple tables – Optimizer information can be limited based.
Chapter 10 Designing the Files and Databases. SAD/CHAPTER 102 Learning Objectives Discuss the conversion from a logical data model to a physical database.
Designing a Data Warehousing System. Overview Business Analysis Process Data Warehousing System Modeling a Data Warehouse Choosing the Grain Establishing.
Physical Database Design Purpose- translate the logical description of data into the technical specifications for storing and retrieving data Goal - create.
Chapter 8 Physical Database Design. Outline Overview of Physical Database Design Inputs of Physical Database Design File Structures Query Optimization.
Chapter 5 Index and Clustering
The Relational Model. 2 Relational Model Terminology u A relation is a table with columns and rows. –Only applies to logical structure of the database,
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Chapter 9 Designing Databases 9.1.
Logical Design 12/10/2009GAK1. Learning Objectives How to remove features from a local conceptual model that are not compatible with the relational model.
1 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Chapter 10 Designing Databases.
Lecture # 24 Introduction to SQL Muhammad Emran Database Systems.
Copyright © 2016 Pearson Education, Inc. Modern Database Management 12 th Edition Jeff Hoffer, Ramesh Venkataraman, Heikki Topi CHAPTER 9: DATA WAREHOUSING.
Converting ER/EER to logical schema; physical design issues 1.
Indexing Structures for Files and Physical Database Design
Record Storage, File Organization, and Indexes
Physical Database Design
Physical Database Design and Performance
ITD1312 Database Principles Chapter 5: Physical Database Design
What is Database Administration
CHAPTER 5: PHYSICAL DATABASE DESIGN AND PERFORMANCE
Physical Database Design
MANAGING DATA RESOURCES
The Physical Design Stage of SDLC (figures 2.4, 2.5 revisited)
Presentation transcript:

Chapter 4 Logical & Physical Database Design

Logical Data Modeling Application data models have two primary phases Establishing logical data model Translating logical data model into physical data model Normalization & Third Normal Form All data in an entity is dependent on the primary key There should be no repeating groups of attributes No data in an entity is dependent on part of the key No data in an entity is dependent on any nonkey attribute “The key, the whole key, and nothing but the key, so help me Codd”

Logical Data Modeling Application data models have two primary phases Establishing logical data model Translating logical data model into physical data model Normalization & Third Normal Form All data in an entity is dependent on the primary key There should be no repeating groups of attributes No data in an entity is dependent on part of the key No data in an entity is dependent on any nonkey attribute “The key, the whole key, and nothing but the key, so help me Codd”

Logical Data Modeling (cont.) Determining Data types for attributes Fixed & Variable length attributes Integer & floating point numbers Pictures, video, long character data (LONG, LOB) Dates, Timestamps, and the like When determining data types Consider the impact on storage Consider database fragmentation Carefully consider options before using LONG, LOB

Logical Data Modeling (cont.) Keys Natural constructed naturally from entity Column(s) have meaning Usually will have a longer key length than artificial keys Often are made up of multiple columns Artificial unintelligent, has no meaning Usually a sequential number Generally will perform better than natural keys Never needs updating (easier to manage referential integrity) Ongoing debate about the use of natural vs. artificial keys

Logical Data Modeling (cont.) Data Warehouse Design Have different logical requirements Common data models include Star Schema Fact table (generally large) Series of dimension tables (generally small) Snowflake Schema A more complex star schema Hybrid Have different physical requirements Partitioning Bitmap Indexes Materialized Views

Logical to Physical Logical design meets functional requirements Physical design meets performance requirements Common mistake is making physical model exact copy of logical model Usually means lower performance Pay the price upfront to properly determine physical model

Logical to Physical (cont.) Key steps include Mapping entities to tables Choosing a table type Determining Data types Precision & optional attributes Denormalization Done for performance Can increase overhead Summary tables Partitioning tables

The Star Schema Common in Data Warehousing Typically show better performance for warehouses Fact table Contains the detailed information Many foreign keys to “dimension” tables Dimension tables Many tables that surround the fact table Are reference or “categorized” tables such as time, product, and customer See Figure 4-3 (p. 94)

The Snowflake Schema An expanded star schema Dimensions are split into multiple tables Is a normalization technique To be used with caution, can degrade performance Can complicate queries Can reduce storage requirements See Figure 4-4 (p. 95)

Materialized Views Also common in the data warehouse Done to aggregate or join data Created to simplify access for the end-user Is a physical table (contains storage) Provides sophisticated refresh functionality Refreshes can be complete or just the changes Query rewrite functionality gives user transparency of the views themselves

Physical Storage Options Segment space management Can be automatic (preferred) or manual Affect how oracle manages block management regarding: Freelists Block-related parameters (PCTUSED,PCTFREE) Row migration Indicated by table fetch continued row (V$SYSSTAT) INITRANS – transaction slots within a block ITL (Interested Transaction list)

Physical Storage Options (cont.) Compression Reduces storage & memory requirement Makes DML slower Select operations can be faster In Oracle 10g Done during table creation or reorganization Loads needed to be done “direct-load” Normal DML caused decompression In Oracle 11g New advanced compression component Can function within normal DML operations Best used with Table scans Character type data

Physical Storage Options (cont.) LOBS (Large Object Data) Character data > 4000 bytes (CLOB) Binary data (BLOB) Stored separately from remainder of row data Storage mechanism differs than row data (chunks) Have different storage options New security features in Oracle 11g

Oracle Partitioning Breaks table/index up into logical segments Each partition can have separate storage characteristics Benefits include Reading only relevant partitions needed for queries Can help improve parallel processing for DML, select operations, and database maintenance operations Deletes can be done much cheaper Can reduce latch contention

Oracle Partitioning (cont.) Partitioning types: Range (typically time-based) Hash (helps ensure equal-sized partitions) List (based on specific set of values – e.g. – state code) Composite partitioning (combination of above) New Oracle 11g partitioning Reference (child tables inherit partitioning from parents) Interval (can enable auto-addition of partitions) Virtual-column (enables partitioning on expressions)

Oracle Partitioning (cont.) Choosing a partitioning strategy Range (good if data will be purged) Hash (helps if parallel operations are needed) List (queries based on a small subset of table’s data) Composite partitioning (if multiple of above factors are indicated) Enterprise manager partitioning advisor Can help suggest partitioning schemes