Multidimensional reporting with CROSS APPLY and PIVOT in MS SQL Server

In this post we’re going to demonstrate how to use PIVOT relational operator to transform data from table-valued into another table. As an example we will use simple Data Warehouse (DWH) that stores annual company reports for harvesting fruits. The goal is to display report showing annual reports of sold fruits for each year.

Read More

Audit entities with Hibernate Envers

Applications often require tracking or logging changes performed on business data. In case of relational database we can use low-level solution by triggering database table operations. But if you’re building Java application you have easier approach from high level point – Hibernate Envers.

Read More

Secure Spring REST With Spring Security and OAuth2

In this post, we are going to demonstrate Spring Security + OAuth2 for securing REST API endpoints on an example Spring Boot project. Clients and user credentials will be stored in a relational database (example configurations prepared for H2 and PostgreSQL database engines). To do it we will have to:

Read More

Spring + Hibernate + EhCache Caching

In this post, we are going to demonstrate the Spring cache + EhCache feature on an example Spring Boot project. Caching will be defined as data queried from a relational database (example configurations prepared for H2 and PostgreSQL database engines).

Read More