Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Acknowledgments
About the Author
Foreword by Jon Kern
Foreword by Douglas K. Barry
Introduction
The Audience for This Book
Why the Focus on Agile DBAs?
An Overview
Part I
Part II
Part III
Part IV
Part I
Part II
Part III
Part IV
The Audience for This Book
Why the Focus on Agile DBAs?
An Overview
Part I
Part II
Part III
Part IV
Part I
Part II
Part III
Part IV
Part One: Setting the Foundation
Chapter 1: The Agile Data Method
Overview
Why Working Together Is Currently Hard
Detecting That You Have a Problem
The Agile Movement
The Manifesto for Agile Software Development
The Principles for Agile Software Development
The Manifesto for Agile Software Development
The Principles for Agile Software Development
The Philosophies of Agile Data
Agile Data in a Nutshell
Agile DBAs
Application Developers
Enterprise Administrators
Enterprise Architects
Agile DBAs
Application Developers
Enterprise Administrators
Enterprise Architects
Agile Software Developers
Does Agile Data Solve Our Problems?
Summary
Overview
Why Working Together Is Currently Hard
Detecting That You Have a Problem
The Agile Movement
The Manifesto for Agile Software Development
The Principles for Agile Software Development
The Manifesto for Agile Software Development
The Principles for Agile Software Development
The Philosophies of Agile Data
Agile Data in a Nutshell
Agile DBAs
Application Developers
Enterprise Administrators
Enterprise Architects
Agile DBAs
Application Developers
Enterprise Administrators
Enterprise Architects
Agile Software Developers
Does Agile Data Solve Our Problems?
Summary
Chapter 2: From Use Cases to Databases —Real-World UML
Overview
An Overview of Object-Oriented Concepts
An Introduction to the Unified Modeling Language (UML)
Core UML Diagrams
Supplementary UML Diagrams
Core UML Diagrams
Supplementary UML Diagrams
A UML Profile for Data Modeling
Indicating the Type of Model or Storage Mechanism
Modeling Tables, Entities, and Views
Modeling Relationships
Modeling Data Attributes and Columns
Modeling Keys
Modeling Constraints and Triggers
Modeling Stored Procedures
Modeling Sections within a Database
Modeling Everything Else
Indicating the Type of Model or Storage Mechanism
Modeling Tables, Entities, and Views
Modeling Relationships
Modeling Data Attributes and Columns
Modeling Keys
Modeling Constraints and Triggers
Modeling Stored Procedures
Modeling Sections within a Database
Modeling Everything Else
Summary
Overview
An Overview of Object-Oriented Concepts
An Introduction to the Unified Modeling Language (UML)
Core UML Diagrams
Supplementary UML Diagrams
Core UML Diagrams
Supplementary UML Diagrams
A UML Profile for Data Modeling
Indicating the Type of Model or Storage Mechanism
Modeling Tables, Entities, and Views
Modeling Relationships
Modeling Data Attributes and Columns
Modeling Keys
Modeling Constraints and Triggers
Modeling Stored Procedures
Modeling Sections within a Database
Modeling Everything Else
Indicating the Type of Model or Storage Mechanism
Modeling Tables, Entities, and Views
Modeling Relationships
Modeling Data Attributes and Columns
Modeling Keys
Modeling Constraints and Triggers
Modeling Stored Procedures
Modeling Sections within a Database
Modeling Everything Else
Summary
Chapter 3: Data Modeling 101
Overview
The Role of the Agile DBA
What Is Data Modeling?
How Are Data Models Used in Practice?
Notation 101: How to Read Data Models
How Are Data Models Used in Practice?
Notation 101: How to Read Data Models
How to Model Data
Identify Data Entities
Identify Attributes
Apply Data-Naming Conventions
Identifying Relationships
Apply Data Model Patterns
Assign Keys
Identify Data Entities
Identify Attributes
Apply Data-Naming Conventions
Identifying Relationships
Apply Data Model Patterns
Assign Keys
How to Become Better at Modeling Data
Summary
Overview
The Role of the Agile DBA
What Is Data Modeling?
How Are Data Models Used in Practice?
Notation 101: How to Read Data Models
How Are Data Models Used in Practice?
Notation 101: How to Read Data Models
How to Model Data
Identify Data Entities
Identify Attributes
Apply Data-Naming Conventions
Identifying Relationships
Apply Data Model Patterns
Assign Keys
Identify Data Entities
Identify Attributes
Apply Data-Naming Conventions
Identifying Relationships
Apply Data Model Patterns
Assign Keys
How to Become Better at Modeling Data
Summary
Chapter 4: Data Normalization
Overview
Why Data Normalization?
The Role of the Agile DBA
The Rules of Data Normalization
First Normal Form (1NF)
Second Normal Form (2NF)
Third Normal Form (3NF)
Beyond 3NF
First Normal Form (1NF)
Second Normal Form (2NF)
Third Normal Form (3NF)
Beyond 3NF
Summary
Overview
Why Data Normalization?
The Role of the Agile DBA
The Rules of Data Normalization
First Normal Form (1NF)
Second Normal Form (2NF)
Third Normal Form (3NF)
Beyond 3NF
First Normal Form (1NF)
Second Normal Form (2NF)
Third Normal Form (3NF)
Beyond 3NF
Summary
Chapter 5: Class Normalization
Overview
How Does Class Normalization Relate to Other Object Design
Practices?
The Role of the Agile DBA
The Rules of Class Normalization
First Object Normal Form (1ONF)
Second Object Normal Form (2ONF)
Third Object Normal Form (3ONF)
Beyond 3ONF
First Object Normal Form (1ONF)
Second Object Normal Form (2ONF)
Third Object Normal Form (3ONF)
Beyond 3ONF
Summary
Overview
How Does Class Normalization Relate to Other Object Design
Practices?
The Role of the Agile DBA
The Rules of Class Normalization
First Object Normal Form (1ONF)
Second Object Normal Form (2ONF)
Third Object Normal Form (3ONF)
Beyond 3ONF
First Object Normal Form (1ONF)
Second Object Normal Form (2ONF)
Third Object Normal Form (3ONF)
Beyond 3ONF
Summary
Chapter 6: Relational Database Technology, Like It or Not
Overview
Relational Database Technology
Simple Features of Relational Databases
Advanced Features of Relational Databases
Simple Features of Relational Databases
Advanced Features of Relational Databases
Coupling: Your Greatest Enemy
Additional Challenges with Relational Databases
Encapsulation: Your Greatest Ally
Beyond Relational Databases: You Actually Have a Choice
Summary
Overview
Relational Database Technology
Simple Features of Relational Databases
Advanced Features of Relational Databases
Simple Features of Relational Databases
Advanced Features of Relational Databases
Coupling: Your Greatest Enemy
Additional Challenges with Relational Databases
Encapsulation: Your Greatest Ally
Beyond Relational Databases: You Actually Have a Choice
Summary
Chapter 7: The Object-Relational Impedance Mismatch
Overview
The Role of the Agile DBA
The Technological Impedance Mismatch
Deceptive Similarities
Subtle Differences
Deceptive Similarities
Subtle Differences
The Cultural Impedance Mismatch
Summary
Overview
The Role of the Agile DBA
The Technological Impedance Mismatch
Deceptive Similarities
Subtle Differences
Deceptive Similarities
Subtle Differences
The Cultural Impedance Mismatch
Summary
Chapter 8: Legacy Databases — Everything You Need to Know But Are Afraid to Deal With
Overview
The Role of the Agile DBA
Sources of Legacy Data
Understanding Common Problems with Legacy Data
Data Quality Challenges
Database Design Problems
Data Architecture Problems
Process Mistakes
Data Quality Challenges
Database Design Problems
Data Architecture Problems
Process Mistakes
Strategies for Working with Legacy Data
Try to Avoid Working with Legacy Data
Develop a Data-Error-Handling Strategy
Work Iteratively and Incrementally
Prefer Read-Only Legacy Data Access
Encapsulate Legacy Data Access
Introduce Data Adapters for Simple Legacy Access
Introduce a Staging Database for Complex Data
Access
Adopt Existing Tools
Try to Avoid Working with Legacy Data
Develop a Data-Error-Handling Strategy
Work Iteratively and Incrementally
Prefer Read-Only Legacy Data Access
Encapsulate Legacy Data Access
Introduce Data Adapters for Simple Legacy Access
Introduce a Staging Database for Complex Data
Access
Adopt Existing Tools
Data Integration Technologies
Summary
Overview
The Role of the Agile DBA
Sources of Legacy Data
Understanding Common Problems with Legacy Data
Data Quality Challenges
Database Design Problems
Data Architecture Problems
Process Mistakes
Data Quality Challenges
Database Design Problems
Data Architecture Problems
Process Mistakes
Strategies for Working with Legacy Data
Try to Avoid Working with Legacy Data
Develop a Data-Error-Handling Strategy
Work Iteratively and Incrementally
Prefer Read-Only Legacy Data Access
Encapsulate Legacy Data Access
Introduce Data Adapters for Simple Legacy Access
Introduce a Staging Database for Complex Data
Access
Adopt Existing Tools
Try to Avoid Working with Legacy Data
Develop a Data-Error-Handling Strategy
Work Iteratively and Incrementally
Prefer Read-Only Legacy Data Access
Encapsulate Legacy Data Access
Introduce Data Adapters for Simple Legacy Access
Introduce a Staging Database for Complex Data
Access
Adopt Existing Tools
Data Integration Technologies
Summary
Chapter 1: The Agile Data Method
Overview
Why Working Together Is Currently Hard
Detecting That You Have a Problem
The Agile Movement
The Manifesto for Agile Software Development
The Principles for Agile Software Development
The Manifesto for Agile Software Development
The Principles for Agile Software Development
The Philosophies of Agile Data
Agile Data in a Nutshell
Agile DBAs
Application Developers
Enterprise Administrators
Enterprise Architects
Agile DBAs
Application Developers
Enterprise Administrators
Enterprise Architects
Agile Software Developers
Does Agile Data Solve Our Problems?
Summary
Overview
Why Working Together Is Currently Hard
Detecting That You Have a Problem
The Agile Movement
The Manifesto for Agile Software Development
The Principles for Agile Software Development
The Manifesto for Agile Software Development
The Principles for Agile Software Development
The Philosophies of Agile Data
Agile Data in a Nutshell
Agile DBAs
Application Developers
Enterprise Administrators
Enterprise Architects
Agile DBAs
Application Developers
Enterprise Administrators
Enterprise Architects
Agile Software Developers
Does Agile Data Solve Our Problems?
Summary
Chapter 2: From Use Cases to Databases —Real-World UML
Overview
An Overview of Object-Oriented Concepts
An Introduction to the Unified Modeling Language (UML)
Core UML Diagrams
Supplementary UML Diagrams
Core UML Diagrams
Supplementary UML Diagrams
A UML Profile for Data Modeling
Indicating the Type of Model or Storage Mechanism
Modeling Tables, Entities, and Views
Modeling Relationships
Modeling Data Attributes and Columns
Modeling Keys
Modeling Constraints and Triggers
Modeling Stored Procedures
Modeling Sections within a Database
Modeling Everything Else
Indicating the Type of Model or Storage Mechanism
Modeling Tables, Entities, and Views
Modeling Relationships
Modeling Data Attributes and Columns
Modeling Keys
Modeling Constraints and Triggers
Modeling Stored Procedures
Modeling Sections within a Database
Modeling Everything Else
Summary
Overview
An Overview of Object-Oriented Concepts
An Introduction to the Unified Modeling Language (UML)
Core UML Diagrams
Supplementary UML Diagrams
Core UML Diagrams
Supplementary UML Diagrams
A UML Profile for Data Modeling
Indicating the Type of Model or Storage Mechanism
Modeling Tables, Entities, and Views
Modeling Relationships
Modeling Data Attributes and Columns
Modeling Keys
Modeling Constraints and Triggers
Modeling Stored Procedures
Modeling Sections within a Database
Modeling Everything Else
Indicating the Type of Model or Storage Mechanism
Modeling Tables, Entities, and Views
Modeling Relationships
Modeling Data Attributes and Columns
Modeling Keys
Modeling Constraints and Triggers
Modeling Stored Procedures
Modeling Sections within a Database
Modeling Everything Else
Summary
Chapter 3: Data Modeling 101
Overview
The Role of the Agile DBA
What Is Data Modeling?
How Are Data Models Used in Practice?
Notation 101: How to Read Data Models
How Are Data Models Used in Practice?
Notation 101: How to Read Data Models
How to Model Data
Identify Data Entities
Identify Attributes
Apply Data-Naming Conventions
Identifying Relationships
Apply Data Model Patterns
Assign Keys
Identify Data Entities
Identify Attributes
Apply Data-Naming Conventions
Identifying Relationships
Apply Data Model Patterns
Assign Keys
How to Become Better at Modeling Data
Summary
Overview
The Role of the Agile DBA
What Is Data Modeling?
How Are Data Models Used in Practice?
Notation 101: How to Read Data Models
How Are Data Models Used in Practice?
Notation 101: How to Read Data Models
How to Model Data
Identify Data Entities
Identify Attributes
Apply Data-Naming Conventions
Identifying Relationships
Apply Data Model Patterns
Assign Keys
Identify Data Entities
Identify Attributes
Apply Data-Naming Conventions
Identifying Relationships
Apply Data Model Patterns
Assign Keys
How to Become Better at Modeling Data
Summary
Chapter 4: Data Normalization
Overview
Why Data Normalization?
The Role of the Agile DBA
The Rules of Data Normalization
First Normal Form (1NF)
Second Normal Form (2NF)
Third Normal Form (3NF)
Beyond 3NF
First Normal Form (1NF)
Second Normal Form (2NF)
Third Normal Form (3NF)
Beyond 3NF
Summary
Overview
Why Data Normalization?
The Role of the Agile DBA
The Rules of Data Normalization
First Normal Form (1NF)
Second Normal Form (2NF)
Third Normal Form (3NF)
Beyond 3NF
First Normal Form (1NF)
Second Normal Form (2NF)
Third Normal Form (3NF)
Beyond 3NF
Summary
Chapter 5: Class Normalization
Overview
How Does Class Normalization Relate to Other Object Design
Practices?
The Role of the Agile DBA
The Rules of Class Normalization
First Object Normal Form (1ONF)
Second Object Normal Form (2ONF)
Third Object Normal Form (3ONF)
Beyond 3ONF
First Object Normal Form (1ONF)
Second Object Normal Form (2ONF)
Third Object Normal Form (3ONF)
Beyond 3ONF
Summary
Overview
How Does Class Normalization Relate to Other Object Design
Practices?
The Role of the Agile DBA
The Rules of Class Normalization
First Object Normal Form (1ONF)
Second Object Normal Form (2ONF)
Third Object Normal Form (3ONF)
Beyond 3ONF
First Object Normal Form (1ONF)
Second Object Normal Form (2ONF)
Third Object Normal Form (3ONF)
Beyond 3ONF
Summary
Chapter 6: Relational Database Technology, Like It or Not
Overview
Relational Database Technology
Simple Features of Relational Databases
Advanced Features of Relational Databases
Simple Features of Relational Databases
Advanced Features of Relational Databases
Coupling: Your Greatest Enemy
Additional Challenges with Relational Databases
Encapsulation: Your Greatest Ally
Beyond Relational Databases: You Actually Have a Choice
Summary
Overview
Relational Database Technology
Simple Features of Relational Databases
Advanced Features of Relational Databases
Simple Features of Relational Databases
Advanced Features of Relational Databases
Coupling: Your Greatest Enemy
Additional Challenges with Relational Databases
Encapsulation: Your Greatest Ally
Beyond Relational Databases: You Actually Have a Choice
Summary
Chapter 7: The Object-Relational Impedance Mismatch
Overview
The Role of the Agile DBA
The Technological Impedance Mismatch
Deceptive Similarities
Subtle Differences
Deceptive Similarities
Subtle Differences
The Cultural Impedance Mismatch
Summary
Overview
The Role of the Agile DBA
The Technological Impedance Mismatch
Deceptive Similarities
Subtle Differences
Deceptive Similarities
Subtle Differences
The Cultural Impedance Mismatch
Summary
Chapter 8: Legacy Databases — Everything You Need to Know But Are Afraid to Deal With
Overview
The Role of the Agile DBA
Sources of Legacy Data
Understanding Common Problems with Legacy Data
Data Quality Challenges
Database Design Problems
Data Architecture Problems
Process Mistakes
Data Quality Challenges
Database Design Problems
Data Architecture Problems
Process Mistakes
Strategies for Working with Legacy Data
Try to Avoid Working with Legacy Data
Develop a Data-Error-Handling Strategy
Work Iteratively and Incrementally
Prefer Read-Only Legacy Data Access
Encapsulate Legacy Data Access
Introduce Data Adapters for Simple Legacy Access
Introduce a Staging Database for Complex Data
Access
Adopt Existing Tools
Try to Avoid Working with Legacy Data
Develop a Data-Error-Handling Strategy
Work Iteratively and Incrementally
Prefer Read-Only Legacy Data Access
Encapsulate Legacy Data Access
Introduce Data Adapters for Simple Legacy Access
Introduce a Staging Database for Complex Data
Access
Adopt Existing Tools
Data Integration Technologies
Summary
Overview
The Role of the Agile DBA
Sources of Legacy Data
Understanding Common Problems with Legacy Data
Data Quality Challenges
Database Design Problems
Data Architecture Problems
Process Mistakes
Data Quality Challenges
Database Design Problems
Data Architecture Problems
Process Mistakes
Strategies for Working with Legacy Data
Try to Avoid Working with Legacy Data
Develop a Data-Error-Handling Strategy
Work Iteratively and Incrementally
Prefer Read-Only Legacy Data Access
Encapsulate Legacy Data Access
Introduce Data Adapters for Simple Legacy Access
Introduce a Staging Database for Complex Data
Access
Adopt Existing Tools
Try to Avoid Working with Legacy Data
Develop a Data-Error-Handling Strategy
Work Iteratively and Incrementally
Prefer Read-Only Legacy Data Access
Encapsulate Legacy Data Access
Introduce Data Adapters for Simple Legacy Access
Introduce a Staging Database for Complex Data
Access
Adopt Existing Tools
Data Integration Technologies
Summary
Part Two: Evolutionary Database Development
Chapter 9: Vive L’ Évolution
Overview
The Need for Methodological Flexibility
Beware of Data-Oriented BDUF
Evolutionary Development on a Project
The “Natural Order” of Things and Evolutionary Development
Summary
Overview
The Need for Methodological Flexibility
Beware of Data-Oriented BDUF
Evolutionary Development on a Project
The “Natural Order” of Things and Evolutionary Development
Summary
Chapter 10: Agile Model-Driven Development (AMDD)
Overview
The Role of the Agile DBA
What Is Agile Modeling?
AM Values
AM Principles
Agile Modeling Practices
AM Values
AM Principles
Agile Modeling Practices
When Is a Model Agile?
What Is Agile Model-Driven Development (AMDD)?
Agile Documentation
Summary
Overview
The Role of the Agile DBA
What Is Agile Modeling?
AM Values
AM Principles
Agile Modeling Practices
AM Values
AM Principles
Agile Modeling Practices
When Is a Model Agile?
What Is Agile Model-Driven Development (AMDD)?
Agile Documentation
Summary
Chapter 11: Test-Driven Development (TDD)
Overview
How Does TDD Work?
The Steps of TDD
TDD and Traditional Testing
TDD and Documentation
Test-Driven Database Development
TDD and Agile Model-Driven Development (AMDD)
Summary
Overview
How Does TDD Work?
The Steps of TDD
TDD and Traditional Testing
TDD and Documentation
Test-Driven Database Development
TDD and Agile Model-Driven Development (AMDD)
Summary
Chapter 12: Database Refactoring
Overview
Refactoring
Database Refactoring
Preserving Semantics
What Database Refactorings Aren’t
Categories of Database Refactorings
Preserving Semantics
What Database Refactorings Aren’t
Categories of Database Refactorings
Why Database Refactoring Is Hard
How to Refactor Your Database
Step 1: Start in Your Development Sandbox
Step 2: Implement the Code in Your Integration
Sandbox(es)
Step 3: Install the Code in Production
Step 1: Start in Your Development Sandbox
Step 2: Implement the Code in Your Integration
Sandbox(es)
Step 3: Install the Code in Production
Common Database Refactoring Smells
Adopting Database Refactoring within Your Organization
Database Refactoring Best Practices
Database Refactoring in the Real World
Summary
Overview
Refactoring
Database Refactoring
Preserving Semantics
What Database Refactorings Aren’t
Categories of Database Refactorings
Preserving Semantics
What Database Refactorings Aren’t
Categories of Database Refactorings
Why Database Refactoring Is Hard
How to Refactor Your Database
Step 1: Start in Your Development Sandbox
Step 2: Implement the Code in Your Integration
Sandbox(es)
Step 3: Install the Code in Production
Step 1: Start in Your Development Sandbox
Step 2: Implement the Code in Your Integration
Sandbox(es)
Step 3: Install the Code in Production
Common Database Refactoring Smells
Adopting Database Refactoring within Your Organization
Database Refactoring Best Practices
Database Refactoring in the Real World
Summary
Chapter 13: Database Encapsulation Strategies
Overview
Database Encapsulation Layers
The Role of the Agile DBA
Encapsulation-Layer Architectures
Encapsulation-Layer Implementation Strategies
Brute Force (the Encapsulation Strategy That Isn’t
One)
Data Access Objects
Persistence Frameworks
Services
When to Use Each Strategy
Transitioning between Strategies
Brute Force (the Encapsulation Strategy That Isn’t
One)
Data Access Objects
Persistence Frameworks
Services
When to Use Each Strategy
Transitioning between Strategies
Marshaling and Data Validation
Error Handling
Summary
Overview
Database Encapsulation Layers
The Role of the Agile DBA
Encapsulation-Layer Architectures
Encapsulation-Layer Implementation Strategies
Brute Force (the Encapsulation Strategy That Isn’t
One)
Data Access Objects
Persistence Frameworks
Services
When to Use Each Strategy
Transitioning between Strategies
Brute Force (the Encapsulation Strategy That Isn’t
One)
Data Access Objects
Persistence Frameworks
Services
When to Use Each Strategy
Transitioning between Strategies
Marshaling and Data Validation
Error Handling
Summary
Chapter 14: Mapping Objects to Relational Databases
Overview
The Role of the Agile DBA
Basic Mapping Concepts
Shadow Information
Mapping Meta Data
Shadow Information
Mapping Meta Data
Mapping Inheritance Structures
Map Entire Class Hierarchy to a Table
Map Each Concrete Class to Its Own Table
Map Each Class to Its Own Table
Map Classes to a Generic Structure
Comparing the Mapping Strategies
Mapping Multiple Inheritance
Map Entire Class Hierarchy to a Table
Map Each Concrete Class to Its Own Table
Map Each Class to Its Own Table
Map Classes to a Generic Structure
Comparing the Mapping Strategies
Mapping Multiple Inheritance
Mapping Object Relationships
Types of Relationships
How Relationships Are Implemented between Objects
How Relationships Are Implemented in Relational
Databases
Relationship Mappings
Mapping Ordered Collections
Mapping Recursive Relationships
Types of Relationships
How Relationships Are Implemented between Objects
How Relationships Are Implemented in Relational
Databases
Relationship Mappings
Mapping Ordered Collections
Mapping Recursive Relationships
Mapping Class Scope Properties
Why Data Schemas Shouldn’t Drive Object Schemas
Implementation Impact on Your Objects
Implications for the Model Driven Architecture (MDA)
Patternizing the Mappings
Summary
Overview
The Role of the Agile DBA
Basic Mapping Concepts
Shadow Information
Mapping Meta Data
Shadow Information
Mapping Meta Data
Mapping Inheritance Structures
Map Entire Class Hierarchy to a Table
Map Each Concrete Class to Its Own Table
Map Each Class to Its Own Table
Map Classes to a Generic Structure
Comparing the Mapping Strategies
Mapping Multiple Inheritance
Map Entire Class Hierarchy to a Table
Map Each Concrete Class to Its Own Table
Map Each Class to Its Own Table
Map Classes to a Generic Structure
Comparing the Mapping Strategies
Mapping Multiple Inheritance
Mapping Object Relationships
Types of Relationships
How Relationships Are Implemented between Objects
How Relationships Are Implemented in Relational
Databases
Relationship Mappings
Mapping Ordered Collections
Mapping Recursive Relationships
Types of Relationships
How Relationships Are Implemented between Objects
How Relationships Are Implemented in Relational
Databases
Relationship Mappings
Mapping Ordered Collections
Mapping Recursive Relationships
Mapping Class Scope Properties
Why Data Schemas Shouldn’t Drive Object Schemas
Implementation Impact on Your Objects
Implications for the Model Driven Architecture (MDA)
Patternizing the Mappings
Summary
Chapter 15: Performance Tuning
Overview
An Overview of Performance Tuning
The Role of the Agile DBA
Step One: Identify a Performance Problem
Step Two: Profile the Problem
Step Three: Tune the Problem Away
System Tuning
Database Access Tuning
System Tuning
Database Access Tuning
Choose the Right Access Strategy
Tune Your SQL
Tune Your Mappings
Database Tuning
Database Tuning
Denormalize Your Data Schema
Rework Database Logs
Update Your Database Configuration
Reorganize Data Storage
Rework Your Database Architecture/Design
Application Tuning
Application Tuning
Share Common Logic
Implement Lazy Reads
Introduce Caches
Combine Granular Functionality
Summary
Overview
An Overview of Performance Tuning
The Role of the Agile DBA
Step One: Identify a Performance Problem
Step Two: Profile the Problem
Step Three: Tune the Problem Away
System Tuning
Database Access Tuning
System Tuning
Database Access Tuning
Choose the Right Access Strategy
Tune Your SQL
Tune Your Mappings
Database Tuning
Database Tuning
Denormalize Your Data Schema
Rework Database Logs
Update Your Database Configuration
Reorganize Data Storage
Rework Your Database Architecture/Design
Application Tuning
Application Tuning
Share Common Logic
Implement Lazy Reads
Introduce Caches
Combine Granular Functionality
Summary
Chapter 16: Tools for Evolutionary Database Development
Overview
Tools
Sandboxes
Scripts
Summary
Overview
Tools
Sandboxes
Scripts
Summary
Chapter 9: Vive L’ Évolution
Overview
The Need for Methodological Flexibility
Beware of Data-Oriented BDUF
Evolutionary Development on a Project
The “Natural Order” of Things and Evolutionary Development
Summary
Overview
The Need for Methodological Flexibility
Beware of Data-Oriented BDUF
Evolutionary Development on a Project
The “Natural Order” of Things and Evolutionary Development
Summary
Chapter 10: Agile Model-Driven Development (AMDD)
Overview
The Role of the Agile DBA
What Is Agile Modeling?
AM Values
AM Principles
Agile Modeling Practices
AM Values
AM Principles
Agile Modeling Practices
When Is a Model Agile?
What Is Agile Model-Driven Development (AMDD)?
Agile Documentation
Summary
Overview
The Role of the Agile DBA
What Is Agile Modeling?
AM Values
AM Principles
Agile Modeling Practices
AM Values
AM Principles
Agile Modeling Practices
When Is a Model Agile?
What Is Agile Model-Driven Development (AMDD)?
Agile Documentation
Summary
Chapter 11: Test-Driven Development (TDD)
Overview
How Does TDD Work?
The Steps of TDD
TDD and Traditional Testing
TDD and Documentation
Test-Driven Database Development
TDD and Agile Model-Driven Development (AMDD)
Summary
Overview
How Does TDD Work?
The Steps of TDD
TDD and Traditional Testing
TDD and Documentation
Test-Driven Database Development
TDD and Agile Model-Driven Development (AMDD)
Summary
Chapter 12: Database Refactoring
Overview
Refactoring
Database Refactoring
Preserving Semantics
What Database Refactorings Aren’t
Categories of Database Refactorings
Preserving Semantics
What Database Refactorings Aren’t
Categories of Database Refactorings
Why Database Refactoring Is Hard
How to Refactor Your Database
Step 1: Start in Your Development Sandbox
Step 2: Implement the Code in Your Integration
Sandbox(es)
Step 3: Install the Code in Production
Step 1: Start in Your Development Sandbox
Step 2: Implement the Code in Your Integration
Sandbox(es)
Step 3: Install the Code in Production
Common Database Refactoring Smells
Adopting Database Refactoring within Your Organization
Database Refactoring Best Practices
Database Refactoring in the Real World
Summary
Overview
Refactoring
Database Refactoring
Preserving Semantics
What Database Refactorings Aren’t
Categories of Database Refactorings
Preserving Semantics
What Database Refactorings Aren’t
Categories of Database Refactorings
Why Database Refactoring Is Hard
How to Refactor Your Database
Step 1: Start in Your Development Sandbox
Step 2: Implement the Code in Your Integration
Sandbox(es)
Step 3: Install the Code in Production
Step 1: Start in Your Development Sandbox
Step 2: Implement the Code in Your Integration
Sandbox(es)
Step 3: Install the Code in Production
Common Database Refactoring Smells
Adopting Database Refactoring within Your Organization
Database Refactoring Best Practices
Database Refactoring in the Real World
Summary
Chapter 13: Database Encapsulation Strategies
Overview
Database Encapsulation Layers
The Role of the Agile DBA
Encapsulation-Layer Architectures
Encapsulation-Layer Implementation Strategies
Brute Force (the Encapsulation Strategy That Isn’t
One)
Data Access Objects
Persistence Frameworks
Services
When to Use Each Strategy
Transitioning between Strategies
Brute Force (the Encapsulation Strategy That Isn’t
One)
Data Access Objects
Persistence Frameworks
Services
When to Use Each Strategy
Transitioning between Strategies
Marshaling and Data Validation
Error Handling
Summary
Overview
Database Encapsulation Layers
The Role of the Agile DBA
Encapsulation-Layer Architectures
Encapsulation-Layer Implementation Strategies
Brute Force (the Encapsulation Strategy That Isn’t
One)
Data Access Objects
Persistence Frameworks
Services
When to Use Each Strategy
Transitioning between Strategies
Brute Force (the Encapsulation Strategy That Isn’t
One)
Data Access Objects
Persistence Frameworks
Services
When to Use Each Strategy
Transitioning between Strategies
Marshaling and Data Validation
Error Handling
Summary
Chapter 14: Mapping Objects to Relational Databases
Overview
The Role of the Agile DBA
Basic Mapping Concepts
Shadow Information
Mapping Meta Data
Shadow Information
Mapping Meta Data
Mapping Inheritance Structures
Map Entire Class Hierarchy to a Table
Map Each Concrete Class to Its Own Table
Map Each Class to Its Own Table
Map Classes to a Generic Structure
Comparing the Mapping Strategies
Mapping Multiple Inheritance
Map Entire Class Hierarchy to a Table
Map Each Concrete Class to Its Own Table
Map Each Class to Its Own Table
Map Classes to a Generic Structure
Comparing the Mapping Strategies
Mapping Multiple Inheritance
Mapping Object Relationships
Types of Relationships
How Relationships Are Implemented between Objects
How Relationships Are Implemented in Relational
Databases
Relationship Mappings
Mapping Ordered Collections
Mapping Recursive Relationships
Types of Relationships
How Relationships Are Implemented between Objects
How Relationships Are Implemented in Relational
Databases
Relationship Mappings
Mapping Ordered Collections
Mapping Recursive Relationships
Mapping Class Scope Properties
Why Data Schemas Shouldn’t Drive Object Schemas
Implementation Impact on Your Objects
Implications for the Model Driven Architecture (MDA)
Patternizing the Mappings
Summary
Overview
The Role of the Agile DBA
Basic Mapping Concepts
Shadow Information
Mapping Meta Data
Shadow Information
Mapping Meta Data
Mapping Inheritance Structures
Map Entire Class Hierarchy to a Table
Map Each Concrete Class to Its Own Table
Map Each Class to Its Own Table
Map Classes to a Generic Structure
Comparing the Mapping Strategies
Mapping Multiple Inheritance
Map Entire Class Hierarchy to a Table
Map Each Concrete Class to Its Own Table
Map Each Class to Its Own Table
Map Classes to a Generic Structure
Comparing the Mapping Strategies
Mapping Multiple Inheritance
Mapping Object Relationships
Types of Relationships
How Relationships Are Implemented between Objects
How Relationships Are Implemented in Relational
Databases
Relationship Mappings
Mapping Ordered Collections
Mapping Recursive Relationships
Types of Relationships
How Relationships Are Implemented between Objects
How Relationships Are Implemented in Relational
Databases
Relationship Mappings
Mapping Ordered Collections
Mapping Recursive Relationships
Mapping Class Scope Properties
Why Data Schemas Shouldn’t Drive Object Schemas
Implementation Impact on Your Objects
Implications for the Model Driven Architecture (MDA)
Patternizing the Mappings
Summary
Chapter 15: Performance Tuning
Overview
An Overview of Performance Tuning
The Role of the Agile DBA
Step One: Identify a Performance Problem
Step Two: Profile the Problem
Step Three: Tune the Problem Away
System Tuning
Database Access Tuning
System Tuning
Database Access Tuning
Choose the Right Access Strategy
Tune Your SQL
Tune Your Mappings
Database Tuning
Database Tuning
Denormalize Your Data Schema
Rework Database Logs
Update Your Database Configuration
Reorganize Data Storage
Rework Your Database Architecture/Design
Application Tuning
Application Tuning
Share Common Logic
Implement Lazy Reads
Introduce Caches
Combine Granular Functionality
Summary
Overview
An Overview of Performance Tuning
The Role of the Agile DBA
Step One: Identify a Performance Problem
Step Two: Profile the Problem
Step Three: Tune the Problem Away
System Tuning
Database Access Tuning
System Tuning
Database Access Tuning
Choose the Right Access Strategy
Tune Your SQL
Tune Your Mappings
Database Tuning
Database Tuning
Denormalize Your Data Schema
Rework Database Logs
Update Your Database Configuration
Reorganize Data Storage
Rework Your Database Architecture/Design
Application Tuning
Application Tuning
Share Common Logic
Implement Lazy Reads
Introduce Caches
Combine Granular Functionality
Summary
Chapter 16: Tools for Evolutionary Database Development
Overview
Tools
Sandboxes
Scripts
Summary
Overview
Tools
Sandboxes
Scripts
Summary
Part Three: Practical Data-Oriented Development Techniques
Chapter 17: Implementing Concurrency Control
Overview
The Role of the Agile DBA
Collisions
Types of Locking
Types of Locking
Write Locks
Read Locks
Resolving Collisions
Resolving Collisions
Understanding Transactions
The Basics of Transactions
Implementing Transactions
The Basics of Transactions
Implementing Transactions
Summary
Overview
The Role of the Agile DBA
Collisions
Types of Locking
Types of Locking
Write Locks
Read Locks
Resolving Collisions
Resolving Collisions
Understanding Transactions
The Basics of Transactions
Implementing Transactions
The Basics of Transactions
Implementing Transactions
Summary
Chapter 18: Finding Objects in Relational Databases
Overview
The Role of the Agile DBA
Find Strategies
Brute Force (Embedded SQL)
Query Objects
Meta Data-Driven
When to Apply Each Strategy
Brute Force (Embedded SQL)
Query Objects
Meta Data-Driven
When to Apply Each Strategy
Implementation Techniques
Use the Native Error-Handling Strategy
Expect “Logic” Errors
Always Return a Collection
Use Proxies and Lazy Initialization for Search Lists
Use Lazy Reads for High-Overhead Attributes
Program for People
Use the Native Error-Handling Strategy
Expect “Logic” Errors
Always Return a Collection
Use Proxies and Lazy Initialization for Search Lists
Use Lazy Reads for High-Overhead Attributes
Program for People
Representing Find Results
Summary
Overview
The Role of the Agile DBA
Find Strategies
Brute Force (Embedded SQL)
Query Objects
Meta Data-Driven
When to Apply Each Strategy
Brute Force (Embedded SQL)
Query Objects
Meta Data-Driven
When to Apply Each Strategy
Implementation Techniques
Use the Native Error-Handling Strategy
Expect “Logic” Errors
Always Return a Collection
Use Proxies and Lazy Initialization for Search Lists
Use Lazy Reads for High-Overhead Attributes
Program for People
Use the Native Error-Handling Strategy
Expect “Logic” Errors
Always Return a Collection
Use Proxies and Lazy Initialization for Search Lists
Use Lazy Reads for High-Overhead Attributes
Program for People
Representing Find Results
Summary
Chapter 19: Implementing Referential Integrity and Shared Business Logic
Overview
The Role of the Agile DBA
How Object Technology Complicates Referential Integrity
Multiple Entity/Relationship Representation
Object Relationship Management
Lazy Reads
Caches
Aggregation, Composition, and Association
Architectural Layering
Removal from Memory versus Persistent Deletion
Multiple Entity/Relationship Representation
Object Relationship Management
Lazy Reads
Caches
Aggregation, Composition, and Association
Architectural Layering
Removal from Memory versus Persistent Deletion
Where Should You Implement Referential Integrity?
Referential Integrity Implementation Options
Business Logic Implementation Options
General Implementation Strategies
Referential Integrity Implementation Options
Business Logic Implementation Options
General Implementation Strategies
Summary
Overview
The Role of the Agile DBA
How Object Technology Complicates Referential Integrity
Multiple Entity/Relationship Representation
Object Relationship Management
Lazy Reads
Caches
Aggregation, Composition, and Association
Architectural Layering
Removal from Memory versus Persistent Deletion
Multiple Entity/Relationship Representation
Object Relationship Management
Lazy Reads
Caches
Aggregation, Composition, and Association
Architectural Layering
Removal from Memory versus Persistent Deletion
Where Should You Implement Referential Integrity?
Referential Integrity Implementation Options
Business Logic Implementation Options
General Implementation Strategies
Referential Integrity Implementation Options
Business Logic Implementation Options
General Implementation Strategies
Summary
Chapter 20: Implementing Security Access Control
Overview
The Role of the Agile DBA
Authentication
Authorization
Issues
Database Implementation Strategies
Security Design Patterns
Object-Oriented Implementation Strategies
Implications
Issues
Database Implementation Strategies
Security Design Patterns
Object-Oriented Implementation Strategies
Implications
Effective Security Strategies
Summary
Overview
The Role of the Agile DBA
Authentication
Authorization
Issues
Database Implementation Strategies
Security Design Patterns
Object-Oriented Implementation Strategies
Implications
Issues
Database Implementation Strategies
Security Design Patterns
Object-Oriented Implementation Strategies
Implications
Effective Security Strategies
Summary
Chapter 21: Implementing Reports
Overview
The Role of the Agile DBA
Database Deployment Architecture
Reporting within Your Application
Reporting outside Your Application
Database Design Strategies
Implementation Strategies
Challenges That Make Reporting Hard
Summary
Overview
The Role of the Agile DBA
Database Deployment Architecture
Reporting within Your Application
Reporting outside Your Application
Database Design Strategies
Implementation Strategies
Challenges That Make Reporting Hard
Summary
Chapter 22: Realistic XML
The Role of the Agile DBA
An XML Primer
Strengths of XML
Weaknesses of XML
Strengths of XML
Weaknesses of XML
Practical Applications for XML
Vocabularies
How to Model XML
XML Mapping and Data Binding
How to Persist XML in Relational Databases
How to Persist XML in XML Databases
XML Development Strategies
Summary
The Role of the Agile DBA
An XML Primer
Strengths of XML
Weaknesses of XML
Strengths of XML
Weaknesses of XML
Practical Applications for XML
Vocabularies
How to Model XML
XML Mapping and Data Binding
How to Persist XML in Relational Databases
How to Persist XML in XML Databases
XML Development Strategies
Summary
Chapter 17: Implementing Concurrency Control
Overview
The Role of the Agile DBA
Collisions
Types of Locking
Types of Locking
Write Locks
Read Locks
Resolving Collisions
Resolving Collisions
Understanding Transactions
The Basics of Transactions
Implementing Transactions
The Basics of Transactions
Implementing Transactions
Summary
Overview
The Role of the Agile DBA
Collisions
Types of Locking
Types of Locking
Write Locks
Read Locks
Resolving Collisions
Resolving Collisions
Understanding Transactions
The Basics of Transactions
Implementing Transactions
The Basics of Transactions
Implementing Transactions
Summary
Chapter 18: Finding Objects in Relational Databases
Overview
The Role of the Agile DBA
Find Strategies
Brute Force (Embedded SQL)
Query Objects
Meta Data-Driven
When to Apply Each Strategy
Brute Force (Embedded SQL)
Query Objects
Meta Data-Driven
When to Apply Each Strategy
Implementation Techniques
Use the Native Error-Handling Strategy
Expect “Logic” Errors
Always Return a Collection
Use Proxies and Lazy Initialization for Search Lists
Use Lazy Reads for High-Overhead Attributes
Program for People
Use the Native Error-Handling Strategy
Expect “Logic” Errors
Always Return a Collection
Use Proxies and Lazy Initialization for Search Lists
Use Lazy Reads for High-Overhead Attributes
Program for People
Representing Find Results
Summary
Overview
The Role of the Agile DBA
Find Strategies
Brute Force (Embedded SQL)
Query Objects
Meta Data-Driven
When to Apply Each Strategy
Brute Force (Embedded SQL)
Query Objects
Meta Data-Driven
When to Apply Each Strategy
Implementation Techniques
Use the Native Error-Handling Strategy
Expect “Logic” Errors
Always Return a Collection
Use Proxies and Lazy Initialization for Search Lists
Use Lazy Reads for High-Overhead Attributes
Program for People
Use the Native Error-Handling Strategy
Expect “Logic” Errors
Always Return a Collection
Use Proxies and Lazy Initialization for Search Lists
Use Lazy Reads for High-Overhead Attributes
Program for People
Representing Find Results
Summary
Chapter 19: Implementing Referential Integrity and Shared Business Logic
Overview
The Role of the Agile DBA
How Object Technology Complicates Referential Integrity
Multiple Entity/Relationship Representation
Object Relationship Management
Lazy Reads
Caches
Aggregation, Composition, and Association
Architectural Layering
Removal from Memory versus Persistent Deletion
Multiple Entity/Relationship Representation
Object Relationship Management
Lazy Reads
Caches
Aggregation, Composition, and Association
Architectural Layering
Removal from Memory versus Persistent Deletion
Where Should You Implement Referential Integrity?
Referential Integrity Implementation Options
Business Logic Implementation Options
General Implementation Strategies
Referential Integrity Implementation Options
Business Logic Implementation Options
General Implementation Strategies
Summary
Overview
The Role of the Agile DBA
How Object Technology Complicates Referential Integrity
Multiple Entity/Relationship Representation
Object Relationship Management
Lazy Reads
Caches
Aggregation, Composition, and Association
Architectural Layering
Removal from Memory versus Persistent Deletion
Multiple Entity/Relationship Representation
Object Relationship Management
Lazy Reads
Caches
Aggregation, Composition, and Association
Architectural Layering
Removal from Memory versus Persistent Deletion
Where Should You Implement Referential Integrity?
Referential Integrity Implementation Options
Business Logic Implementation Options
General Implementation Strategies
Referential Integrity Implementation Options
Business Logic Implementation Options
General Implementation Strategies
Summary
Chapter 20: Implementing Security Access Control
Overview
The Role of the Agile DBA
Authentication
Authorization
Issues
Database Implementation Strategies
Security Design Patterns
Object-Oriented Implementation Strategies
Implications
Issues
Database Implementation Strategies
Security Design Patterns
Object-Oriented Implementation Strategies
Implications
Effective Security Strategies
Summary
Overview
The Role of the Agile DBA
Authentication
Authorization
Issues
Database Implementation Strategies
Security Design Patterns
Object-Oriented Implementation Strategies
Implications
Issues
Database Implementation Strategies
Security Design Patterns
Object-Oriented Implementation Strategies
Implications
Effective Security Strategies
Summary
Chapter 21: Implementing Reports
Overview
The Role of the Agile DBA
Database Deployment Architecture
Reporting within Your Application
Reporting outside Your Application
Database Design Strategies
Implementation Strategies
Challenges That Make Reporting Hard
Summary
Overview
The Role of the Agile DBA
Database Deployment Architecture
Reporting within Your Application
Reporting outside Your Application
Database Design Strategies
Implementation Strategies
Challenges That Make Reporting Hard
Summary
Chapter 22: Realistic XML
The Role of the Agile DBA
An XML Primer
Strengths of XML
Weaknesses of XML
Strengths of XML
Weaknesses of XML
Practical Applications for XML
Vocabularies
How to Model XML
XML Mapping and Data Binding
How to Persist XML in Relational Databases
How to Persist XML in XML Databases
XML Development Strategies
Summary
The Role of the Agile DBA
An XML Primer
Strengths of XML
Weaknesses of XML
Strengths of XML
Weaknesses of XML
Practical Applications for XML
Vocabularies
How to Model XML
XML Mapping and Data Binding
How to Persist XML in Relational Databases
How to Persist XML in XML Databases
XML Development Strategies
Summary
Part Four: Adopting Agile Database Techniques
Chapter 23: How You Can Become Agile
Overview
You Don’t Have to Be Superhuman
Agility Is Really Just a Mindset
Become a Generalizing Specialist
Summary
Overview
You Don’t Have to Be Superhuman
Agility Is Really Just a Mindset
Become a Generalizing Specialist
Summary
Chapter 24: Bringing Agility into Your Organization
Overview
Change the Way You Look at Software Development
Understand the Challenges You Face
Actually Try It
Block Nonagile Coworkers
Be Realistic
Parting Thoughts
Overview
Change the Way You Look at Software Development
Understand the Challenges You Face
Actually Try It
Block Nonagile Coworkers
Be Realistic
Parting Thoughts
Appendix: Database Refactoring Catalog
Overview
Numerics
A
B
C
D
Numerics
A
B
C
D
Overview
Numerics
A
B
C
D
Numerics
A
B
C
D
Chapter 23: How You Can Become Agile
Overview
You Don’t Have to Be Superhuman
Agility Is Really Just a Mindset
Become a Generalizing Specialist
Summary
Overview
You Don’t Have to Be Superhuman
Agility Is Really Just a Mindset
Become a Generalizing Specialist
Summary
Chapter 24: Bringing Agility into Your Organization
Overview
Change the Way You Look at Software Development
Understand the Challenges You Face
Actually Try It
Block Nonagile Coworkers
Be Realistic
Parting Thoughts
Overview
Change the Way You Look at Software Development
Understand the Challenges You Face
Actually Try It
Block Nonagile Coworkers
Be Realistic
Parting Thoughts
Appendix: Database Refactoring Catalog
Overview
Numerics
A
B
C
D
Numerics
A
B
C
D
Overview
Numerics
A
B
C
D
Numerics
A
B
C
D
← Prev
Back
Next →
← Prev
Back
Next →