Installing and Configuring Oracle XE for JDBC Hands On


We will write a simple JDBC program to get started with JDBC concepts we learned at to the notes on particular database for installation and configuration prerequesites.


JDBC Drivers and Connection Strings

Here we will list down the sample connection urls used in the jdbc examples at

Oracle Database 11g JDBC Drivers and Connection String


Driver Download Url

Driver names include ojdbc5.jar for java 5,  ojdbc6.jar for java 6 etc.


Sample Connection String for Oracle XE

MySQL Stored Procedure and Stored Function Examples

Here we discuss examples for different cases of usage for stored procedures and stored functions. Please refer to the note on ‘Stored Procedures and Stored Functions in MySQL’ for more theory, details and explanations.

Stored Procedures and Stored Functions in MySQL

A stored routine allow users to define a set of statements that they can later call together. Stored procedures and stored functions are the two types of stored routines in MySQL. A stored procedure takes in zero or more input parameters and runs specified SQL statements. A stored function takes in zero or more parameters, runs specified SQL, and returns exactly one scalar value.

An Overview of Triggers in MySQL with Example

A trigger is a set of commands invoked automatically when an SQL statement changes data on the associated table. Other stored SQL types in MySQL are events, stored procedures, and stored functions.

Basic SQL Concepts - WHERE CLAUSE

The WHERE clause lets you add further conditions on your query. We will see the use of WHERE clauses along with other clauses that will help us refine our queries in this section.

Basic SQL DDL Commands

DDL stands for Data Definition Language, and these queries are used to create or manipulate the structure of the database and schemas. Here we will see basic DDL queries that you will use in general. Please feel free to add more through the comments section.

Basic SQL Concepts

First we will look at some commonly asked questions based on the contents of this page. You can refer to getting-started-with-oracle-xe-and-jdbc-hands-On for setting up oracle xe and database for examples here: create 2 tables employee and emp, with 2 columns empName and id; and insert data with ids ranging from 1 to 5. You might have to use some common sense for some of the examples, like deleting/modifying duplicate data.

Important JDBC Core API Classes, Interfaces and Exceptions

The JDBC API is comprised of two Java packages: java.sql and javax.sql. The following are core JDBC classes, interfaces, and exceptions in the java.sql package:

Introduction to JDBC

JDBC is an API for accessing data in relational databases such as Oracle, MySQL etc. from Java in a standard way using the SQL language. JDBC actually lets you access any tabular data sources like relational databases, spreadsheets or even flat files. You pass SQL to java methods in the JDBC classes and get back JDBC objects that represent the results of your query. JDBC is portable since Java is portable across platforms. JDBC also allow us to access an ODBC-based database using a JDBC-ODBC bridge.  


Search the Web

Custom Search

Searches whole web. Use the search in the right sidebar to search only within!!!