Microsoft® SQL Server® 2012 Bible

(Ben Green) #1

19


Chapter 2: Data Architecture


2


domain. In the case of the foreign key, the domain is the list of values in the
related primary key. Referential integrity, therefore, is not an issue of the integrity
of the primary key but of the foreign key.
■ Transactional integrity: Ensures that every logical unit of work, such as inserting
100 rows or updating 1,000 rows, is executed as a single transaction. The quality of
a database product is measured by its transactions’ adherence to the ACID proper-
ties: atomic — all or nothing; consistent — the database begins and ends the trans-
action in a consistent state; isolated — one transaction does not affect another
transaction; and durable — once committed always committed.

In addition to these four generally accepted defi nitions of data integrity, user-defi ned data
integrity should be considered as well:

■ User-defi ned integrity means that the data meets the organization’s requirements
with simple business rules, such as a restriction to a domain and limiting the list
of valid data entries. Check constraints are commonly used to enforce these rules in
the physical schema.
■ Complex business rules limit the list of valid data based on some condition. For
example, certain tours may require a medical waiver. Implementing these rules in
the physical schema generally requires stored procedures or triggers.

■ (^) Some data-integrity concerns can’t be checked by constraints or triggers. Invalid,
incomplete, or questionable data may pass all the standard data-integrity checks.
For example, an order without any order detail rows is not a valid order, but no SQL
constraint or trigger traps such an order. The abstraction layer can assist with this
problem, and SQL queries can locate incomplete orders and help to identify other
less measurable data-integrity issues, including wrong data, incomplete data, ques-
tionable data, and inconsistent data.
Integrity is established in the design by ensuring the following:
■ (^) A thorough and well-documented understanding of the organizational requirements
■ Normalization and correct handling of optional data
■ (^) A well-defi ned abstraction layer
■ Data quality unit testing using a well-defi ned and understood set of test data
■ (^) Metadata and data audit trails documenting the source and veracity of the data,
including updates
Performance/Scalability
Presenting readily usable information is a key aspect of the Information Architecture
Principle. Although the database industry has achieved a high degree of performance, the
ability to scale that performance to large databases is still an area of competition between
database engine vendors.
c02.indd 19c02.indd 19 7/30/2012 4:07:51 PM7/30/2012 4:07:51 PM
http://www.it-ebooks.info

Free download pdf