ODBC Driver

MonetDB ODBC Driver

ODBC stands for Open DataBase Connectivity, a standard database access method developed by the SQL Access group in 1992. The goal of ODBC is to make it possible to access any data from any application, regardless of which database management system (DBMS) is handling the data. ODBC manages this by inserting a middle layer, called a database driver, between an application and the DBMS. The purpose of this layer is to translate the application's data queries into commands that the DBMS understands. For this to work, both the application and the DBMS must be ODBC-compliant which means that the application must be capable of issuing ODBC commands and the DBMS must be capable of responding to them.

Installing the MonetDB ODBC Driver for Windows

For Microsoft Windows you can download the ODBC installers from MonetDB Download Area for Windows. On 32-bit Windows you install the 32-bit version. On 64-bit Windows we recommend to install both versions.

For Linux see instructions below.

To help you setup your system to use the ODBC driver with MonetDB, two how-tos are available, one for Windows users and one for Linux/UNIX users.

Microsoft Excel Demo

A little demo showing how to import data from a MonetDB server into Microsoft Excel.

Start up a MonetDB SQL Server and next start Excel.

In Excel, select from the drop down menu, first Data, then Get External Data, and finally New Database Query...

excel1.png

If MonetDB ODBC driver was installed correctly, there should be an entry MonetDB in the dialog box that opens. Select it and click on OK.

excel2.png

In the wizard that opens, scroll down in the list on the left hand side and select voyages. Tip: via the Options... button you can change the schema from which the tables and views must be listed in the left list.
Then click on the button labeled > and then on Next >.

excel3.png

In the next page of the wizard, click on Next >.

excel4.png

In the next page of the wizard, click on Next >.

excel5.png

In the final page of the wizard, click on Finish.

excel6.png

A new dialog window opens. Click on OK to insert the data into the current Excel worksheet.

excel7.png

That's all.

excel8.png

Installing the MonetDB ODBC Driver for unixODBC

Configuring the MonetDB Driver

As Superuser, start the unixODBC configuration program ODBCConfig and select the Drivers tab.

uodbc1.png

On this tab, click on the button labeled Add... and fill in the fields as follows.

uodbc2.png

  • Name MonetDB
  • Description ODBC Driver for MonetDB SQL Server
  • Driver <path-to-MonetDB>/lib(64)/libMonetODBC.so
  • Setup <path-to-MonetDB>/lib(64)/libMonetODBCs.so

Don't change the other fields. When done, click on the check mark in the top left corner of the window. The first window should now contain an entry for MonetDB. Click on OK

Configuring a Data Source

Now as normal user start ODBCConfig again.

uodbc3.png

On the User DSN tab click on the Add... button. A new window pops up in which you have to select the ODBC driver. Click on the entry for MonetDB and click on OK.

uodbc4.png

A new window pops up. Fill in the fields as follows.

uodbc5.png

  • Name MonetDB
  • Description Default MonetDB Data Source
  • Host localhost
  • Port 50000
  • User monetdb
  • Password monetdb

Don't change the other fields. When done, click on the check mark in the top left corner of the window. The first window should now contain an entry for MonetDB. Click on OK.

Reporting issues with MonetDB ODBC Driver

If you encounter any problems with the MonetDB ODBC driver you can report them on Github MonetDB Issues.

Sources of MonetDB ODBC Driver code

These can be found in clients/odbc The sub dirirectory driver contains the source files of the ODBC Driver implementation. The driver/README file contains information on the ODBC Driver implementation.