10.12.2012 Views

Oracle C++ Call Interface Programmer's Guide

Oracle C++ Call Interface Programmer's Guide

Oracle C++ Call Interface Programmer's Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Overview of OCCI<br />

Functionality of OCCI<br />

OCCI provides the following functionality:<br />

■ APIs to design a scalable, shared server application that can support large<br />

numbers of users securely<br />

■ SQL access functions, for managing database access, processing SQL<br />

statements, and manipulating objects retrieved from an <strong>Oracle</strong> database server<br />

■ Datatype mapping and manipulation functions, for manipulating data<br />

attributes of <strong>Oracle</strong> types<br />

Procedural and Nonprocedural Elements<br />

<strong>Oracle</strong> <strong>C++</strong> <strong>Call</strong> <strong>Interface</strong> (OCCI) enables you to develop scalable, shared server<br />

applications on multitiered architecture that combine the nonprocedural data access<br />

power of structured query language (SQL) with the procedural capabilities of <strong>C++</strong>.<br />

In a nonprocedural language program, the set of data to be operated on is specified,<br />

but what operations will be performed, or how the operations are to be carried out,<br />

is not specified. The nonprocedural nature of SQL makes it an easy language to<br />

learn and use to perform database transactions. It is also the standard language<br />

used to access and manipulate data in modern relational and object-relational<br />

database systems.<br />

In a procedural language program, the execution of most statements depends on<br />

previous or subsequent statements and on control structures, such as loops or<br />

conditional branches, which are not available in SQL. The procedural nature of<br />

these languages makes them more complex than SQL, but it also makes them very<br />

flexible and powerful.<br />

The combination of both nonprocedural and procedural language elements in an<br />

OCCI program provides easy access to an <strong>Oracle</strong> database in a structured<br />

programming environment.<br />

OCCI supports all SQL data definition, data manipulation, query, and transaction<br />

control facilities that are available through an <strong>Oracle</strong> database server. For example,<br />

an OCCI program can run a query against an <strong>Oracle</strong> database. The queries can<br />

require the program to supply data to the database by using input (bind) variables,<br />

as follows:<br />

SELECT name FROM employees WHERE empno = :empnumber<br />

In this SQL statement, :empnumber is a placeholder for a value that will be<br />

supplied by the application.<br />

1-4 <strong>Oracle</strong> <strong>C++</strong> <strong>Call</strong> <strong>Interface</strong> Programmer’s <strong>Guide</strong>

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

Saved successfully!

Ooh no, something went wrong!