Large Objects—BLOBs and CLOBs

The SQL types we've used so far in this and previous chapters—NUMBER, VARCHAR2, and DATE—correspond more or less to basic Java types, such as int, long double, Date, and String. To allow maximum flexibility, SQL also supports untyped objects, which—unlike the other SQL types—are virtually unlimited (up to 4 gigabytes) in size. These are called large objects (LOBs) and come in two varieties, character large objects (CLOBs) and binary large objects (BLOBs). The latter are especially well named because they are, in effect, just blobs to the database—undifferentiated stuff with no meaning, as far as the database is concerned.

One way to think of the difference between BLOBs and CLOBs is by analogy to the difference between ...

Get Java™ Oracle® Database Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.