O'Reilly logo

Pro SQL Server Internals by Dmitri Korotkevitch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 7

image

Constraints

It is important to design databases in a way that makes efficient processing and querying of the data possible. That by itself, however, it is not enough. We must make sure that the data we get from the database can be trusted. Think about the Order Entry system, for example. We can query the OrderLineItems table to get the information about products we sold, but we cannot trust the results unless we know that the table has no orphaned rows, which do not belong to any orders in our system.

Constraints allow us to declare the data integrity and business rules for the database and have SQL Server enforce them. They ensure ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required