Write up on Tech Geek History: ODBC Drivers

Introduction

The history of ODBC dates to 1989, when a group of software companies formed the SQL Access Group to define standards for database interoperability. By then, SQL had emerged as a widely used language for relational database access. Accordingly, application developers embedded SQL calls in their programs in order to retrieve and update information in databases, but a key problem was that the SQL versions provided by different database suppliers varied widely. To solve this problem, the industry group started defining a standard Call Level Interface (CLI) that could be used to access any database. This interface was ultimately incorporated into the International Organization for Standardization’s SQL standard in 1995.

Microsoft developed ODBC based on this interface work, introducing the first implementation in 1992. Many other companies have since built support for ODBC into their products, across multiple programming languages and operating systems. As a result, ODBC has become a standard method for accessing information not only in relational databases but also in many nonrelational data sources

Literature Review

Open Database Connectivity (ODBC) is a standard application programming interface (API) for accessing database management systems (DBMS). An application written using ODBC can be ported to other platforms, both on the client and server side, with few changes to the data access code. ODBC accomplishes DBMS independence by using an ODBC driver as a translation layer between the application and the DBMS. The application uses ODBC functions through an ODBC driver manager with which it is linked, and the driver passes the query to the DBMS.

An ODBC driver can be thought of as analogous to a printer driver or other driver, providing a standard set of functions for the application to use, and implementing DBMS-specific functionality. An application that can use ODBC is referred to as “ODBC-compliant”. Any ODBC-compliant application can access any DBMS for which a driver is installed. Drivers exist for all major DBMSs, many other data sources like address book systems and Microsoft Excel, and even for text or comma-separated values (CSV) files.

Drivers and Managers ODBC is based on the device driver model, where the driver encapsulates the logic needed to convert a standard set of commands and functions into the specific calls required by the underlying system. For instance, a printer driver presents a standard set of printing commands, the API, to applications using the printing system. Calls made to those APIs are converted by the driver into the format used by the actual hardware, say PostScript or PCL An ODBC driver enables an ODBC-compliant application to use a data source, normally a DBMS. Driver Manager Device drivers are normally enumerated, set up and managed by a separate Manager layer, which may provide additional functionality. For instance, printing systems often include functionality to provide spooling functionality on top of the drivers, providing print spooling for any supported printer. In ODBC the Driver Manager (DM) provides these features. The DM can enumerate the installed drivers and present this as a list, often in a GUI-based form.

Bridging configurations

· ODBC-to-JDBC (ODBC-JDBC) bridges: An ODBC-JDBC bridge consists of an ODBC driver which uses the services of a JDBC driver to connect to a database. This driver translates ODBC functioncalls into JDBC method-calls.

· JDBC-to-ODBC (JDBC-ODBC) bridges: A JDBC-ODBC bridge consists of a JDBC driver which employs an ODBC driver to connect to a target database. This driver translates JDBC method calls into ODBC function calls.

The relationship between a network engineer and an Open Database Connectivity (ODBC) driver centers on transporting database traffic securely, reliably, and efficiently across a network. While database administrators (DBAs) and developers configure the ODBC driver at the application layer, network engineers manage the underlying infrastructure that enables those connections to function.

Key Areas of Intersection

  • Network Transport and Ports. ODBC drivers translate application queries into database-specific network protocols (such as TDS for SQL Server or TNS for Oracle). Network engineers must configure firewalls, access control lists (ACLs), and routing tables to permit traffic on the specific TCP/UDP ports required by the database listener.
  • Latency and Throughput Optimization. Because ODBC operates over a network in distributed environments, high latency or packet loss directly degrades application performance. Network engineers tune Quality of Service (QoS), MTU sizes, and bandwidth allocation to minimize round-trip times for chatty database queries. [1]
  • Security and Encryption. Modern ODBC connections rely on transport-layer security (SSL/TLS) to encrypt data in transit and prevent interception. Network engineers often manage the VPN tunnels, private peering, or TLS termination proxies that secure ODBC traffic between client workstations and remote database servers. [1]
  • Name Resolution and Load Balancing. ODBC Data Source Names (DSNs) typically point to a database hostname or virtual IP. Network engineers maintain DNS records and configure load balancers or high-availability failover clusters so ODBC clients seamlessly connect to the active database node.
  • Troubleshooting Connectivity Failures. When an ODBC connection times out or drops, network engineers use packet capture tools (like Wireshark) and flow logs to determine whether the bottleneck is caused by network congestion, dropped packets, firewall blocks, or slow database query execution.

Chapter 1. Perl Database ‘s Relationship with ODBC Drivers :

Relational databases have been around for a while, and while most commercial implementations have standardized on SQL, they differ significantly in the native C API. There have been several solutions to this. Microsoft popularized the ODBC (Open DataBase Connectivity) initiative, which has become the de facto standard in the (Wintel) PC world and provides a standard frontend to a large number of relational databases. PC Perl users using the ActiveWare port can access the ODBC library using the Win32::ODBC module.

