MySQL BLOB (Binary Large Object) - BLOB

This chapter provides tutorial notes on BLOB (Binary Large Object) data types, BLOB, with MySQL JDBC Driver. Topics include creating tables to store BLOB values in MySQL server; inserting BLOB values with direct SQL INSERT statements, or PreparedStatement with setBytes(), setBinaryStream() or setBlob() methods; retrieving BLOB values from ResultSet with getBytes(), getBinaryStream() or getBlob() method.


These sections are omitted from this Web preview version. To view the full content, see information on how to obtain the full version this book.

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


Takeaways:

Table of Contents

 About This Book

 JDBC (Java Database Connectivity) Introduction

 JDK (Java SE) Installation

 MySQL Installation on Windows

 MySQL JDBC Driver (MySQL Connector/J)

 MySQL - PreparedStatement

 MySQL - Reference Implementation of JdbcRowSet

 MySQL - JBDC CallableStatement

 MySQL CLOB (Character Large Object) - TEXT

MySQL BLOB (Binary Large Object) - BLOB

 Using Connection Pool with JDBC

 Archived Tutorials

 References

 Full Version in PDF/EPUB