How to map the Oracle TIMESTAMP WITH TIME ZONE with JPA
Introduction In this article, I’m going to explain how to map the Oracle TIMESTAMP WITH TIME ZONE with JPA and Hibernate. While the DATE and TIMESTAMP column types are suitable for mapping the LocalDateTime, the TIMESTAMP WITH TIME ZONE column type allows us to map both the ZonedDateTime and OffsetDateTime.
How to use symbolic links to move the DB data folder
Introduction In this article, we are going to see how we can use symbolic links to move the DB data folder. The reason why I needed to move the data folder from the C to the D Windows partition was because the C partition was running out of disk space.
Hibernate ON CONFLICT DO clause
Introduction In this article, we are going to see how the Hibernate ON CONFLICT DO clause works, and how we can use it to execute an SQL UPSERT statement in a portable way.
How to calculate percentiles with SQL PERCENTILE_CONT
Introduction In this article, we are going to investigate how to calculate percentiles with the SQL PERCENTILE_CONT function.
Hibernate StatelessSession Upsert
Introduction In this article, we are going to see how the Hibernate StatelessSession Upsert method works. As I explained in this article, the UPSERT operation allows you to INSERT a record if there is no such record matching the filtering criteria or to UPDATE it in case the record exists. While many relational database systems offer the standard MERGE command to execute the UPSERT command, the syntax may differ slightly from one database to the other. Therefore, it’s great that Hibernate provides a portable way to achieve this goal.
SQL Operation Order
Introduction In this article, we are going to see what is the standard SQL operation order. Once you understand the order in which SQL operations are executed, then it will be clear why the Oracle legacy pagination query required a Derived Table in order to make sure that the ROWNUM pseudocolumn is computed after executing the ORDER BY clause.
Testcontainers Database Integration Testing
Introduction In this article, we are going to see how we can use Testcontainers for database integration testing. If you are still using HSQLDB or H2 to test your Spring Boot application that runs on Oracle, SQL Server, PostgreSQL or MySQL in production, then you are better off switching to Testcontainers.
The best way to map MonetaryAmount with JPA and Hibernate
Introduction In this article, we are going to see what is the best way to map the MonetaryAmount object from Java Money and the Currency API when using JPA and Hibernate. While the Java Money and Currency API define the specification, like the MonetaryAmount interface, the Moneta project provides a reference implementation for this API.
Maximum number of database connections
Introduction Have you ever wondered what the maximum number of database connections provided by a given RDBMS is? In this article, we are going to see what limits the number of database connections, no matter if you’re using Oracle, SQL Server, PostgreSQL, or MySQL.
Default Database Primary, Foreign, and Unique Key Indexing
Introduction In this article, we are going to see what is the default database Primary, Foreign, and Unique Key indexing strategy when using Oracle, SQL Server, PostgreSQL, and MySQL. So, if you are wondering whether one of those top relational databases creates a default index whenever you are adding a Primary Key, Foreign Key, or Unique Key constraint, then this article is going to provide you with the answer you’ve been waiting for.