Meanwhile in the Perl/Unix world, Tim Bunce and other developers, who had been writing mutually incompatible wrapper modules for different databases, came up with the DBI (Database Interface) specification and implementation to merge their efforts. DBI is similar in spirit and interface to the ODBC specification.

The ODBC specification has recently been accepted as the basis for the SQL CLI (Call-Level Interface) ISO standard, and it is expected that all database vendors will eventually provide a compliant-client library. When that becomes common-place, you can expect the DBI implementation to be rewritten to take advantage of this interface or go away completely.

In this section, we will take a look at both DBI and Win32::ODBC.

1.2  DBI (Database Interface)

Back in the days when modules and dynamic loading were not built into Perl, the database wrappers had to be linked in to create custom Perl executables called sybperl (for Sybase), oraperl (for Oracle), and so on. These libraries have since been rewritten to take advantage of Perl Version 5’s features but have preserved the old API, which means that your scripts written for one database won’t work for another. If you want portability, the DBI module is the only option. DBI makes calls to modules called DBDs (database drivers), which are specific to a database vendor and drive the native vendor API. If you use Oracle, for example, you can use oraperl for marginally better performance, or you can use the DBI and DBD::Oracle combination for portability. Oraperl and DBD::Oracle are both based on the same underlying code. The following web site, maintained by Alligator Descartes, is a wonderful repository of things DBI:

Perl is a portable, interpreted programming language, ideally suited for many text processing applications. Like most high-level programming languages, Perl supports a structured programmatic design and offers a wealth of integrated features.

One such feature is Perl DBI. DBI is a standard database independent interface module for Perl programming language. It defines a set of methods, variables and conventions that provide a consistent database interface independent of the actual database being used. DBI is built based on a modular architecture – for each database, there is a driver that implements the specifics of work with a particular database. DBI allows Perl applications to connect to a database using a particular database driver – DBD module. DBD modules handle the complex details of interaction with various databases. For more information about Perl DBI please refer to [PERL DBI]. 

The ODBC driver manager acts as the mediator between the application and the database thereby creating a layer of abstraction. It manages the interactions between application programs and drivers. It has the capability to manage multiple applications and multiple drivers simultaneously. 

Chapter  2 ADO.NET Relationship to ODBC Drivers

When an application tries to connect to a data source using the connection methods of the ODBC API, the Driver Manager (DM) determines which driver is required and loads it into memory. The Driver Manager then simply takes any incoming function call from the application and calls the function of the same name in the driver. It also performs other functions such as error checking to ensure that function are called in the right order, arguments contain valid values and unloading the driver from memory.

ASP.NET connects to ODBC data sources using ADO.NET and the System.Data.Odbc namespace, allowing web applications to communicate with a wide variety of relational databases independently of the underlying database management system (DBMS).

Core Architecture & Components

• ODBC (Open Database Connectivity). Acts as a standard application programming interface (API) that uses an ODBC driver as a translation layer between your ASP.NET application and the database.

• .NET Framework Data Provider for ODBC. Uses the native ODBC Driver Manager through COM interoperability to enable data access.

• Key ADO.NET Objects. Within the System.Data.Odbc namespace, developers primarily rely on four objects to interact with data:

              • OdbcConnection: Establishes and manages the session with the specific data source.

              • OdbcCommand: Executes SQL queries or stored procedures against the database.

              • OdbcDataReader: Provides fast, forward-only, read-only access to a stream of data rows.

              • OdbcDataAdapter: Bridges the database and a disconnected, in-memory DataSet to retrieve and update records.

Configuration & Implementation

• Connection Strings. Connection parameters (such as the Data Source Name or DSN, driver name, server, and credentials) are typically stored in the <connectionStrings> section of the Web.config file so they can be read dynamically at runtime.

• Data Controls. In ASP.NET Web Forms, controls like SqlDataSource can use ProviderName=”System.Data.Odbc” alongside an ODBC connection string to bind data directly to UI elements like GridView or DetailsView

ADO.NET provides consistent access to data sources such as Microsoft SQL Server and XML, as well as to data sources exposed through OLE DB and ODBC. Data-sharing consumer applications can use ADO.NET to connect to these data sources and retrieve, manipulate, and update the data that they contain. ADO.NET includes .NET Framework data providers for connecting to a database, executing commands, and retrieving results. ADO.NET is a data-access technology that enables applications to connect to data stores and manipulate data contained in them in various ways. It is based on the .NET Framework and it is highly integrated with the rest of the Framework class library.

The ADO.NET API is designed so it can be used from all programming languages that target the .NET Framework, such as Visual Basic, C#, J# and Visual C++.

ADO uses a small set of Automation objects to provide a simple and efficient interface to OLE DB. This interface makes ADO a good choice for developers in higher level languages, such as Visual Basic and VBScript, who want to access data without having to learn the DETAILS of COM and OLE DB. ADO.NET provides functionality to developers writing managed code similar to the functionality provided to native component object model (COM) developers by ActiveX Data Objects (ADO)

Leave a Comment

Your email address will not be published. Required fields are marked *