A Developer's Guide to Data Modeling for SQL Server: Covering SQL Server 2005 and 2008 [NOOK Book]

Overview

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 ...
See more details below
A Developer's Guide to Data Modeling for SQL Server: Covering SQL Server 2005 and 2008

Available on NOOK devices and apps  
  • NOOK Devices
  • NOOK HD/HD+ Tablet
  • NOOK
  • NOOK Color
  • NOOK Tablet
  • Tablet/Phone
  • NOOK for Windows 8 Tablet
  • NOOK for iOS
  • NOOK for Android
  • NOOK Kids for iPad
  • PC/Mac
  • NOOK for Windows 8
  • NOOK for PC
  • NOOK for Mac
  • NOOK Study

Want a NOOK? Explore Now

NOOK Book (eBook)
$22.99
BN.com price
(Save 42%)$39.99 List Price

Overview

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
  • Understand your data model’s physical elements, from storage to referential integrity
  • Provide programmability via stored procedures, user-defined functions, triggers, and .NET CLR integration
  • Normalize data models, one step at a time
  • Gather and interpret requirements more effectively
  • Learn an effective methodology for creating logical models
  • Overcome modeling problems related to entities, attribute, data types, storage overhead, performance, and relationships
  • Create physical models—from establishing naming guidelines through implementing business rules and constraints
  • Use SQL Server’s unique indexing capabilities, and overcome their limitations
  • Create abstraction layers that enhance security, extensibility, and flexibility

Read More Show Less

Product Details

  • ISBN-13: 9780132701532
  • Publisher: Pearson Education
  • Publication date: 7/8/2008
  • Sold by: Barnes & Noble
  • Format: eBook
  • Edition number: 1
  • Pages: 304
  • Sales rank: 880,289
  • File size: 5 MB

Meet the Author

Eric Johnson (Microsoft SQL MVP)is the co-founder of Consortio Services and the primary database technologies consultant. His background in information technology is diverse, ranging from operating systems and hardware to specialized applications and development. He has even done his fair share of work on networks. Because IT is a way to support business processes, Eric has also acquired an MBA. All in all, he has ten years of experience with IT, much of it working with Microsoft SQL Server. Eric has managed and designed databases of all shapes and sizes. He has delivered numerous SQL Server training classes and Webcasts as well as presentations at national technology conferences. Most recently, he presented at TechMentor on SQL Server 2005 replication, reporting services, and integration services. In addition, he is active in the local SQL Server community, serving as the president of the Colorado Springs SQL Server Users Group. He is also the co-host of CS Techcast, a weekly podcast for IT professionals at cstechcast.com. You can find Eric’s blog at consortioservices.com/blog.

Joshua Jones
(MCTS, SQL Server 2005; MCITP, Database Administrator) is operating systems and database systems consultant with Consortio Services in Colorado Springs. There he provides training, administration, analysis, and design support for customers using SQL Server 2000 and 2005. In his seven years as an IT professional, he has worked in many areas of information technology, including Windows desktop support, Windows 2000 and 2003 server infrastructure design and support (AD, DNS, MS Exchange), telephony switch support, and network support. Josh has spoken at various PASS sponsored events about SQL Server topics such as 64-bit SQL Server implementation, reporting services administration, and performance tuning. He is also a co-host of CS Techcast, a weekly podcast for IT professionals at cstechcast.com.

Read More Show Less

Table of Contents

Preface xv
Acknowledgments xvii
About the Authors xix


PART I: Data Modeling Theory 1

Chapter 1: Data Modeling Overview 3

Databases 4
Why a Sound Data Model Is Important 6
Data Consistency 6
The Process of Data Modeling 14
Summary 21

Chapter 2: Elements Used in Logical Data Models 23
Entities 23
Attributes 24
Referential Integrity 32
Relationships 35
Relationship Types 35
Relationship Options 40
Cardinality 41
Using Subtypes and Supertypes 42
Supertypes and Subtypes Defined 42
When to Use Subtype Clusters 44
Summary 44

