JDBC Tutorials - Herong's Tutorial Examples - v3.12, by Dr. Herong Yang
Downloading and Installing Java DB (Derby)
This section describes how to download and install Java DB (Derby database server) 10.11 - free for evaluation.
Java DB is a relational database management system that is based on the Java programming language and SQL. Java DB is a commercial release of the Apache Software Foundation's (ASF) open source relational database project. But you can still download a copy of Java DB free for evaluation. The Apache project is called Derby.
If you want to install the latest version of Derby, you can follow this tutorial:
1. Go to Apache Derby Website at https://db.apache.org/derby/.
2. Click "Download" from the menu. You see the list of Derby versions for downloading.
3. Click "10.15.1.3" to see the download option page.
4. Click "db-derby-10.15.1.3-bin.zip" to download the binary package in ZIP format, which is good for Windows, Linux and macOS systems.
5. Unzip the download file in a local directory like %HOME%\local\derby or $HOME/local/derby depending your system platform. All installed files will be in the "db-derby-10.15.1.3-bin" sub-directory.
6. Look at installed files:
(on Windows systems) herong> dir %HOME%\local\derby\db-derby-10.15.1.3-bin (on Linux or macOS systems) herong$ ls -l $HOME/local/derby/db-derby-10.15.1.3-bin 47124 KEYS 11560 LICENSE 12966 NOTICE 12616 RELEASE-NOTES.html (dir) bin (dir) demo (dir) docs 4993 index.html (dir) javadoc (dir) lib (dir) test
7. Setting environment variables to help running Derby. For example:
(on Windows systems) herong> set JAVA_HOME=C:\Program Files\Java\jdk-12.0.1 herong> set DERBY_HOME=%HOME%\lib\db-derby-10.15.1.3-bin (on CentOS Linux systems) herong$ export JAVA_HOME=/usr/lib/jvm/jre-1.8.0-openjdk.i386 herong$ export DERBY_HOME=$HOME/lib/db-derby-10.15.1.3-bin (on macOS systems) $ export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-13.jdk/Contents/Home $ export DERBY_HOME=$HOME/lib/db-derby-10.15.1.3-bin
Cool. I have Derby 10.15 installed on my local system and ready to use!
Table of Contents
JDBC (Java Database Connectivity) Introduction
►Installing and Running Java DB - Derby
►Downloading and Installing Java DB (Derby)
Java DB (Derby) in the JDK 1.8 Package
Downloading Java DB (Derby) Documents
"sysinfo" - Checking Java DB (Derby) Installation
Setting Up Java DB (Derby) in Network Server
"ij" - Client Tool to Create New Databases
Derby (Java DB) JDBC DataSource Objects
Java DB (Derby) - DML Statements
Java DB (Derby) - ResultSet Objects of Queries
Java DB (Derby) - PreparedStatement
MySQL JDBC Driver (MySQL Connector/J)
MySQL - Reference Implementation of JdbcRowSet
MySQL - JBDC CallableStatement
MySQL CLOB (Character Large Object) - TEXT
MySQL BLOB (Binary Large Object) - BLOB
Oracle Express Edition Installation on Windows
Oracle - Reference Implementation of JdbcRowSet
Oracle - JBDC CallableStatement
Oracle CLOB (Character Large Object) - TEXT
Oracle BLOB (Binary Large Object) - BLOB
Microsoft SQL Server Express Edition
Microsoft JDBC Driver for SQL Server
Microsoft JDBC Driver - Query Statements and Result Sets
Microsoft JDBC Driver - DatabaseMetaData Object
Microsoft JDBC Driver - DDL Statements
Microsoft JDBC Driver - DML Statements
SQL Server - PreparedStatement
SQL Server CLOB (Character Large Object) - TEXT
SQL Server BLOB (Binary Large Object) - BLOB
JDBC-ODBC Bridge Driver - sun.jdbc.odbc.JdbcOdbcDriver
JDBC-ODBC Bridge Driver - Flat Text Files
JDBC-ODBC Bridge Driver - MS Access
JDBC-ODBC Bridge Driver - MS SQL Server
Summary of JDBC Drivers and Database Servers