PgConf.Russia 2017 talks

PostgreSQL & Java Tutorial

Alvaro Hernandez
8Kdata, CEO

Álvaro is a 38 year-old IT entrepreneur, based in Madrid, Spain. Founder and CEO at 8Kdata (, a database R&D company, he spends most of his time working on the ToroDB ( project, the first NoSQL-on-SQL database, a MongoDB-compatible database that runs on top of PostgreSQL. He is a passionate software developer and open source advocate. Álvaro is a Java software developer, member of, but also a DBA, trainer and frequent speaker at international database conferences. He also founded the PostgreSQL Spanish User Group (www.postgrespañ, one of the largest PUGs in the world, with more than 700 members.

Java is one of the most used languages when programming with PostgreSQL databases. Join this tutorial to learn or review the techniques to connect to postgres, best programming practices with JDBC, and to explore jOOQ, a mapper software that allows you to use the full power of SQL and postgres advanced query features while avoiding all the boilerplate code.

This tutorial is very practical: most of the time will be dedicated to iterate through code samples. It will cover:

  • Introduction to Java and PostgreSQL
  • Ways of connecting to PostgreSQL from Java (not only JDBC!)
  • Introduction to JDBC. JDBC types. PostgreSQL JDBC
  • Code demo: JDBC with PostgreSQL. From Java 1.4 to Java 8, best practices and code samples
  • Code demo: jOOQ, a great mapper for PostgreSQL
  • Java inside PostgreSQL
  • The future of Java and PostgreSQL

About two-thirds of the tutorial will be dedicated to iterate over code samples and demos. All the code would be available from public open-source repositories and built with maven, so that any attendee may download it and build easily to play with it during the tutorial (although not required).


Part 1

Part 2

Part 3

Part 4