All you need to know about JDBC by Vinod Kayartaya

All you need to know about JDBC

12 lectures - 1 hr 30 mins

What's included?

Video Icon 12 videos


Overview of JDBC
5 mins
Working of JDBC application
5 mins
Software setup
Setup H2 Database
8 mins
Coding JDBC
Connecting to H2 database
13 mins
DbUtil class
7 mins
Create table
11 mins
Insert a record
11 mins
Insert record using PreparedStatement
6 mins
Batch execution
6 mins
Get multiple records from DB
7 mins
Get single record from DB
6 mins
A bit advanced topics
Get auto generated primary key
10 mins


  • Basic knowledge of Java programming language
  • Very basic knowledge of RDBMS and SQL commands would be helpful

What will you learn in this course?

  • JDBC Architecture and API
  • Setting up H2 Database
  • Connecting Java applications to an RDBMS
  • Executing SQL commands
  • Handling result of SQL SELECT statements
  • Handling auto-incrementing primary key fields

Who this course for?

  • A beginner to Java programming
  • Developer looking to execute SQL commands using native Java API


JDBC (Java DB Connectivity) is a Java Standard API for connecting a Java application to an RDBMS. Although you may not need to use JDBC directly in any application today, it is important to understand how it works. Any modern frameworks like Hibernate or JPA which are ORM (Object-Relation-Mapper) or Mybatis which is an SQL mapper, behind the scene use JDBC.

In this class, we will be looking into the architecture of a JDBC application, connecting to a DB, executing SQL statements, and handling the results of SQL SELECT statements. We will also be learning how to setup a light weight DB called H2, with out having to install anything on our computer.

The class is completely hands-on based, so get ready to code a lot.

Hi. My name is Vinod

Hi, my name is Vinod, and I am a software trainer, consultant and freelance developer. I am the creator some of the highest rated courses on Udemy. In my professional career, I have trained hundreds of thousands of software engineers. Teaching is not only my profession, but also a passion. Creating online courses gives me the opportunity to reach and help students across the world.