<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Sql on foojay.io - Friends of OpenJDK</title><link>https://foojayio.github.io/website/today/category/sql/</link><description>Recent content in Sql on foojay.io - Friends of OpenJDK</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Fri, 10 Jul 2026 08:54:25 +0000</lastBuildDate><atom:link href="https://foojayio.github.io/website/today/category/sql/index.xml" rel="self" type="application/rss+xml"/><item><title>Getting Started with Exposed: Kotlin ORM Made Simple</title><link>https://foojayio.github.io/website/today/exposed-kotlin-orm-complete-guide/</link><pubDate>Mon, 06 Jul 2026 03:39:00 +0000</pubDate><guid>https://foojayio.github.io/website/today/exposed-kotlin-orm-complete-guide/</guid><description>&lt;h2 id="h2-0-introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;For quite some time, I have been a huge fan of and fascinated by JetBrains products, tools, and libraries because of their masterful craftsmanship in product creation and their pristine focus on building high-quality developer tools.&lt;/p&gt;
&lt;p&gt;Even more excitingly, JetBrains Java Annotated Monthly newsletters have featured most of the technical articles I wrote for Foojay on topics such as Java, Spring, Spring Boot 4, and OpenRewrite.&lt;/p&gt;
&lt;p&gt;Recently, one Kotlin Domain-Specific Language (DSL) library caught my attention. I immediately tried converting my existing Spring Boot 4 application from Java to Kotlin using Exposed, an ORM framework for Kotlin.
&lt;img src="https://foojayio.github.io/website/today/exposed-kotlin-orm-complete-guide/Exposed-1024x683.png" alt="Exposed" loading="lazy"&gt;
 Kotlin SQL Libary&lt;/p&gt;</description></item><item><title>UCanAccess: The Modern Pure-Java Bridge to Microsoft Access</title><link>https://foojayio.github.io/website/today/ucanaccess-java-ms-access-jdbc-guide/</link><pubDate>Wed, 06 May 2026 08:44:00 +0000</pubDate><guid>https://foojayio.github.io/website/today/ucanaccess-java-ms-access-jdbc-guide/</guid><description>&lt;p&gt;Microsoft Access databases are everywhere. Decades of &lt;code&gt;.mdb&lt;/code&gt; and &lt;code&gt;.accdb&lt;/code&gt; files silently power spreadsheets, small business applications, and legacy data stores across organizations of all sizes. Yet for Java developers, connecting to these files has historically meant wrestling with native Windows libraries, ODBC bridges, and platform-specific hacks.&lt;/p&gt;
&lt;figure class="aligncenter size-full is-resized"&gt;
 &lt;img decoding="async" src="ucanaccess-logo.svg" alt="UCanAccess Logo" class="wp-image-123938" style="width:320px"&gt;
