Home » Enterprise Java » spring » JDBC

JDBC

JDBC Kerberos Authentication Example

1. Introduction In this post, we feature a comprehensive example of JDBC Kerberos Authentication. The Kerberos authentication method is very popular. It is not used for query encryption and provides secure authentication. 2. JDBC Kerberos Authentication 2.1 Prerequisites Java 7 or 8 is required on the linux, windows or mac operating system. SqlServer database 2019 is required for testing JDBC ...

Read More »

Amazon Redshift JDBC Connection Example

In this tutorial, we will learn about how to set up a JDBC connection to an Amazon Redshift cluster. We will also discuss and analyze a coding example where we connect to an Amazon Redshift Cluster via JDBC and perform CRUD operations on a table. 1. What is Amazon Redshift? Amazon Redshift is a fully managed data warehouse service in ...

Read More »

Establishing JDBC Connection in Java

In this post, we will learn how to establish a JDBC connection, from a Java program to an oracle database. Once we establish a connection, we will insert records into it. You can also check our Java Programming Database Tutorial in the following video: 1. Introduction JDBC is an acronym for Java Database Connectivity. It’s an advancement for ODBC ( ...

Read More »

Hive JDBC Connection Java Example

1. Introduction In this article, we will take a look at Hive JDBC. Hive is part of the Hadoop Ecosystem. It is used in Big Data solutions with Hadoop. It was developed by Facebook. Hadoop is an Apache Opensource project now. 2. Hive – JDBC Connection The Apache Hive project has featured in reading, writing, and managing big data. It ...

Read More »

JDBC Example For Beginners

1. Introduction In this example, we will learn how to use JDBC shipped with Java SE. The purpose of JDBC is to make possible interaction with any database in a generic way. This is to hide such details which are specific to the database vendor and expose a generic interface for client applications. We will see how to connect to ...

Read More »

JDBC Named Parameters Example with Spring NamedParameterJdbcTemplate

In this example we will present the usage of Spring NamedParameterJdbcTemplate. 1. Introduction JDBC in general, acts as a communication layer between client applications and various databases hence relevant how we can utilise it. An introduction about plain JDBC is already available under the following link https://examples.javacodegeeks.com/enterprise-java/servlet/jdbc-servlet-example/#introduction. It is best reading that post as well to have a broader understanding of the topic. Table Of ...

Read More »

Spring Transaction Management Example with JDBC Example

In this article, I will show you an example of spring transaction management using JDBC. Let me first touch base on what is transaction and how spring facilitates transaction management. A transaction is a series of actions that are treated as a single unit of work. These actions should either complete in its entirety or not at all. Spring, provides ...

Read More »

Spring JdbcTemplate Example

In this post, we feature a comprehensive Example on Spring JdbcTemplate. When we need to interface with databases the Spring JDBC framework provides solutions to all the low-level details, like open/close a connection, prepare and execute SQL statements, process exceptions and handle transactions. Thus, the only thing a developer must do is just define connection parameters and specify the SQL ...

Read More »

Delete records in database with JdbcTemplate

With this example we are going to demonstrate how to delete records in a database, using the JdbcTemplate class provided by the Spring Framework. The JdbcTemplate class is the central class in the JDBC core package. It simplifies the use of JDBC and helps to avoid common errors. It executes core JDBC workflow, leaving application code to provide SQL and ...

Read More »

Create Data Source for JdbcTemplate

This is an example of how to create a Datasource for the JdbcTemplate class provided by the Spring Framework. The DataSource class is a utility class that provides connection to the database. It is part of the JDBC specification and allows a container or a framework to hide connection pooling and transaction management issues from the application code. Creating a ...

Read More »