SQL SERVER – Beginning of SQL Server Architecture – Terminology – Guest Post

AUGUST 30, 2012 BY PINAL DAVE

SQL SERVER – Beginning of SQL Server Architecture – Terminology – Guest Post

SQL Server Architecture is a very deep subject. Covering it in a single post is an almost impossible task. However, this subject is very popular topic among beginners and advanced users.  I have requested my friend Anil Kumar who is expert in SQL Domain to help me write  a simple post about Beginning SQL Server Architecture. As stated earlier this subject is very deep subject and in this first article series he has covered basic terminologies. In future article he will explore the subject further down. Anil Kumar Yadav is Trainer, SQL Domain, Koenig Solutions. Koenig is a premier IT training firm that provides several IT certifications, such as Oracle 11g, Server+, RHCA, SQL Server Training, Prince2 Foundation etc.



In this Article we will discuss about MS SQL Server architecture.

The major components of SQL Server are:

  1. Relational Engine
  2. Storage Engine
  3. SQL OS

Now we will discuss and understand each one of them.

1) Relational Engine: Also called as the query processor, Relational Engine includes the components of SQL Server that determine what your query exactly needs to do and the best way to do it. It manages the execution of queries as it requests data from the storage engine and processes the results returned.

Different Tasks of Relational Engine:

  1. Query Processing
  2. Memory Management
  3. Thread and Task Management
  4. Buffer Management
  5. Distributed Query Processing

2) Storage Engine: Storage Engine is responsible for storage and retrieval of the data on to the storage system (Disk, SAN etc.). to understand more, let’s focus on the concepts.

When we talk about any database in SQL server, there are 2 types of files that are created at the disk level – Data file and Log file. Data file physically stores the data in data pages. Log files that are also known as write ahead logs, are used for storing transactions performed on the database.

Let’s understand data file and log file in more details:

Data FileData File stores data in the form of Data Page (8KB) and these data pages are logically organized in extents.

Extents: Extents are logical units in the database. They are a combination of 8 data pages i.e. 64 KB forms an extent. Extents can be of two types, Mixed and Uniform. Mixed extents hold different types of pages like index, system, data etc (multiple objects). On the other hand, Uniform extents are dedicated to only one type (object).

Pages: As we should know what type of data pages can be stored in SQL Server, below mentioned are some of them:

  • Data Page: It holds the data entered by the user but not the data which is of type text, ntext, nvarchar(max), varchar(max), varbinary(max), image and xml data.
  • Index: It stores the index entries.
  • Text/Image: It stores LOB ( Large Object data) like text, ntext, varchar(max), nvarchar(max),  varbinary(max), image and xml data.
  • GAM & SGAM (Global Allocation Map & Shared Global Allocation Map): They are used for saving information related to the allocation of extents.
  • PFS (Page Free Space): Information related to page allocation and unused space available on pages.
  • IAM (Index Allocation Map): Information pertaining to extents that are used by a table or index per allocation unit.
  • BCM (Bulk Changed Map): Keeps information about the extents changed in a Bulk Operation.
  • DCM (Differential Change Map): This is the information of extents that have modified since the last BACKUP DATABASE statement as per allocation unit.

Log File: It also known as write ahead log. It stores modification to the database (DML and DDL).

  • Sufficient information is logged to be able to:

    • Roll back transactions if requested
    • Recover the database in case of failure
    • Write Ahead Logging is used to create log entries
      • Transaction logs are written in chronological order in a circular way
      • Truncation policy for logs is based on the recovery model

SQL OS: This lies between the host machine (Windows OS) and SQL Server. All the activities performed on database engine are taken care of by SQL OS. It is a highly configurable operating system with powerful API (application programming interface), enabling automatic locality and advanced parallelism. SQL OS provides various operating system services, such as memory management deals with buffer pool, log buffer and deadlock detection using the blocking and locking structure. Other services include exception handling, hosting for external components like Common Language Runtime, CLR etc.

I guess this brief article gives you an idea about the various terminologies used related to SQL Server Architecture. In future articles we will explore them further.

Guest Author 

The author of the article is Anil Kumar Yadav is Trainer, SQL Domain, Koenig Solutions. Koenig is a premier IT training firm that provides several IT certifications, such as Oracle 11g, Server+, RHCA, SQL Server Training, Prince2 Foundation etc.

