Processing the Database Efficiently
A database can be thought of as one giant, interconnected structure with all tables linked back to system catalogs, and all system catalogs linked back to the lowest-level allocation metadata stored in sys.sysallocunits, which in turn has its first page fixed at page (1:16) in every database. With the addition of the fixed-location allocation bitmaps, such as Page Free Space (PFS) and Global Allocation Map (GAM) pages, the entire database can be represented as a single entity-relationship diagram.
With this thought in mind, one can envisage a consistency-checking algorithm for this metastructure that starts with page (1:16) and the allocation bitmaps and progressively expands into the database-checking linkages ...
Get Microsoft® SQL Server® 2008 Internals now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.