Working with databases in Julia
In this recipe, we show how to connect to various database engines with Julia. There are three ways to access database systems from Julia:
- Access databases directly from Julia, using packages provided withhttps://github.com/JuliaDatabases/
- Use Java's JDBC drivers to access databases via the
JDBC.jl
package built on top of theJavaCall.jl
package - Use Python's database drivers by loading packages in the
PyCall.jl
package
In this section, the first scenario will be discussed by presenting how to connect to MySQL and PostgreSQL with dedicated Julia packages. The second scenario will show how to connect to an Oracle database with JDBC (Java Database Connectivity) drivers provided by theJDBC.jl
package. The third scenario will be discussed in the There's more... section by presenting ways of using thePyCall.jl
package to open a connection to the Elasticsearch document database.
Getting ready
We will show how to set up the environments for working in Julia with three popular...