Suggestions for relational databases

I’m considering an sql or nosql database? I’m thinking MySQL using MySQL.jl , but I would like to know more about how PostSQL is different. I’ve also considered MongoDB and mongoc.jl , because of performance, but I’m not sure of the consistency, or I thought of connecting to FaunaDB using Diana.jl . What experience does anyone have with any of these?

I’m working on an accounting program, which is why I’m leaning more towards SQL.

My recommendation would be to use PostgreSQL. It is the best engineered and feature rich open-source database management system there is for transaction processing (OLTP).

5 Likes

Cool. I keep finding projects for postgress in maintenence mode. What are you aware of, that is actively maintained?

To work with PostgreSQL you can use JDBC:

or LibPQ:

These both look useful but github doesn’t link to documentation of tutorials for either.

Hi Brett,

PostgreSQL has interactive installers for Linux, macOS, Windows:
https://www.postgresql.org/download

The PostgreSQL project has excellent documentation and includes step-by-step tutorials:

To use PostgreSQL with Julia, I’d recommend JDBC.jl as a starting point. JDBC is one of the most common ways to connect to relational databases (the other being ODBC).

I,ve installed PostgreSQL. I also reinstalled office calc to handle databases.

Is the next step to set up a local host, and connect it to julia?

I would also suggest PostgreSQL and LibPQ.
Not sure about JDBC - I wonder if the Java interface adds complexity or reduces performance compared to a more “native” C-driver? Or has JDBC other advantages (despite compatibility with other DB types)?

The easiest (and post portable) way to run the Postgres server is in a Docker container.

3 Likes

How do I set up a container?

Regards,
brett knoss

Privacy for your emails

You need to install Docker - the instructions for Windows are given here (I strongly recommend the WSL2 backend): Install Docker Desktop on Windows | Docker Documentation
Then, starting the Postgres DB is easy, for the most basic use case it is just:

docker run -p 5432:5432 postgres

For real usage you should define a volume for the database so that it is persistent, more information is given here: Docker Hub

What about installing on Debian?

I think this has veered pretty far outside of the territory of being about Julia programming.

3 Likes

Has it? I need to save something. Although Jupyeter has a play button, so I could write my entries and compile a ledger. If I knew how to set up a Julia kernel in Jupyter.

If you want to learn how to install Debian or use containers you can ask about that on StackOverflow or peruse the documentation of those projects.

3 Likes

No Docker in Debian. I’m sure I can look it up.

1 Like

I didn’t find Docker instructions for and Linux distros. I’m not sure about JavaScript, I can see that being a problem, but if the interface is with a C library, that can be an advantage. Crystal is made to be like Ruby, and shares a lot with Python, so it might be worth looking at for anyone seeking to design stuff like databases. Not sure if being LLVM is an advantage in interfacing with Julia.

For Debian instructions are given here: Install Docker Engine on Debian | Docker Documentation

great thanks.