SQL Server Architecture - PPT
SQL Server Architecture - PPT
Database
Client Application
SQL Server or
Desktop/Browser .NET/Java
Oracle
SQL Server Detailed Architecture
SNI
• The protocol layer receives the requests from client and translates it
into a form that the relational engine can work with.
– Shared Memory - Shared Memory protocol can connect to only a SQL Server
instance running on the same computer.
– Named Pipes-A protocol developed for local area networks (LAN).
– TCP/IP--TCP/IP can communicate across interconnected computer networks with
diverse hardware architectures and operating systems.
The Relational Engine
• The Relational Engine is also sometimes called the query
processor because its primary function is query optimization
and execution. It contains
Algebrizer primary function is to perform binding, which means validating whether the
tables and columns used in the query exist, loading the metadata information for the
tables and columns, identifying all data types used for the query
After a query is parsed, a binding component performs name resolution to convert the
object names into their unique object ID values.
After the parsing and binding is done, the command is converted into an internal format
that can be operated on. This internal format is known as a query tree.
Query Optimizer
– Access Methods code, which handles I/O requests for rows, indexes,
pages, allocations and row versions.
– Buffer Manager, which deals with SQL Server’s main memory
consumer, the buffer pool.
– Transaction Manager, which handles the locking of data to maintain
Isolation (ACID properties) and manages the transaction log.
Access Methods
• 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.
C- Consistency
Guarantees Committed State
I- Isolation
Transactions are Independent
D- Durability
Committed data Never Lost
WAL
• SQL Server uses a write-ahead log (WAL), before committing in
MDF, every transaction should write an entry in LOG file.
Checkpoint
• A checkpoint writes the current in-memory modified pages (known as dirty
pages) and transaction log information from memory to disk and, also, records
information about the transaction log since last Checkpoint.
• Types of Checkpoints
– Automatic
– Indirect
– Manual
– Internal
Lazy Writer