Monday, October 20, 2008

Microsoft SQL Server Data storage:Buffer management

SQL Server buffers pages in RAM to reduce disc I/O. Any 8 KB page can be buffered in-memory, and the set of all pages at this time buffered is called the buffer cache. The quantity of memory available to SQL Server decides how lots of page will be cached in memory. The buffer cache is managed by the Buffer Manager. Either analysis from or marks to any side copies it to the buffer cache. Subsequent reads or writes are redirect to the in-memory copy, rather than the on-disc side. The page is updated on the disc by the Buffer Manager only if the in-memory cache has not been referenced for a few times. While writing pages back to disc, asynchronous I/O is use whereby the I/O operation is done in a backdrop thread so that other operation do not have to wait for the I/O operation to total. Each page is written along with its checksum when it is written. When interpretation the page back, its checksum is compute again and matched with the store version to ensure the page has not been injured or tamper with in the mean time.

Monday, October 13, 2008

Microsoft SQL Server :Data storage

The main component of data storage is a database, which is a compilation of tables with typed columns. SQL Server supports different data types, including main types such as Integer, Float, Decimal, Char, Varchar, binary, Text among others. It also allows user-defined composite types to be defined and use. SQL Server also makes server data available as virtual tables and views. A database can also hold other objects including views, stored procedures, index and constraints, in addition to tables, along with a business log. A SQL Server database can contain a utmost of 231 objects, and can span multiple OS-level files with a maximum file size of 220 TB. The data in the database are stored in main data files with an extension .mdf. Secondary data files, identified with an .ndf extension, are used to store elective metadata. Log files are recognized with the .ldf extension.

Sunday, October 05, 2008

Microsoft SQL Server Architecture: Relational engine

The Relational engine equipment the relational data store using the capability provided by SQLOS, which is exposed to this layer via the private SQLOS API. It equipment the type system, to define the types of the data that can be store in the tables, as well as the diverse types of data items that can be stored. It includes the Storage Engine, which handles the way data is stored on constant storage devices and provides methods for fast admission to the data. The storage engine implements log-based business to ensure that any changes to the data are ACID obedient. It also includes the query processor, which is the component that retrieves data. SQL queries specify what data to retrieve, and the query processor optimizes and translates the query into the succession of operations needed to get back the data. The operations are then performing by worker threads, which are scheduled for carrying out by SQLOS.