A database consists of a Primary Data File (.mdf), a Transaction File (.ldf) and optional Secondary Data Files (.ndf). The secondary files are used if the database is large and the primary data file has reached capacity or data is allocated to multiple secondary files for performance reasons. All files have both logical and physical names. The default size of the transaction log is 25% of the data file size.
Data is stored in 8 KB blocks called pages. Rows cannot span pages which means that a single row maximum size is 8060 bytes. Tables and indexes are stored in extents of eight contiguous pages.
The data files should be stored on a separate drive from the transaction log to enhance performance. Transaction logs should not be stored on compressed drives since NT caches data written to those drive types. Data might not be written to the log in the event of a system failure causing information loss.
Category Database Structure
( Topic last updated: 1999.12.07 10:22:11 PM )