SQL/ODBC for Reality

The ODBC architecture used for Reality queries is referred to as the 'Two-tier System', or more popularly as the classic 'client/server' system. The ODBC client driver (RealSQL) on a PC sends and receives the DBMS's data protocol. The DBMS (SQL server) receives SQL requests from the client, executes them, and sends the results back to the client.

The diagram below illustrates the Reality SQL/ODBC client/server communications path.

Reality SQL/ODBC client/server communications path

RealSQL Driver

The RealSQL driver on the PC has two main components, a setup DLL and a driver DLL.

The SQL setup DLL (rlxstp32.dll) interfaces with the ODBC administration utility provided by Microsoft and allows a user to configure an ODBC data source which is then used to establish a connection to the Reality DBMS via the server process.

The SQL driver DLL (rlxsql32.dll) allows an ODBC compatible application to communicate with the Reality DBMS using the ODBC application programming interface (API), as defined in the ODBC 2.0 Programmer's Reference and SDK Guide.

The RealSQL driver uses PC Standard Network Interface (SNI) to communicate with the Reality server process using DDA messages. Application programs issue SQL statements by making calls to the ODBC standard API. These calls are initially handled by the Microsoft ODBC manager which loads specific ODBC drivers, and in particular the RealSQL driver, on request, and unloads them when no longer needed. Once a connection is established to a data source, the ODBC manager becomes a mostly transparent layer and passes the majority of API calls directly to the appropriate ODBC driver, and in particular the RealSQL driver.

Distributed Transactions

Reality supports the Distributed Transactional Services exposed by Microsoft's COM+, formally known as Microsoft Transaction Server (MTS), and managed by Microsoft's Distributed Transaction Co-ordinator (MDTC). Transaction enlistment and data access is via the SQL/ODBC interface. Transaction control, which employs Two-Phase Commit is via the XA interface.

For a description of how distributed transactions are remotely managed by the MDTC, refer to the topic Distributed Transactions.