Chapter 7. Large Objects

With the advent of multimedia-rich applications and web sites, databases are now being called upon to store objects such as images, sounds, and video clips, as well as large blocks of text. Prior to Oracle8, you had to store large blocks of text using the LONG database type, and large blocks of binary data using either the LONG RAW type or the shorter RAW type. With the release of Oracle8, a new class of types known as large objects (LOBs) was introduced. LOBs may be used to store binary data, large blocks of text, and references to external files.

Although Oracle8 and Oracle8i still support LONG and LONG RAW types, you should use LOBs for your new applications, and I show how to do that in this chapter. As you will soon learn, LOBs have several advantages over the old LONG and LONG RAW types. However, I discuss LONG and LONG RAW types as well, for those of you who may encounter older databases.

Get Java Programming with Oracle SQLJ 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.