Home » Tag Archives: JDBC

Tag Archives: JDBC

Why you should always use connection pooling with Oracle XE

java-interview-questions-answers

Introduction Oracle Express Edition is the free version of Oracle Enterprise Edition and its smaller size makes it very convenient for testing various Oracle functionalities. According to Oracle documentation, the Express Edition can use at most one CPU and 1 GB of RAM, but in reality there are other limitations that are not always obvious. Database connection handling anomaly The ...

Read More »

Installing PostgreSQL PL/Java as a PostgreSQL Extension

postgresql-logo

In 2011 I wrote a series of articles on PostgreSQL PL/Java. The basic information is still solid but there is a now a much easier way to install PL/Java from source. This also eliminates the need to depend on third parties to create packages. These notes will be fairly brief since I assume my readers are already familiar with git ...

Read More »

What’s Even Harder Than Dates and Timezones? Dates and Timezones in SQL / JDBC!

java-logo

There was an interesting discussion recently on the jOOQ mailing list about jOOQ’s current lack of out-of-the-box support for TIMESTAMP WITH TIME ZONE data types. No one said that date, time and timezones are easy! There’s an amusing piece here, which I recommend reading: Falsehoods programmers believe about time And when that’s not enough, read also: More falsehoods programmers believe ...

Read More »

Let’s Review How to Insert Clob or Blob via JDBC

java-interview-questions-answers

LOBs are a PITA in all databases, as well as in JDBC. Handling them correctly takes a couple of lines of code, and you can be sure that you’ll get it wrong eventually. Because you have to think of a couple of things:                   Foremost, LOBs are heavy resources that need special ...

Read More »

How to FlatMap a JDBC ResultSet with Java 8?

java-interview-questions-answers

You’re not into the functional mood yet? Then the title might not resonate with you – but the article will! Trust me. Essentially, we want this: +------+------+------+ | col1 | col2 | col3 | +------+------+------+ | A | B | C | row 1 | D | E | F | row 2 | G | H | I | ...

Read More »

SELECT statements batch fetching with JDBC and Hibernate

jboss-hibernate-logo

Introduction Now that I covered Hibernate batch support for INSERT, UPDATE and DELETE statements, it’s time to analyze SELECT statements result set batch fetching. JDBC ResultSet fetching The JDBC ResultSet offers a client-side Proxy cursor for fetching the current statement return data. When the statement gets executed, the result must be transferred from the database cursor to the client-side one. ...

Read More »

Hack up a Simple JDBC ResultSet Cache Using jOOQ’s MockDataProvider

jooq-2-logo

Some queries shouldn’t hit the database all the time. When you query for master data (such as system settings, languages, translations, etc.), for instance, you may want to avoid sending the same silly query (and the results) over the wire all the time. For example: SELECT * FROM languages Most databases maintain buffer caches to accelerate these queries, so you ...

Read More »

JDBC Tutorial – The ULTIMATE Guide (PDF Download)

java-logo

This tutorial is about JDBC (Java Database Connectivity), an API provided by Oracle that allows programmers to handle different databases from Java applications: it allows developers to establish connections to databases, defines how a specific client can access a given database, provides mechanisms for reading, inserting, updating and deleting entries of data in a database and takes care of transactions ...

Read More »

Tomcat to Wildfly: Configuring Database connectivity

java-interview-questions-answers

This excerpt has been taken from the “From Tomcat to WildFly” book in which you’ll learn how to port your existing Tomcat architectures to WildFly, including both the server configuration and the applications running on the top of it. WildFly is a fully compliant Java Enterprise Edition 7 container with a much wider set of available services and options compared ...

Read More »
Want to take your Java Skills to the next level?
Grab our programming books for FREE!
  • Save time by leveraging our field-tested solutions to common problems.
  • The books cover a wide range of topics, from JPA and JUnit, to JMeter and Android.
  • Each book comes as a standalone guide (with source code provided), so that you use it as reference.
Last Step ...

Where should we send the free eBooks?

Good Work!
To download the books, please verify your email address by following the instructions found on the email we just sent you.