&lt;/figure&gt;
&lt;p&gt;&lt;strong&gt;UCanAccess&lt;/strong&gt; puts an end to that. It is an open-source, pure-Java JDBC driver that lets you read and write Microsoft Access databases (&lt;code&gt;.mdb&lt;/code&gt; and &lt;code&gt;.accdb&lt;/code&gt;) just like any other SQL database &amp;mdash; no native drivers, no Windows dependency, no friction.&lt;/p&gt;</description></item><item><title>Patterns For The Design Of Microservices – Part 2</title><link>https://foojayio.github.io/website/today/patterns-for-the-design-of-microservices-part-2/</link><pubDate>Mon, 30 Oct 2023 08:58:06 +0000</pubDate><guid>https://foojayio.github.io/website/today/patterns-for-the-design-of-microservices-part-2/</guid><description>&lt;p&gt;In the &lt;a href="https://foojayio.github.io/website/today/patterns-for-the-design-of-microservices-part-1/" title="previous article"&gt;previous article&lt;/a&gt;
, we discussed some of the design patterns employed in the creation of microservices. In this subsequent article, we will delve into the remaining patterns that are commonly utilized in the realm of microservices.&lt;/p&gt;
&lt;img fetchpriority="high" decoding="async" class="size-medium wp-image-102866" src="MSPatterns-700x394.png" alt="Microservice Architecture" width="700" height="394"&gt;
&lt;p&gt;Database Patterns&lt;/p&gt;
&lt;br /&gt;
&lt;p&gt;There are seven distinct patterns that further categorize the data management.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Database per Service&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Shared Database&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Saga Pattern&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Command-Query Responsiblity Segregation (CQRS)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;API Composition&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Domain Event&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Event Sourcing&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In the next section, let&amp;rsquo;s discuss each pattern individually.&lt;/p&gt;</description></item><item><title>Book review: "Persistence Best Practices for Java Applications"</title><link>https://foojayio.github.io/website/today/book-review-persistence-best-practices-for-java-applications/</link><pubDate>Fri, 27 Oct 2023 08:56:21 +0000</pubDate><guid>https://foojayio.github.io/website/today/book-review-persistence-best-practices-for-java-applications/</guid><description>&lt;p&gt;&lt;strong&gt;In todays ever-evolving world, fast and efficient data management is becoming ever more important. With the explosion of digital data and diverse data sources, selecting the right database type, whether it&amp;rsquo;s traditional relational, NoSQL, or emerging options like NewSQL, has become pivotal. This also leads us to the next challenge for us, how do we integrate with this? Do we use JPA/JOOQ/&amp;hellip; ? Where/how do we map our data? What is a polyglot setup, and should we be using it?&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>A Dissection of Java JDBC to PostgreSQL, Part 2: Batching</title><link>https://foojayio.github.io/website/today/a-dissection-of-java-jdbc-to-postgresql-connections-part-2-batching/</link><pubDate>Tue, 04 Jul 2023 13:56:41 +0000</pubDate><guid>https://foojayio.github.io/website/today/a-dissection-of-java-jdbc-to-postgresql-connections-part-2-batching/</guid><description>&lt;p&gt;This is the second part of a series where I look into how Java JDBC connections to PostgreSQL are working, to understand how to optimally implement them.&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;ve landed on this article, it might be a good idea to read &lt;a href="https://foojayio.github.io/website/today/a-dissection-of-java-jdbc-to-postgresql-connections/" title="my first article"&gt;my first article&lt;/a&gt;
 as well, which gives an introduction and shares how JDBC communicates with &lt;a href="https://www.yugabyte.com/postgresql/" title="PostgreSQL" target="_blank" rel="noopener noreferrer"&gt;PostgreSQL&lt;/a&gt;
 using simple and extended protocols.&lt;/p&gt;
&lt;p&gt;This new article specifically explores batching. Batching for PostgreSQL JDBC is a property of the extended protocol. It uniquely allows you to send multiple statements in a single request.&lt;/p&gt;</description></item><item><title>Ingesting Data from Kafka into the QuestDB time-series database</title><link>https://foojayio.github.io/website/today/ingesting-time-series-events-from-kafka-into-questdb/</link><pubDate>Tue, 28 Mar 2023 09:38:35 +0000</pubDate><guid>https://foojayio.github.io/website/today/ingesting-time-series-events-from-kafka-into-questdb/</guid><description>&lt;p&gt;If you are working on a project with fast or streaming data, chances are Apache Kafka is already &lt;a href="https://kafka.apache.org/powered-by#:~:text=Today%2C%20Kafka%20is%20used%20by,80%25%20of%20the%20Fortune%20100." target="_blank" rel="noopener noreferrer"&gt;part of your pipeline&lt;/a&gt;
.&lt;/p&gt;
&lt;p&gt;But if you want to analyse your data, you will need to ingest from Kafka into some destination.&lt;/p&gt;
&lt;p&gt;For time-series data, QuestDB can be an excellent choice.&lt;/p&gt;
&lt;p&gt;For those of you who are not yet familiar with &lt;a href="https://github.com/questdb/questdb" title="QuestDB" target="_blank" rel="noopener noreferrer"&gt;QuestDB&lt;/a&gt;
, it is an Apache 2.0 licensed database designed for high throughput ingestion and fast SQL queries.&lt;/p&gt;</description></item><item><title>5 Great Reasons to use jOOQ</title><link>https://foojayio.github.io/website/today/5-great-reasons-to-use-jooq/</link><pubDate>Wed, 22 Mar 2023 14:45:13 +0000</pubDate><guid>https://foojayio.github.io/website/today/5-great-reasons-to-use-jooq/</guid><description>&lt;p&gt;&lt;em&gt;&lt;strong&gt;Hi, I&amp;rsquo;m &lt;a href="https://twitter.com/lukaseder" title="Lukas" target="_blank" rel="noopener noreferrer"&gt;Lukas&lt;/a&gt;
. I was invited to talk about the business behind jOOQ on Foojay.io and as a short introduction to &lt;a href="https://www.jooq.org/" title="jOOQ" target="_blank" rel="noopener noreferrer"&gt;jOOQ&lt;/a&gt;
, I&amp;rsquo;d like to highlight 5 great reasons to use it.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Before discussing those reasons:&lt;/p&gt;
&lt;h2 id="h2-0-what-is-jooq"&gt;What is jOOQ&lt;/h2&gt;
&lt;p&gt;jOOQ is an internal &lt;a href="https://en.wikipedia.org/wiki/Domain-specific_language" title="domain-specific language " target="_blank" rel="noopener noreferrer"&gt;domain-specific language&lt;/a&gt;
 (DSL) modelling the SQL language as an API directly in Java.&lt;/p&gt;
