Product Architecture

SQL Server is a client/server database system. The terms client and server refer to:

The database server software processes requests submitted by the client software, sending the results of each request back to the database client that requested it. SQL Executive and the SQL Server engine are examples of database server software.

The database client software connects to the database server software, makes requests, receives results, then manipulates those results—for example, it could display the results on the screen. SQL Enterprise Manager, ISQL/w, and Microsoft Access are good examples of database client software that connects to SQL Server databases.

The server computer runs the SQL Server database server software. The SQL Server database client software can also be run from the server computer.

Note SQL Executive, a service that runs on the server computer, is a normal database client from the perspective of the database server. A client computer is a computer that runs only the database client software.

The following illustration shows the interaction between a client computer and a server computer. The client computer, configured with Windows 95, Windows NT Server, Windows NT Workstation, Windows 3.1, or MS-DOS® operating systems, runs SQL Server client applications. This client application sends requests to the SQL Server residing on the server computer. The server computer, configured with the Windows NT Server operating system, runs all types of SQL Server applications, including client and server applications, as well as the SQL Executive service.

The database client software is made up of multiple layers, or components. The user interacts directly with a client application, like SQL Enterprise Manager or an order entry form. The client application determines the presentation of the database system. All client applications interact with SQL Server using one of two native application programming interfaces (APIs) for client database access:

Both ODBC and DB-Library use the same client Net-Library layer to establish a connection to SQL Server.

When the client software is running on a client computer, the connection to SQL Server is established across the network.

The database server software is also made up of multiple layers. A server Net-Library layer accepts connection from the client. Open Data Services is an API for writing database server software. The SQL Server database engine is an Open Data Services application. SQL Server communicates with the client through Open Data Services, receiving requests and returning results.

The following illustration shows the network connection from the client computer and client Net-Library to the server computer and server Net-Library.

When the client software is running on the server computer, a local, non-network connection to SQL Server can be established using named pipes. But in all other respects, the same client server architecture and components are used.

The following illustration shows this non-network connection.

Multiple client Net-Libraries are included with the SQL Server client software. The Net-Library layer is designed to "hide" the network connectivity details of communicating with SQL Server. Because all client Net-Libraries share a single interface, both the ODBC SQL Server driver and DB-Library can use any Net-Library to establish a connection to SQL Server. Client computers have a default Net-Library (usually named pipes) that is used when a specific Net-Library is not requested.

Each Net-Library (client and server) uses a single interprocess communication (IPC) mechanism, such as named pipes, remote procedure call (RPC), or Windows Sockets. The IPC used by some Net-Libraries is supported by multiple network protocols. For example, the named pipes IPC is supported by the NetBEUI, Microsoft TCP/IP, and NWLink protocols. The IPC used by other Net-Libraries is supported by a single network protocol. For example, the Windows Sockets IPC is supported only by the Microsoft TCP/IP protocol, and the NetWare IPX/SPX IPC is supported only by the NWLink protocol. Also, the named pipes IPC is also directly supported by the Windows NT file system, allowing local, non-network connections between client software and SQL Server on the same server computer.

The following illustration shows the interaction between client Net-Libraries and server Net-Libraries.

Multiple server Net-Libraries are included with the SQL Server database server software. SQL Server "listens" for client connections using multiple server Net-Libraries.

It is important to understand that the client Net-Library (and IPC) that establishes a connection must match the server Net-Library (and IPC) that accepts the connection. Of course, both the client computer and server computer must be using the same network protocol, but this alone is not sufficient. For example, a client cannot use the client TCP/IP Windows Sockets Net-Library to make a connection across the TCP/IP protocol to a SQL Server that is only using the server named pipes Net-Library. You can fix this situation in one of two ways:

The following illustration shows the many options facing a database developer when choosing a set of database development tools and components.

The highest layer is the development tool or product. Two of the most common language tools are the Microsoft Visual Basic and Microsoft Visual C++® programming systems. Both of these tools offer a great deal of power and flexibility, but often require coding. Other office development tools like Microsoft Access, Word, and Excel are used to deliver customized business solutions that need data access. SQL Server includes database development and management tools like SQL Enterprise Manager and ISQL/w.

The next layer is the component. Components like Data Access Objects (DAO) and Remote Data Objects (RDO) provide a higher level of abstraction, enabling a developer to do more with less lines of code, and allowing the same code to work with multiple data sources. The SQL Distributed Management Objects (SQL-DMO) component exposes a completely programmable management interface specifically for SQL Server.

All components and tools must eventually connect to SQL Server using one of the two native APIs available today—ODBC or DB-Library. The OLE DB ODBC provider allows development of OLE DB applications that use the SQL Server ODBC driver to connect to SQL Server. An application can be written directly to a native API.

You can develop components for the server computer as well. An extended stored procedure is an Open Data Services dynamic-link library (DLL) at the server that can be called by the client like a normal stored procedure. By using the OLE Automation stored procedures, you can develop and deploy an OLE Automation object at the server that can be called by any client.

The SQL Server product contains multiple services and components, on both the client and the server computer, that interact with each other and with Windows NT services and components.

The following table lists and describes the three Windows NT services that the server computer runs under the control of the Windows NT Service Control Manager.

Service

Description

SQL Server database engine

Handles all databases, clients, and queries.

SQL Executive

Handles scheduling tasks, monitors for and raises alerts, and replicates data.

Microsoft Distributed Transaction Coordinator

Handles transactions distributed among multiple SQL Servers.


Other components, like SQL Mail, SQL Simple Network Management Protocol (SNMP), and the server component of SQL Trace are extended stored procedures. These components interact with required Windows services as well as with the SQL Server engine.

Microsoft Internet Information Server (IIS) can deliver SQL Server data to its Internet and intranet clients. IIS can connect directly to SQL Server using the Internet Database Connector (IDC), execute a query, format the results into an HTML page, and send the page to an Internet client. IIS can also deliver HTML pages that have already been created by the SQL Server Web Assistant.

The client computer runs SQL Server client applications, such as SQL Enterprise Manager, that connect to SQL Server. The client computer also runs applications included with Windows, such as Performance Monitor and Internet Explorer.

The following illustration shows how different services and extra components interact with each other and with the client and server.