Reference: Pinal Dave (http://blog.sqlauthority.com

时间: 2024-08-12 09:37:50

SQL SERVER – Beginning of SQL Server Architecture – Terminology – Guest Post的相关文章

22. SQL -- SQL Server 2005 和SQL Server 2008新特性

SQL SERVER 2005 与SQL SERVER 2008 新特性   SQLSERVER 2005 新特性 Enhanced Data Types:存储最大8K-2G Partitioned Table(分区表):数据拆分管理 背景:一个公司,有目前现存数据以及历史数据,各在一台SER 上,服务器访问方式: SQL 2000 TABLE 1:在一张table 中,对数据进行分区 Enhanced Indexing Features SER 1 SER 2 现存数据 TABLE 1 TAB

SQL Server 2012:SQL Server体系结构——一个查询的生命周期(第3部分)(完结)

原文:SQL Server 2012:SQL Server体系结构--一个查询的生命周期(第3部分)(完结) 一个简单的更新查询 现在应该知道只读取数据的查询生命周期,下一步来认定当你需要更新数据时会发生什么.这个部分通过看一个简单的UPDATE查询,修改刚才例子里读取的数据,来回答. 庆幸的是,直到存取方法(Access Methods)前,更新操作和刚才SELECT语句流程是一模一样的. 这次存取方法(Access Methods)需要修改数据,因此在I/O请求传递前,修改的细节要存放于硬盘

SQL server数据库的在server 2008R2上的安装及基本管理

         SQL server数据库的在server 2008R2上的安装及基本管理(一) 选择SQL的数据库的镜像文件 双击setup.ext 执行安装程序 这里选择安装项,并选择全新安装 安装的环境监测全部通过 因为这里是使用的破解版的镜像,所以会自动生成密钥 再一次检测安装环境 这里选择第一项 这里选择全部的功能 这里选择默认的实例名 这里将系统的内置账户添加到服务中,NT 这里选择混合式身份 验证,并输入sa的密码.并添加本地的管理员 这里添加本地的管理员账户 选择第一项 开始安

java.sql.SQLException: null, message from server: “Host ‘xxx’ is not allowed to connect

java.sql.SQLException: null, message from server: “Host ‘xxx’ is not allowed to connect 2014年06月29日 ⁄ 综合 ⁄ 共 637字 ⁄ 字号 小 中 大 ⁄ 评论关闭 java.sql.SQLException: null,  message from server: "Host 'xxx' is not allowed to connect to this MySQL server": j

SQL Server ->> Memory Allocation Mechanism and Performance Analysis(内存分配机制与性能分析)之 -- Minimum server memory与Maximum server memory

Minimum server memory与Maximum server memory是SQL Server下配置实例级别最大和最小可用内存(注意不等于物理内存)的服务器配置选项.它们是管理SQL Server内存的途径之一. Minimum server memory与Maximum server memory Minimum server memory(MB): 最小服务器内存.一旦超过这个线就不会再把内存换回去.但是也不是说SQL Server一启动马上就申请这么多的内存. Maximum

SQL Server 2012:SQL Server体系结构——一个查询的生命周期(第1部分)

为了缩小读取操作所涉及范围,本文首先着眼于简单的SELECT查询,然后引入执行更新操作有关的附加过程.最后你会读到,优化性能时SQLServer使用还原工具的相关术语和流程. 关系和存储引擎 如图所示,SQL Server被分为2个主要引擎:关系引擎和存储引擎.关系引擎有时也被称为查询处理器,因为它的主要功能是查询优化和执行.它包含检查查询语法和准备查询树的命令解析器:查询优化器毫无疑问是任何数据库系统中皇冠上的宝石:查询执行器对执行(查询计划)负责. 存储引擎对所有数据输入.输出管理负责.它包

windows server 2008下装SQL 2008R2x64

1. 在windows server 2008下装SQL 2008出现 This SQL Server Setup media is not supported on a X64 system 使用虚拟光驱(DAEMON Tools Lite)安装即可. 2.安装步骤: 1.需要创建一个windows用户,用于SQL代理

SQL Server 2012:SQL Server体系结构——一个查询的生命周期(第2部分)

计划缓存(Plan Cache) 如果SQL Server已经找到一个好的方式去执行一段代码时,应该把它作为随后的请求重用,因为生成执行计划是耗费时间且资源密集的,这样做是有有意义的. 如果没找到被缓存的计划,然后命令分析器(Command Parser)在T-SQL基础上生成一个查询树(query tree).查询树(query tree)的内部结构是通过树上的每个结点代表查询中需要的执行操作.这个树然后被传给查询优化器(Query Optimizer)去处理.我们的简单查询没有一个存在的计划

远程mysql_java.sql.SQLException: null, message from server: "Host 'xxx' is not allowed to connect

最近在做一个项目,里面要用到远程mysql数据库. 我想把我想要实现的功能说一下吧: 1 /** 2 * 是这样的功能:我的机器是A,我现在先利用我自己写的一个jdbc方法<br> 3 * 调用远程的机器B上安装的数据库<br> 4 * 然后把我想要CRUD操作B机器上的数据库<br> 5 * 或者简单一点,可以这样认为,我现在在机器A上面有一些数据<br> 6 * 我要把这些数据插入到远程的机器B的mysql数据库里面去<br> 7 * 就是这