&lt;p&gt;This provides compile-time type safety to your query and enables a lot of other interesting features that I&amp;rsquo;ll show later.&lt;/p&gt;</description></item><item><title>How to Get Started with the Hazelcast Viridian Serverless</title><link>https://foojayio.github.io/website/today/streaming-real-time-data-on-the-hazelcast-viridian-serverless/</link><pubDate>Fri, 10 Mar 2023 10:28:45 +0000</pubDate><guid>https://foojayio.github.io/website/today/streaming-real-time-data-on-the-hazelcast-viridian-serverless/</guid><description>&lt;p&gt;In this tutorial, you&amp;rsquo;ll learn how to build real-time streaming applications with the Hazelcast Viridian Serverless using SQL.&lt;/p&gt;
&lt;p&gt;You&amp;rsquo;ll also learn how to build a materialized view from streaming data and contextual data in Hazelcast.&lt;/p&gt;
&lt;p&gt;Streaming data is data that is continuously generated in small sizes.&lt;/p&gt;
&lt;p&gt;Streaming data includes a wide variety of sources such as retail purchases, financial trades, or telemetry from connected vehicles.&lt;/p&gt;
&lt;p&gt;This data isn&amp;rsquo;t usually useful by itself because of its size.&lt;/p&gt;</description></item><item><title>When Disaster Strikes: Production Troubleshooting</title><link>https://foojayio.github.io/website/today/when-disaster-strikes-production-troubleshooting/</link><pubDate>Fri, 12 Aug 2022 11:03:08 +0000</pubDate><guid>https://foojayio.github.io/website/today/when-disaster-strikes-production-troubleshooting/</guid><description>&lt;p&gt;&lt;a href="https://twitter.com/TomGranot/" target="_blank" rel="noopener noreferrer"&gt;Tom Granot&lt;/a&gt;
 and &lt;a href="https://twitter.com/debugagent/" target="_blank" rel="noopener noreferrer"&gt;myself&lt;/a&gt;
 have had the privilege of &lt;a href="https://twitter.com/vlad_mihalcea" target="_blank" rel="noopener noreferrer"&gt;Vlad Mihalcea&amp;rsquo;s&lt;/a&gt;
 online company for a while now. As a result we decided to &lt;a href="https://go.lightrun.com/production-troubelshooting-masterclass" target="_blank" rel="noopener noreferrer"&gt;do a workshop together&lt;/a&gt;
 talking about a lot of the things we learned in the process. This workshop would be pretty informal ad-hoc, just a bunch of guys chatting and showing off what we can do with tooling.&lt;/p&gt;
