The importance of large data storage has
significantly gone up with the advent of new technologies. Apparently, the storage requirements of
applications is also on an upward trend because the necessity to represent real life situations in
databases has resulted in the need for object data types. Multimedia entities, such as images,
video, and audio clips were rarely used outside of specialty software. Today, many Web-based
applications require their databases to manage such data. Other software's need to store bulk data
concerned with routine diagrams, maps, or business models. In order to cater these needs, Daffodil
DB supports the concept of Object Data Types. The object data types are: -
Character Large Objects (CLOB): A character string comprising of single-byte
characters with an allied code page. This data type is best suited for storing text-oriented
information where the size of data could grow beyond the limits of a regular VARCHAR data
type.
Binary Large Objects (BLOB): A BLOB is a binary large object that can hold a
variable amount of data. This data type may be the most useful because it can store binary data,
making it a perfect source type for use by User-defined Distinct Types. Blob columns can be used to
store image, voice, graphical, and other types of business or application specific data.
An external location in the database stores all large object values outside
their records in the table. There is a large object descriptor for each large object in each row of
a table. The large object descriptor contains control information used to access the large object
data stored elsewhere on disk. Storage of large object data outside records allows large objects to
store up to 1 GB in size. Accessing the large object descriptor causes a small amount of overhead
when manipulating large objects.
The maximum size for each large object column is a part of the declaration of
large object type in the CREATE TABLE statement. The maximum size of a large object column
determines the maximum size of any large object descriptor in that column. As a result, it also
determines how many columns of all data types can fit in a single row.
We have included a comprehensive example on CLOB usage. For more information,
refer to sample .Java file. This file can be downloaded with
Daffodil DB.
The sample code snippets illustrate the usage of object data types in Daffodil
DB. These code snippets can be used directly with Daffodil DB sample databases.
Sample Code for making a table having a clob column