Home » Tag Archives: Database

Tag Archives: Database

Work with Parallel Database Streams using Java 8

java-interview-questions-answers

What is a Parallel Database Stream? Read this post and learn how you can process data from a database in parallel using parallel streams and Speedment. Parallel streams can, under many circumstances, be significantly faster than the usual sequential streams. With the introduction of Java 8, we got the long awaited Stream library. One of the advantages with streams is that ...

Read More »

Database CRUD Operations in Java 8 Streams

java-interview-questions-answers

The biggest obstacle to overcome when starting out with a new tool is to get your head around how to do the little things. By now you might feel confident in how the new Java 8 Stream API works, but you might not have used it for database querying yet. To help you get started creating, modifying and reading from ...

Read More »

Groovy Sql and Oracle ‘Invalid column index’ SQLException

groovy-logo

There are some minor potential dangers associated with Groovy’s def keyword. The Groovy style and language feature guidelines for Java developers provides some warnings about use of def. In this blog post, I demonstrate an advantage of being more explicit in typing when using Groovy SQL with an Oracle database to avoid a potential “Invalid column index” SQLException because I’ve ...

Read More »

Introduction to PostgreSQL PL/java

postgresql-logo

Modern databases allow stored procedures to be written in a variety of languages. One commonly implemented language is java.N.B., this article discusses the PostgreSQL-specific java implementation. The details will vary with other databases but the concepts will be the same. Installation of PL/Java Installation of PL/Java on an Ubuntu system is straightforward. I will first create a new template, template_java, ...

Read More »

Database Abstraction and SQL Injection

software-development-2-logo

I have subscribed to various user groups of jOOQ’s competing database abstraction tools. One of which is ActiveJDBC, a Java implementation of Active Record design pattern. Its maintainer Igor Polevoy recently claimed that: SQL injection is a web application problem, and not directly related to an ORM. ActiveJDBC will process any SQL that is passed to it. (See the discussion ...

Read More »

Database Usage Practices

software-development-2-logo

After a long period of intense thinking, research and brainstorming sessions, I have finally made up my mind with few best practices that can be considered while using a database. All database servers today has capabilities to optimize the queries sent to the server, ironically, they lack the capability to alter query in such a way that the throughput is ...

Read More »

SQL tooling, the ranking

software-development-2-logo

When you need to get up and running quickly with your database, the tooling becomes very important. When developing jOOQ and adding integrations for new databases, I really love those ones that provide me with simple ways to create new databases, schemata, users, roles, grants, whatever is needed, using simple dialogs where I can click next next next. After all, ...

Read More »

DBUnit, Spring and Annotations for Database testing

dbunit-logo

If you have ever tried writing database tests in Java you might have come across DBUnit. DBUnit allows you to setup and teardown your database so that it contains consistent rows that you can write tests against. You usually specify the rows that you want DBUnit to insert by writing a simple XML document, for example:         ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Spring Interview QnA
  • Multithreading & Concurrency QnA
  • JPA Minibook
  • JVM Troubleshooting Guide
  • Advanced Java
  • Java Interview QnA
  • Java Design Patterns