152 lines
11 KiB
HTML
152 lines
11 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="concept" />
|
||
|
<meta name="DC.Title" content="SQL concepts" />
|
||
|
<meta name="abstract" content="DB2 UDB for iSeries SQL consists of these main parts." />
|
||
|
<meta name="description" content="DB2 UDB for iSeries SQL consists of these main parts." />
|
||
|
<meta name="DC.subject" content="Distributed Relational Database Architecture (DRDA), runtime support, concepts, precompiler, interactive interface, interactive SQL, Run SQL Statements (RUNSQLSTM) command, RUNSQLSTM (Run SQL Statements), command, command (CL), Run SQL Statements (RUNSQLSTM), RUNSQLSTM (Run SQL statements), SQL, call level interface, call level interface, X/Open call level interface, CLI, QSQPRCED, API, extended dynamic, QSQCHKS, syntax check, UDB Symmetric Multiprocessing, DB2, Symmetric Multiprocessing, DB2 Query Manager for iSeries, Run SQL Scripts, Multisystem, Loosely Coupled Parallelism" />
|
||
|
<meta name="keywords" content="Distributed Relational Database Architecture (DRDA), runtime support, concepts, precompiler, interactive interface, interactive SQL, Run SQL Statements (RUNSQLSTM) command, RUNSQLSTM (Run SQL Statements), command, command (CL), Run SQL Statements (RUNSQLSTM), RUNSQLSTM (Run SQL statements), SQL, call level interface, call level interface, X/Open call level interface, CLI, QSQPRCED, API, extended dynamic, QSQCHKS, syntax check, UDB Symmetric Multiprocessing, DB2, Symmetric Multiprocessing, DB2 Query Manager for iSeries, Run SQL Scripts, Multisystem, Loosely Coupled Parallelism" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafyintro.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafyxdbterms.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafyterms.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafystmtype.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafysqlpcca.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafysqldiag.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="rbafysqlconcepts" />
|
||
|
<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>SQL concepts</title>
|
||
|
</head>
|
||
|
<body id="rbafysqlconcepts"><a name="rbafysqlconcepts"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">SQL concepts</h1>
|
||
|
<div><p><span class="keyword">DB2<sup>®</sup> UDB for iSeries™</span> SQL consists
|
||
|
of these main parts.</p>
|
||
|
<ul><li>SQL runtime support <p>SQL run-time parses SQL statements
|
||
|
and runs any SQL statements. This support is that part of <span class="keyword">i5/OS™</span> licensed
|
||
|
program, which allows applications that contain SQL statements to be run on
|
||
|
systems where the <span class="keyword">DB2 UDB Query Manager and SQL Development Kit</span> licensed
|
||
|
program is not installed.</p>
|
||
|
</li>
|
||
|
<li>SQL precompilers <div class="p">SQL precompilers support precompiling embedded SQL
|
||
|
statements in host languages. The following languages are supported: <ul><li>ILE C</li>
|
||
|
<li>ILE C++ for <span class="keyword">iSeries</span></li>
|
||
|
<li>ILE COBOL</li>
|
||
|
<li><span class="keyword">COBOL</span> for <span class="keyword">iSeries</span></li>
|
||
|
<li><span class="keyword">iSeries</span> PL/I</li>
|
||
|
<li><span class="keyword">RPG</span> III (part of <span class="keyword">RPG</span> for <span class="keyword">iSeries</span>)</li>
|
||
|
<li>ILE RPG</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
The SQL host language precompilers prepare an application program
|
||
|
containing SQL statements. The host language compilers then compile the precompiled
|
||
|
host source programs. For more information about precompiling, see the topic <a href="../rzajp/rzajppreprog.htm">Prepare and run
|
||
|
a program with SQL statements</a> in the Embedded SQL Programming information.
|
||
|
The precompiler support is part of the <span class="keyword">DB2 UDB Query Manager and SQL Development Kit</span> licensed
|
||
|
program.</li>
|
||
|
<li>SQL interactive interface <p>SQL interactive interface allows you to
|
||
|
create and run SQL statements. For more information about interactive SQL,
|
||
|
see <a href="rbafyintract.htm#rbafyintract">Use interactive SQL</a>. Interactive SQL is
|
||
|
part of the <span class="keyword">DB2 UDB Query Manager and SQL Development Kit</span> licensed
|
||
|
program.</p>
|
||
|
</li>
|
||
|
<li>Run SQL Scripts <p>The Run SQL Scripts window in <span class="keyword">iSeries Navigator</span> allows
|
||
|
you to create, edit, run, and troubleshoot scripts of SQL statements. Run
|
||
|
SQL Scripts is a part of iSeries Navigator.</p>
|
||
|
</li>
|
||
|
<li>Run SQL Statements CL command <p>RUNSQLSTM allows you to run a series
|
||
|
of SQL statements, which are stored in a source file. See <a href="rbafyrunstat.htm#rbafyrunstat">Use the SQL statement processor</a> for
|
||
|
more information about the Run SQL Statements command.</p>
|
||
|
</li>
|
||
|
<li>DB2 Query
|
||
|
Manager for iSeries <p>DB2 Query
|
||
|
Manager for iSeries provides
|
||
|
a prompt-driven interactive interface that allows you to create data, add
|
||
|
data, maintain data, and run reports on the databases. Query Manager is part
|
||
|
of the <span class="keyword">DB2 UDB Query Manager and SQL Development Kit</span> licensed program.
|
||
|
For more information, refer to the <a href="../books/sc415212.pdf" target="_blank">Query Manager Use</a> book.</p>
|
||
|
</li>
|
||
|
<li>SQL REXX Interface <p>The SQL REXX interface allows you to run SQL statements
|
||
|
in a REXX procedure. For more information about using SQL statements in REXX
|
||
|
procedures, see the topic <a href="../rzajp/rzajprexx.htm">Code SQL statements in REXX applications</a> in the Embedded
|
||
|
SQL Programming information.</p>
|
||
|
</li>
|
||
|
<li>SQL Call Level Interface <p><span class="keyword">DB2 UDB for iSeries</span> supports
|
||
|
the SQL Call Level Interface. This allows users of any of the ILE languages
|
||
|
to access SQL functions directly through bound calls to a service program
|
||
|
provided by the system. Using the SQL Call Level Interface, one can perform
|
||
|
all the SQL functions without the need for a precompile. This is a standard
|
||
|
set of procedure calls to prepare SQL statements, run SQL statements, fetch
|
||
|
rows of data, and even do advanced functions such as accessing the catalogs
|
||
|
and binding program variables to output columns.</p>
|
||
|
<p>For a complete description
|
||
|
of all the available functions and their syntax, see the <a href="../cli/rzadpkickoff.htm">SQL call level interface (ODBC)</a> topic
|
||
|
collection in the Database section of the <span class="keyword">iSeries Information Center</span>.</p>
|
||
|
</li>
|
||
|
<li>QSQPRCED API <p>This application program interface (API) provides an
|
||
|
extended dynamic SQL capability. SQL statements can be prepared into an SQL
|
||
|
package and then run using this API. Statements prepared into a package by
|
||
|
this API persist until the package or statement is explicitly dropped. For
|
||
|
more information about the QSQPRCED API, see the <a href="../apis/qsqprced.htm">QSQPRCED</a> topic. For general information about APIs, see
|
||
|
the <a href="../apiref/api.htm">i5/OS API</a> topic.</p>
|
||
|
</li>
|
||
|
<li>QSQCHKS API <p>This API syntax checks SQL statements. For more information
|
||
|
about the QSQCHKS API, see the <a href="../apis/qsqchks.htm">QSQCHKS</a> topic. For general information about APIs, see
|
||
|
the <a href="../apiref/api.htm">i5/OS API</a> topic. </p>
|
||
|
</li>
|
||
|
<li><span class="keyword">DB2 Multisystem</span> <p>This feature
|
||
|
of the operating system allows your data to be distributed across multiple
|
||
|
servers. For more information about <span class="keyword">DB2 Multisystem</span>,
|
||
|
see the <a href="../dbmult/rzaf3kickoff.htm">DB2 Multisystem</a> topic.</p>
|
||
|
</li>
|
||
|
<li><span class="keyword">DB2 UDB Symmetric Multiprocessing</span> <p>This feature
|
||
|
of the operating system provides the query optimizer with additional methods
|
||
|
for retrieving data that include parallel processing. Symmetric multiprocessing
|
||
|
(SMP) is a form of parallelism achieved on a single system where multiple
|
||
|
processors (CPU and I/O processors) that share memory and disk resource work
|
||
|
simultaneously toward achieving a single end result. This parallel processing
|
||
|
means that the database manager can have more than one (or all) of the system
|
||
|
processors working on a single query simultaneously. See the topic <a href="../rzajq/smp0001.htm">Control parallel processing
|
||
|
for queries</a> in the Database Performance and Query Optimization topic
|
||
|
for details on how to control parallel processing.</p>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div>
|
||
|
<ul class="ullinks">
|
||
|
<li class="ulchildlink"><strong><a href="rbafyxdbterms.htm">SQL relational database and system terminology</a></strong><br />
|
||
|
In the relational model of data, all data is perceived as existing
|
||
|
in tables. <span class="keyword">DB2 UDB for iSeries</span> objects
|
||
|
are created and maintained as system objects.</li>
|
||
|
<li class="ulchildlink"><strong><a href="rbafyterms.htm">SQL and system naming conventions</a></strong><br />
|
||
|
There are two naming conventions that can be used in <span class="keyword">DB2 UDB for iSeries</span> programming:
|
||
|
system (*SYS) and SQL (*SQL). </li>
|
||
|
<li class="ulchildlink"><strong><a href="rbafystmtype.htm">Types of SQL statements</a></strong><br />
|
||
|
There are several basic types of SQL statements. They are listed here according to their function.</li>
|
||
|
<li class="ulchildlink"><strong><a href="rbafysqlpcca.htm">SQL communication area (SQLCA)</a></strong><br />
|
||
|
An SQLCA is a set of variables that is updated at the end of the execution of every SQL statement.</li>
|
||
|
<li class="ulchildlink"><strong><a href="rbafysqldiag.htm">SQL diagnostics area</a></strong><br />
|
||
|
The SQL diagnostics area is a set of information maintained by the database manager about the SQL statement that was most recently run. It can be accessed from your program by using the GET DIAGNOSTICS SQL statement.</li>
|
||
|
</ul>
|
||
|
|
||
|
<div class="familylinks">
|
||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbafyintro.htm" title="These topics describe the iSeries server implementation of the Structured Query Language (SQL) using DB2 UDB for iSeries and the DB2 UDB Query Manager and SQL Development Kit licensed program.">Introduction to DB2 UDB for iSeries Structured Query Language</a></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|