This eBook includes the following formats, accessible from your Account page after purchase:
EPUB The open industry format known for its reflowable content and usability on supported mobile devices.
MOBI The eBook format compatible with the Amazon Kindle and Amazon Kindle applications.
PDF The popular standard, used most often with the free Adobe® Reader® software.
This eBook requires no passwords or activation to read. We customize your eBook by discreetly watermarking it with your name, making it uniquely yours.
Also available in other formats.
Register your product to gain access to bonus material or receive a coupon.
“A Developer’s Guide to Data Modeling for SQL Server explains the concepts and practice of data modeling with a clarity that makes the technology accessible to anyone building databases and data-driven applications.
“Eric Johnson and Joshua Jones combine a deep understanding of the science of data modeling with the art that comes with years of experience. If you’re new to data modeling, or find the need to brush up on its concepts, this book is for you.”
—Peter Varhol, Executive Editor, Redmond Magazine
Model SQL Server Databases That Work Better, Do More, and Evolve More Smoothly
Effective data modeling is essential to ensuring that your databases will perform well, scale well, and evolve to meet changing requirements. However, if you’re modeling databases to run on Microsoft SQL Server 2008 or 2005, theoretical or platform-agnostic data modeling knowledge isn’t enough: models that don’t reflect SQL Server’s unique real-world strengths and weaknesses often lead to disastrous performance.
A Developer’s Guide to Data Modeling for SQL Server is a practical, SQL Server-specific guide to data modeling for every developer, architect, and administrator. This book offers you invaluable start-to-finish guidance for designing new databases, redesigning existing SQL Server data models, and migrating databases from other platforms.
You’ll begin with a concise, practical overview of the core data modeling techniques. Next, you’ll walk through requirements gathering and discover how to convert requirements into effective SQL Server logical models. Finally, you’ll systematically transform those logical models into physical models that make the most of SQL Server’s extended functionality. All of this book’s many examples are available for download from a companion Web site.
This book enables you to
About the Authors xix
PART I: Data Modeling Theory 1
Chapter 1: Data Modeling Overview 3
Why a Sound Data Model Is Important 6
Data Consistency 6
The Process of Data Modeling 14
Chapter 2: Elements Used in Logical Data Models 23
Referential Integrity 32
Relationship Types 35
Relationship Options 40
Using Subtypes and Supertypes 42
Supertypes and Subtypes Defined 42
When to Use Subtype Clusters 44
Chapter 3: Physical Elements of Data Models 45
Physical Storage 45
Referential Integrity 59
Implementing Supertypes and Subtypes 75
PART II: Business Requirements 95
Chapter 5: Requirements Gathering 97
Requirements Gathering Overview 98
Gathering Requirements Step by Step 98
Business Needs 111
Balancing Technical Limitations with Business Needs 112
Gathering Usage Data 112
Chapter 6: Interpreting Requirements 117
Mountain View Music 117
Compiling Requirements Data 119
Determining Model Requirements 121
Determining the Business Rules 138
Requirements Documentation 141
Looking Ahead: The Business Review 143
PART III: Creating the Logical Model 147
Chapter 7: Creating the Logical Model 149
Diagramming a Data Model 149
Using Requirements to Build the Model 157
Building the Model 164
Chapter 8: Common Data Modeling Problems 171
Entity Problems 171
Attribute Problems 176
Relationship Problems 182
PART IV: Creating the Physical Model 187
Chapter 9: Creating the Physical Model with SQL Server 189
Naming Guidelines 189
Deriving the Physical Model 198
Implementing Business Rules in the Physical Model 211
Chapter 10: Indexing Considerations 221
Indexing Overview 221
Database Usage Requirements 230
Determining the Appropriate Indexes 233
Implementing Indexes in SQL Server 236
Chapter 11: Creating an Abstraction Layer in SQL Server 241
What Is an Abstraction Layer? 241
Why Use an Abstraction Layer? 242
An Abstraction Layer’s Relationship to the Logical Model 245
An Abstraction Layer’s Relationship to Object-Oriented Programming 246
Implementing an Abstraction Layer 247
Appendix A: Sample Logical Model 255
Appendix B: Sample Physical Model 261
Appendix C: SQL Server 2008 Reserved Words 267
Appendix D: Recommended Naming Standards 269