Author: Patrycja Dybka

Java Software Developer

How to Set Up a Composite Primary Key in jOOQ and Hibernate

In today’s article, we will take a look at composite primary key support in two top Java ORMs: jOOQ and Hibernate . We’ll look at a couple examples, learn how column configuration looks in Hibernate, and how support is organized in jOOQ.Thecomposite primary keyis a key that consists of more than one column, and its column combination guarantees its uniqueness.To handle the connection to the database, the application uses libraries known as object-relational mappers, or ORMs. Let’s see how jOOQ and Hibernate support this functionality.

How to Develop a Simple Tic Tac Toe Game with Spring Boot and AngularJS

Everyone likes to play games, especially the simple ones. Tic tac toe is about as simple as you can get, and despite its age it is still widely played. In the past, the only way to play tic tac toe was on paper; now there are plenty of computerized options. In this article (inspired by our recent post, A Database Model for Simple Board Games ), we’ll present a tutorial on building a tic tac toe web application with Spring Boot and AngularJS. The final code is hosted on GitHub.

The History of Slonik, the PostgreSQL Elephant Logo

Logos are powerful. What better way to remind people of a product than an eye-catching, memorable symbol? With that in mind, today we’ll answer the question ‘Why did PostgreSQL choose an elephant for its logo?’Every product or company has its logo – something that identifies and encapsulates the essence of their brand. In time, it practicallybecomesthe brand: can you imagine McDonald’s without its golden arches? What if the Coca-Cola logo was suddenly done in purple block print?

CHAR and VARCHAR Data Types in Different Database Engines

Storage engines can surprise you. For example, take the CHAR data type. It expects an exact number of characters and by definition stores afixed amountof information. However, you don’t have to fill all the available CHAR space – a shorter value will work. This is so similar to VARCHAR that I decided to explore the differences between these two types.Before diving into the details, let’s start with some basic information. CHAR and VARCHAR are SQL data types dedicated to storing character values. They are available in almost every database engine. Due to database and encoding particulars, the storage of character values in CHAR and VARCHAR columns differs.

Merging Multiple User Accounts

Social media surrounds us, so it’s not unusual for applications to require some kind of social media integration. The most common issigning in with Facebook, Twitter, or another service. Users expect to be able to log in with different social accounts. So, applications meet these expectations by offering external login options.Let’s take a look at this functionality and investigate how to merge users’ accounts – specifically, we’ll consider the situation when people use several methods to log in.

Crow’s Foot Notation

The most recognizable characteristic of crow’s foot notation (also known as IE notation) is that it uses graphical symbols to indicate the ‘many’ side of the relationship. The three-pronged ‘many’ symbol is also how this widely-used notation style got its name. Let’s see where crow’s foot is placed in the history of data modeling and take a look at its symbols.History: How Crow’s Foot Notation Got StartedThe beginning of crow’s foot notation dates back to an article by

Crow’s Foot Notation in Vertabelo

Various ERD notations follow different styles for entities, relationships, and attributes. Usually there isn’t much standardization between them, so notations bear little resemblance to each other. Among the plethora of ERD diagram notations, crow’s foot notation is definitely the most used. In this article, we’ll investigate its components within the Vertabelo database model.Before we start looking into crow’s foot notation, we must understand that there are various levels of Entity-Relationship diagrams:

How to Store Authentication Data in a Database. Part 4

Handling user registration and authentication isn’t an easy task. Both users and developers understand this. Users have to select and remember another username and password (taking into account different password policies, of course). A developer’s responsibility is to make this process secure and to properly protect the user’s data. So it’s no surprise that logging in with one account – Facebook or Google, for example – is extremely popular. Users gain easy access, and developers can delegate the sensitive process of authenticating users to social media services.

How to Create a Spark REST API With jOOQ

I’ve been testing a ton of frameworks lately – good and otherwise. One of them, the Java micro framework Spark , really amazed me with its simplicity and rapid development capabilities. In this article, we’ll examine an example of Spark’s usefulness by creating a REST API.So, without further ado, let’s see how to store, retrieve, update and delete some information in a PostgreSQL database using jOOQ ORM over a RESTful API in a simple To-do app.

Generate jOOQ Classes With Vertabelo and Gradle

jOOQ is a Java Object-Relational Mapper that lets you build type safe SQL queries through its fluent API. Using built-in Vertabelo support we can generate sufficient code from the previously designed model. Generated Java classes correspond to database tables, records, etc. This time, we automate this process by using Gradle build system.There are two ways to generate ready to use Java classes with Vertabelo : Generate jOOQ classes via Vertabelo XML