Overview of BLOB (Binary Large Object)

This section describes what are BLOB (Binary Large Object) data types and how to work with them.

BLOB (Binary Large Object) is a large collection of binary data stored in a database table. Different database servers handles BLOB differently. But there are some common characteristics like:

JDBC offers an interface, java.sql.Blob, to allow JDBC driver to provide generic functionalities to handle BLOB data in the database.

BLOB data can also be handled as byte arrays: byte[].

BLOB data can also be handled as binary streams with the java.io.InputStream class.

Table of Contents

 About This Book

 JDBC (Java Database Connectivity) Introduction

 JDK (Java SE) Installation

 Oracle Express Edition Installation on Windows

 Oracle JDBC Drivers

 Oracle - Reference Implementation of JdbcRowSet

 Oracle - PreparedStatement

 Oracle - JBDC CallableStatement

 Oracle CLOB (Character Large Object) - TEXT

Oracle BLOB (Binary Large Object) - BLOB

Overview of BLOB (Binary Large Object)

 Create Tables with CLOB Columns

 Inserting BLOB Values with SQL INSERT Statements

 Inserting BLOB Values with setBytes() Method

 Inserting BLOB Values with setBinaryStream() Method

 Closing InputStream Too Early on setBinaryStream()

 Retrieving BLOB Values with getBytes() Method

 Retrieving BLOB Values with getBinaryStream() Method

 Retrieving BLOB Values with getBlob() Method

 Inserting BLOB Values with setBlob() Method

 Copying BLOB Values to New Rows

 Using Connection Pool with JDBC

 Archived Tutorials

 References

 Full Version in PDF/EPUB