Java JDBC using SQLite/Working with BLOBs

From Wikibooks, open books for an open world
Jump to navigation Jump to search

Storing and retrieving binary large objects, BLOBs, from SQLite is perhaps one of the more problematic areas of SQLite itself since early versions had no direct access mechanism for this, and very little in the way of support functionality. However, BLOBs, by their very nature, can be stored and retrieved programmatically since they are, after all, nothing more than suitably arranged byte arrays. Previously, the biggest limitation was in the size of a data row in versions of SqlLite prior to 3.0 which was set at a meagre 1 MB. Versions 3.0 and higher have no such limitation.

Preparation of a table space[edit | edit source]

Insertion of BLOBs[edit | edit source]

Retrieval of BLOBs[edit | edit source]

Other considerations[edit | edit source]