92 lines
8.4 KiB
HTML
92 lines
8.4 KiB
HTML
|
<?xml version="1.0" encoding="UTF-8"?>
|
||
|
<!DOCTYPE html
|
||
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
<html lang="en-us" xml:lang="en-us">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
|
<meta name="security" content="public" />
|
||
|
<meta name="Robots" content="index,follow" />
|
||
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
||
|
<meta name="DC.Type" content="reference" />
|
||
|
<meta name="DC.Title" content="Use large objects (LOBs)" />
|
||
|
<meta name="abstract" content="The VARCHAR, VARGRAPHIC, and VARBINARY data types have a limit of 32 KB (where KB equals 1024 bytes) of storage. While this may be sufficient for small to medium-size text data, applications often need to store large text documents. They might also need to store a wide variety of additional data types such as audio, video, drawings, mixed text and graphics, and images. There are three data types to store these data objects as strings of up to 2 GB (where GB equals 1 073 741 824 bytes)." />
|
||
|
<meta name="description" content="The VARCHAR, VARGRAPHIC, and VARBINARY data types have a limit of 32 KB (where KB equals 1024 bytes) of storage. While this may be sufficient for small to medium-size text data, applications often need to store large text documents. They might also need to store a wide variety of additional data types such as audio, video, drawings, mixed text and graphics, and images. There are three data types to store these data objects as strings of up to 2 GB (where GB equals 1 073 741 824 bytes)." />
|
||
|
<meta name="DC.subject" content="BLOBs (Binary Large OBjects), uses and definition, CLOBs (Character Large OBjects), uses and definition, DBCLOBs (Double-Byte Character Large OBjects), uses and definition, Binary Large OBjects, Character Large OBjects, Double-Byte Character Large OBjects, LOBs (Large Objects), large object value, file reference variables, locators, large object descriptor, data types, BLOBs, CLOBs, DBCLOBs" />
|
||
|
<meta name="keywords" content="BLOBs (Binary Large OBjects), uses and definition, CLOBs (Character Large OBjects), uses and definition, DBCLOBs (Double-Byte Character Large OBjects), uses and definition, Binary Large OBjects, Character Large OBjects, Double-Byte Character Large OBjects, LOBs (Large Objects), large object value, file reference variables, locators, large object descriptor, data types, BLOBs, CLOBs, DBCLOBs" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafyusoocap.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafyobjlob.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafyloblocators.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafyexampclob.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafydeflobe.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafylobrefvar.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafyexampextract.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafyexampinsertclob.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafydisplaylobcol.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafylobjournal.htm" />
|
||
|
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
|
||
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
|
||
|
<meta name="DC.Format" content="XHTML" />
|
||
|
<meta name="DC.Identifier" content="rbafylobs" />
|
||
|
<meta name="DC.Language" content="en-us" />
|
||
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
||
|
<!-- US Government Users Restricted Rights -->
|
||
|
<!-- Use, duplication or disclosure restricted by -->
|
||
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
||
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
||
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
||
|
<title>Use large objects (LOBs)</title>
|
||
|
</head>
|
||
|
<body id="rbafylobs"><a name="rbafylobs"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">Use large objects (LOBs)</h1>
|
||
|
<div><p>The VARCHAR, VARGRAPHIC, and VARBINARY data types have a limit
|
||
|
of 32 KB (where KB equals 1024 bytes) of storage. While this may be sufficient
|
||
|
for small to medium-size text data, applications often need to store large
|
||
|
text documents. They might also need to store a wide variety of additional
|
||
|
data types such as audio, video, drawings, mixed text and graphics, and images.
|
||
|
There are three data types to store these data objects as strings of up to
|
||
|
2 GB (where GB equals 1 073 741 824 bytes).</p>
|
||
|
<div class="section"><p>The three data types are: binary large objects (BLOBs), single-byte
|
||
|
character large objects (CLOBs), and double-byte character Large objects
|
||
|
(DBCLOBs). Each table may have a large amount of associated LOB data. Although
|
||
|
a single row containing one or more LOB values cannot exceed 3.5 GB, a table
|
||
|
may contain nearly 256 GB of LOB data.</p>
|
||
|
</div>
|
||
|
<div class="section"><p>You can refer to and manipulate LOBs using host variables just
|
||
|
like any other data type. However, host variables use the program's storage
|
||
|
which may not be large enough to hold LOB values. Other means are necessary
|
||
|
to manipulate these large values. <em>Locators</em> are useful to identify
|
||
|
and manipulate a large object value at the database server and for extracting
|
||
|
pieces of the LOB value. <em>File reference variables</em> are useful for physically
|
||
|
moving a large object value (or a large part of it) to and from the client. </p>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div>
|
||
|
<ul class="ullinks">
|
||
|
<li class="ulchildlink"><strong><a href="rbafyobjlob.htm">Understand large object data types (BLOB, CLOB, DBCLOB)</a></strong><br />
|
||
|
The large object data types are defined here.</li>
|
||
|
<li class="ulchildlink"><strong><a href="rbafyloblocators.htm">Understand large object locators</a></strong><br />
|
||
|
Large object (LOB) locators use a small, easily managed value to refer to a much larger value.</li>
|
||
|
<li class="ulchildlink"><strong><a href="rbafyexampclob.htm">Example: Use a locator to work with a CLOB value</a></strong><br />
|
||
|
In this example, the application program retrieves a locator for a LOB value; then it uses the locator to extract the data from the LOB value.</li>
|
||
|
<li class="ulchildlink"><strong><a href="rbafydeflobe.htm">Indicator variables and LOB locators</a></strong><br />
|
||
|
For normal host variables in an application program, when selecting a NULL value into a host variable, a negative value is assigned to the indicator variable signifying that the value is NULL. In the case of LOB locators, however, the meaning of indicator variables is slightly different.</li>
|
||
|
<li class="ulchildlink"><strong><a href="rbafylobrefvar.htm">LOB file reference variables</a></strong><br />
|
||
|
File reference variables are similar to host variables except that they are used to transfer data to and from IFS files (not to and from memory buffers).</li>
|
||
|
<li class="ulchildlink"><strong><a href="rbafyexampextract.htm">Example: Extract a document to a file</a></strong><br />
|
||
|
This program example shows how character large object (CLOB) elements can be retrieved from a table into an external file.</li>
|
||
|
<li class="ulchildlink"><strong><a href="rbafyexampinsertclob.htm">Example: Insert data into a CLOB column</a></strong><br />
|
||
|
This example shows how to insert data from a regular file referenced
|
||
|
by <samp class="codeph">:hv_text_file</samp> into a CLOB column.</li>
|
||
|
<li class="ulchildlink"><strong><a href="rbafydisplaylobcol.htm">Display layout of LOB columns</a></strong><br />
|
||
|
When a row of data from a table holding LOB columns is displayed using CL commands such as Display Physical File Member (DSPPFM), the LOB data stored in that row will not be displayed. Instead, the database shows a special value for the LOB columns.</li>
|
||
|
<li class="ulchildlink"><strong><a href="rbafylobjournal.htm">Journal entry layout of LOB columns</a></strong><br />
|
||
|
These commands return a buffer that gives the user addressability to LOB data that had been journaled.</li>
|
||
|
</ul>
|
||
|
|
||
|
<div class="familylinks">
|
||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbafyusoocap.htm" title="Most data types, such as INTEGER and CHARACTER, do not have any special processing characteristics. However, there are a few data types that require special functions or locators in order to use them.">Process special data types</a></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|