Vladimir Sitnikov has been working on many optimizations to the PostgreSQL JDBC Driver, and one of these is the
reWriteBatchedInserts configuration property which he recently told me about.
In this article, you will see how the
reWriteBatchedInserts JDBC configuration property works in PostgreSQL, and how it allows you to rewrite INSERT statements into a multi-VALUE INSERT.
Continue reading “How to enable multi-row inserts with the PostgreSQL reWriteBatchedInserts configuration property”
Ever wanted to connect to a relational database using Java and didn’t know the URL connection string?
Then, this article is surely going to help you from now on.
Continue reading “JDBC Driver Connection URL strings”
As previously explained, although Hibernate does not support database ARRAY column types by default, you can easily implement a custom Hibernate
ArrayType. While the previous solution worked on PostgreSQL, in this article, you are going to see that it is fairly easy to adapt it to HSQLDB.
Continue reading “Hibernate HSQLDB ARRAY Type”
While developing Hibernate, I need to test the code base against a plethora of relational database systems: Oracle, SQL Server, PostgreSQL, MySQL, MariaDB, Informix, and of course DB2.
However, having all these databases installed on my system is far from ideal, so I rely a lot on Docker for this task. In this article, I’m going to show how easily you can install DB2 on Docker and set up the JDBC connection so that you can run Hibernate tests on DB2.
Continue reading “How to install DB2 Express-C on Docker and set up the JDBC connection properties”
CockroachDB is a really interesting database system, getting the best of both RDBMS and NoSQL. It’s been developed by former Google developers, and it’s inspired by Google Spanner. However, unlike Google Spanner, which is offered as a service in Google Cloud, CockroachDB is an open-source database that can be installed on premise.
Also, CockroackDB allows you to use the PostgreSQL drivers as opposed to Spanner which only supports the gRPC protocol. So, you can practically reuse all the frameworks that have emerged in the Java ecosystem like connection pools, monitoring proxies (e.g. FlexyPool) or data access frameworks (e.g. Hibernate).
Unlike a typical RDBMS, CockroachDB is designed to be globally distributed and strongly resilient to disasters, hence its very unusual name. But what’s really exciting about CockroachDB is its non-locking timestamp ordering concurrency control mechanism which allows CockroachDB to run in Serializable isolation level, even if the database is massively distributed. Intriguing, right?
Continue reading “How to get started with CockroachDB”