Open Database Connectivity (ODBC) refers to a software API method for using database management systems (DBMS). ODBC was created so as to be independent of programming languages or operational systems and offers access to different database systems. The standard ODBC consists of an ODBC core and the respective specific ODBC database drivers. The core, also known as Driver manager, is independent of the database and acts as an interpreter between the application and the database drivers. The database drivers, on the other hand, contain DBMS-specific details and offer a mechanism for connecting with different ODBS-enabled database systems.
Thanks to this modular model ODBC has become a universal solution for creating dynamic applications. A connection with the ODBC API can be established by using several popular programming languages including PHP, Perl, Python, C, C++ and .Net. Thanks to the JDBC-ODBC bridges, Java support can be provided by translating JDBC calls into ODBC.
The presence of many database drivers allows ODBC to connect with the most popular corporate database systems - Oracle, MsSQL, Sybase, as well as with the proven Open Source alternatives - MySQL, PostgreSQL.
The ODBC driver for PostgreSQL is named psqlODBC. It used to be a part of the PostgreSQL package, but it was taken away and has been developed as a separate package since 2004. This marks a significant update in the quality of the driver, since now its developers are solely concentrated on improving its functionality.
To install psqlODBC in Linux, you will just have to download the latest version and then compile it. The process is really easy and consists of a few simple steps.
First off, you will have to download the latest release from the project's home page. You can do this using the "wget" command
Once you have the latest version, it's time to install it. First off, un-tar the newly downloaded file and go into the created folder.
Once in the new folder, you will have to perform the compile-make install sequence, just like you would with any other Linux source file.
And you are ready.
There are two ways to compile psqlODBC in Windows - using the command line interface or using Microsoft Visual C++.
To compile psqlODBC with Visual C++, open the psqlodbc.dsp file and compile it. Have in mind that all PostgreSQL-required headers and libraries will be installed in C:\Program Files\PostgreSQL.
To compile it with the command line, use the NMAKE command. You can specify if the build should be for the x32 or the x64 version of Windows.
The compiled driver will have the following features:
The ODBC driver for MySQL is labeled MyODBC. It is also known as MySQL Connector /ODBC. It is developed by the MySQL team and at the moment, it has two versions available - 3.51 and 5.1. The 5.1 version is the newer version and the recommended one for installation. It introduces several new features over the older version:
To have MyODBC in Linux, you will also need an ODBC Manager. MyODBC is known to work with most of the Linux ODBC managers without a problem. Here we will show you how to install MyODBC in Ubuntu Linux with iODBC as the manager.
This will install the GTK+ config frontend for the iODBC Driver Manager. Once this is done, we will need to get the actual MyODBC.
When you have the MyODBC installed, you will need to set it up. Run the iODBC and in there, point the path to the MyODBC drivers.
In the "Drivers" tab, select "Add a driver" and type in the description. For "Driver file name" choose /usr/lib/odbc/libmyodbc.so and for "Setup file name" choose /usr/lib/odbc/libodbcmyS.so.
To install MyODBC in Windows, all you need to do is download the installer for the version you want. On the MySQL page you can find installers for both Windows x32 and Windows x64. Once installed, the ODBC driver will appear in your Control Panel. When you run it, you will be able to choose if you want to set up the driver for a specific user (the "User DSN" tab) or for all the users on your machine (the "System DSN" tab). Once you are done with this, click the "Add" button and select the MySQL driver. When you click "Finish", you will need to configure the driver. There are several fields, which you will need to fill in:
NTC Hosting provides advanced hosting solutions. Our plans offer support not only for MySQL, but also for the proven, enterprise-class PostgreSQL database. We have specifically optimized our servers in order to provide our clients with the best PostgreSQL and MySQL hosting experience. In all our web hosting packages we have PHP, Perl and Python included, in order to provide our users with as many possibilities as possible when creating their database driven applications.