|Oracle9i Application Developer's Guide - Large Objects (LOBs)
Release 1 (9.0.1)
Part Number A88879-01
Introduction to LOBs, 2 of 12
As applications evolve to encompass increasingly richer semantics, they encounter the need to deal with the following kinds of data:
Traditionally, the Relational model has been very successful at dealing with simple structured data -- the kind which can be fit into simple tables. Oracle has added Object-Relational features so that applications can deal with complex structured data -- collections, references, user-defined types and so on. Our queuing technologies, such as Advanced Queueing, deal with Messages and other semi-structured data.
LOBs are designed to support the last kind of data -- unstructured data.
Unstructured data cannot be decomposed into standard components. Data about an Employee can be 'structured' into a Name (probably a character string), an identification (likely a number), a Salary and so on. But if you are given a Photo, you find that the data really consists of a long stream of 0s and 1s. These 0s and 1s are used to switch pixels on or off so that you will see the Photo on a display, but they can't be broken down into any finer structure in terms of database storage.
Also interesting is that unstructured data such as text, graphic images, still video clips, full motion video, and sound waveforms tend to be large -- a typical employee record may be a few hundred bytes, but even small amounts of multimedia data can be thousands of times larger.
Finally, some multimedia data may reside on operating system files, and it is desirable to access them from the database.
With the growth of the internet and content-rich applications, it has become imperative that the database support a datatype that fulfills the following:
Oracle supports the following two types of LOBs
CLOBs can store large amounts of character data and are useful for storing unstructured XML documents. Also useful for storing multimedia data, BFILEs which are external file references can also be used. In this case the XML is stored and managed outside the RDBMS, but can be used in queries on the server.
You can create Oracle Text (interMedia Text) indexes on CLOB columns and perform queries on XML.
While LOBs provide the infrastructure in the database to store multimedia data, Oracle8i and Oracle9i also provide developers with additional functionality for the most commonly used multimedia types. The multimedia types include text, image, locator, audio, and video data.
Oracle8i introduced the interMedia bundle, that supports text data, spatial location, images, audio, and video data. You can access interMedia objects using SQL queries, manipulate their contents (such as, trim an image), read and write their content, and convert data from one format to another.
interMedia in turn uses Oracle's infrastructure to define object types, methods, and LOBs necessary to represent these specialized types of data in the database. Oracle interMedia provide a predefined set of objects and operations that facilitate application development.
See also http://otn.oracle.com/products/text