Chapter 3: Physical Elements of Data Models 45
Physical Storage 45
Referential Integrity 59
Programming 71
Implementing Supertypes and Subtypes 75
Summary 79

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
Summary 116

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
Summary 145

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
Summary 170

Chapter 8: Common Data Modeling Problems 171
Entity Problems 171
Attribute Problems 176
Relationship Problems 182
Summary 185

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
Summary 219

Chapter 10: Indexing Considerations 221
Indexing Overview 221
Database Usage Requirements 230
Determining the Appropriate Indexes 233
Implementing Indexes in SQL Server 236
Summary 239

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
Summary 254

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


Index 271

Read More Show Less

Preface


As database professionals, we are frequently asked to come into existing environments and "fix" existing databases. This is usually because of performance problems that application developers and users have uncovered over the lifetime of a given application. Inevitably, the expectation is that we can work some magic database voodoo and the performance problems will go away. Unfortunately, as most of you already know, the problem often lies within the design of the database. We often spend hours in meetings trying to justify the cost of redesigning an entire database in order to support the actual requirements of the application as well as the performance needs of the business. We often find ourselves tempering good design with real world problems such as budget, resources, and business needs that simply won't allow for the time needed to completely resolve all of the issues a badly designed database has.


What happens when you find yourself in the position where you have to redesign an existing database, or better yet, you have to design a new database from the ground up? You know there are rules to follow, and best practices that can help guide you to a scalable, functional design. If you follow these rules you won't leave database developers and DBAs cursing your name three years from now (well, any more than necessary). Additionally, with the advent of multiple enterprise level relational database management systems, it's equally important to understand the ins and outs of the database platform your design will be implemented on.


There were two reasons we decided to write this book, a reference for all those individuals out there who need to design or rework a datamodel that will eventually sit on Microsoft SQL Server. First, while there are dozens of great books out there that cover relational database design from top to bottom, and dozens of books on how to performance tune and write T-SQL for SQL Server, there just wasn't anything that helped a developer or designer cover the process from beginning to end with the right mix of theory and practical experience. Secondly, we'd seen literally hundreds of poorly designed databases left behind by people who had neither the background in database theory nor the experience with SQL Server to design an effective data model. Sometimes, those databases were well designed for the technology they were implemented on; then they were simply copied and pasted (for lack of a more accurate term) onto SQL Server, often with disastrous results. We thought a book that discussed design for SQL Server would be helpful for those people redesigning an existing database to be migrated from another platform to SQL Server.


We've all read that software design, and relational database design in particular, should be platform agnostic. We do not necessarily disagree with that outlook. However, it is important to understand what RDBMS will be hosting your design, as that can affect what capabilities you can plan for, and what weaknesses you may need to account for in your design. Additionally, with the introduction of SQL Server 2005, Microsoft has implemented quite a bit of technology that extends the capabilities of SQL Server beyond simple database hosting. While we don't cover every piece of extended functionality (in order to keep readers from needing a crane to carry this book), we reference it where appropriate to give you the opportunity to learn how this functionality can help you.


Hopefully, within the pages of this book, you'll find everything you need to help you through the entire design and development process. Everything from talking to users, designing use cases, and developing your data model to implementing that model, and ensuring it has solid performance characteristics. When possible, we've provided examples that we hope will be useful and applicable to you in some way or another. After spending literally hours developing the background and requirements for our fictional company, we have been thinking about starting our own music business. And let's face it, reading line after line of text about the various uses for a varchar datatype can't always be thrilling, so we've tried to add some anecdotes, a few jokes, and even a paraphrased movie quote or two to keep it lively.


Writing this book has also been quite an adventure for both of us, in learning how the publishing process works, learning the finer details of writing for a mass audience, and learning that even though we are our own worst critics, it's hard to hear criticism from your friends, even if they're right; but you're always glad that they are.

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)