10.12.2012 Views

Oracle Spatial User's Guide and Reference - InfoLab

Oracle Spatial User's Guide and Reference - InfoLab

Oracle Spatial User's Guide and Reference - InfoLab

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3.1 Bulk Loading<br />

3<br />

Loading <strong>Spatial</strong> Data<br />

This chapter describes how to load spatial data into a database, including storing<br />

the data in a table with a column of type SDO_GEOMETRY. After you have loaded<br />

spatial data, you can create a spatial index for it <strong>and</strong> perform queries on it, as<br />

described in Chapter 4.<br />

The process of loading data can be classified into two categories:<br />

■ Bulk loading of data (see Section 3.1)<br />

This process is used to load large volumes of data into the database <strong>and</strong> uses<br />

the SQL*Loader utility to load the data.<br />

■ Transactional insert operations (see Section 3.2)<br />

This process is used to insert relatively small amounts of data into the database<br />

using the INSERT statement in SQL.<br />

Bulk loading can import large amounts of ASCII data into an <strong>Oracle</strong> database. Bulk<br />

loading is accomplished with the SQL*Loader utility. (For information about<br />

SQL*Loader, see <strong>Oracle</strong> Database Utilities.)<br />

3.1.1 Bulk Loading SDO_GEOMETRY Objects<br />

Example 3–1 is the SQL*Loader control file for loading four geometries. When this<br />

control file is used with SQL*Loader, it loads the same cola market geometries that<br />

are inserted using SQL statements in Example 2–1 in Section 2.1.<br />

Example 3–1 Control File for a Bulk Load of Cola Market Geometries<br />

LOAD DATA<br />

Loading <strong>Spatial</strong> Data 3-1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!