• Post category:StudyBullet-8
  • Reading time:4 mins read


Connecting Java applications to an RDBMS using JDBC API

What you will learn

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

Description

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.


Get Instant Notification of New Courses on our Telegram channel.


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

English
language

Content

Introduction

Overview of JDBC
Working of JDBC application

Software setup

Setup H2 Database

Coding JDBC

Connecting to H2 database
DbUtil class
Create table
Insert a record
Insert record using PreparedStatement
Batch execution
Get multiple records from DB
Get single record from DB

A bit advanced topics

Get auto generated primary key

Finally…

Thank you note and bonus lecture