&lt;p&gt;In celebration of that I thought I&amp;rsquo;d write about some of the tricks we discussed amongst ourselves in the past to give you a sense of what to expect when joining us for the workshop but also a useful tool in its own right.&lt;/p&gt;</description></item><item><title>NoSQL Use Cases: When to Use a Non-Relational Database</title><link>https://foojayio.github.io/website/today/nosql-use-cases-when-to-use-a-non-relational-database/</link><pubDate>Thu, 28 Jul 2022 07:32:07 +0000</pubDate><guid>https://foojayio.github.io/website/today/nosql-use-cases-when-to-use-a-non-relational-database/</guid><description>&lt;p&gt;For decades, many companies have relied on relational databases to store, protect, and access their data.{#d8cf}&lt;/p&gt;
&lt;p&gt;SQL databases, in particular, worked well for a long time and still do for many use cases. But, today, there is a wide range of situations where SQL databases can no longer satisfy the needs of modern enterprises, especially those that have made the move to the cloud.{#d8cf}&lt;/p&gt;
&lt;p&gt;Increasingly, these companies are turning to NoSQL databases to meet their goals.{#d8cf}&lt;/p&gt;</description></item><item><title>Spring Boot Performance Workshop with Vlad Mihalcea</title><link>https://foojayio.github.io/website/today/spring-boot-performance-workshop-with-vlad-mihalcea/</link><pubDate>Fri, 24 Jun 2022 07:43:52 +0000</pubDate><guid>https://foojayio.github.io/website/today/spring-boot-performance-workshop-with-vlad-mihalcea/</guid><description>&lt;p&gt;A couple of weeks ago, we had a great time hosting the workshop you can see below with Vlad Mihalcea. It was loads of fun and we hope to do this again soon!&lt;/p&gt;
&lt;p&gt;In this workshop, we focused on Spring Boot performance but most importantly on Hibernate performance, which is a common issue in production environments.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s especially hard to track since issues related to data are often hard to perceive when debugging locally. When we have &amp;ldquo;real world&amp;rdquo; data at scale, they suddenly balloon and become major issues.&lt;/p&gt;</description></item><item><title>SQL vs. NoSQL: Pros &amp; Cons</title><link>https://foojayio.github.io/website/today/sql-vs-nosql-pros-cons-2/</link><pubDate>Thu, 21 Apr 2022 09:28:50 +0000</pubDate><guid>https://foojayio.github.io/website/today/sql-vs-nosql-pros-cons-2/</guid><description>&lt;p&gt;What&amp;rsquo;s the best way to store, protect and access your data?{#abb7}&lt;/p&gt;
&lt;p&gt;This is a fundamental, yet critical decision.{#abb7}&lt;/p&gt;
&lt;p&gt;After all, data is the cornerstone of success for just about every modern organization.{#abb7}&lt;/p&gt;
&lt;p&gt;For most companies, the choice comes down to SQL and NoSQL databases. Each has unique strengths and weaknesses.{#abb7}&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;SQL databases have been a proven option since the 1970s. They are made up of highly structured tables, consisting of rows and columns, related to one other through common attributes. Every column is required to have a value for its corresponding row.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- --&gt;
&lt;ul&gt;
&lt;li&gt;NoSQL (&amp;ldquo;not only SQL&amp;rdquo; or &amp;ldquo;non-SQL&amp;rdquo;) databases came along later to break the relational table straitjacket, with the ability to store and access all data types, structured and unstructured, together.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;They&amp;rsquo;re extremely flexible and easy for developers to work with and modify. &lt;a href="https://www.datastax.com/what-is/nosql" target="_blank" rel="noopener noreferrer"&gt;Learn more about SQL and NoSQL databases and their basic differences&lt;/a&gt;
.{#3ad0}&lt;/p&gt;</description></item><item><title>SQL vs. NoSQL: Pros &amp; Cons</title><link>https://foojayio.github.io/website/today/sql-vs-nosql-pros-cons/</link><pubDate>Wed, 09 Feb 2022 09:26:22 +0000</pubDate><guid>https://foojayio.github.io/website/today/sql-vs-nosql-pros-cons/</guid><description>&lt;p&gt;What&amp;rsquo;s the best way to store, protect and access your data? This is a fundamental, yet critical decision. After all, data is the cornerstone of success for just about every modern organization. For most companies, the choice comes down to SQL and NoSQL databases. Each has unique strengths and weaknesses.&lt;/p&gt;
&lt;p&gt;SQL databases have been a proven option since the 1970s. They are made up of highly structured tables, consisting of rows and columns, related to one other through common attributes. Every column is required to have a value for its corresponding row. NoSQL (&amp;ldquo;not only SQL&amp;rdquo; or &amp;ldquo;non-SQL&amp;rdquo;) databases came along later to break the relational table straitjacket, with the ability to store and access all data types, structured and unstructured, together. They&amp;rsquo;re extremely flexible and easy for developers to work with and modify. &lt;a href="https://www.datastax.com/nosql" target="_blank" rel="noopener noreferrer"&gt;Learn more about SQL and NoSQL databases and their basic differences&lt;/a&gt;
.&lt;/p&gt;</description></item></channel></rss>