Book Image

Getting Started with Julia

By : Ivo Balbaert
Book Image

Getting Started with Julia

By: Ivo Balbaert

Overview of this book

Table of Contents (19 chapters)
Getting Started with Julia
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
The Rationale for Julia
Index

Interacting with databases


Open Database Connectivity (ODBC) is a low-level protocol for establishing connections with the majority of databases and datasources ( for more details, refer to http://en.wikipedia.org/wiki/Open_Database_Connectivity).

Julia has an ODBC package that enables Julia scripts to talk to ODBC data sources. Install the package through Pkg.add("ODBC"), and at the start of the code, run using ODBC.

The package can work with a system Data Source Name (DSN) that contains all the concrete connection information, such as server name, database, credentials, and so on. Every operating system has its own utility to make DSNs. In Windows, the ODBC administrator can be reached by navigating to Configuration | System Administration | ODBC Data Sources; on other systems, you have IODBC or Unix ODBC.

For example, suppose we have a database called pubs running in a SQL Server or a MySQL Server, and the connection is described with a DSN pubsODBC. Now, I can connect to this database...