51 lines
3.1 KiB
HTML
51 lines
3.1 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="Decide between DB2 UDB CLI, dynamic SQL, and static SQL" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzadpbackground.htm" />
|
|
<meta name="copyright" content="(C) Copyright IBM Corporation 1999, 2006" />
|
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1999, 2006" />
|
|
<meta name="DC.Format" content="XHTML" />
|
|
<meta name="DC.Identifier" content="rzadpinterfacetouse" />
|
|
<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>Decide between DB2 UDB CLI, dynamic SQL, and static SQL</title>
|
|
</head>
|
|
<body id="rzadpinterfacetouse"><a name="rzadpinterfacetouse"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Decide between DB2 UDB CLI, dynamic SQL, and static SQL</h1>
|
|
<div><p>Which interfaces you choose depend on your application.</p>
|
|
<p>DB2<sup>®</sup> UDB
|
|
CLI is ideally suited for query-based applications requiring portability,
|
|
and not requiring the APIs or utilities offered by a particular Database Management
|
|
System (DBMS) (for example, catalog database, backup, restore). This does
|
|
not mean that using DB2 UDB CLI calls DBMS specific APIs from an application.
|
|
It means that the application is no longer as portable.</p>
|
|
<p>Another important consideration is the performance comparison between dynamic
|
|
and static SQL. Dynamic SQL is prepared at run time, while static
|
|
SQL is prepared at the precompile stage. Because preparing statements requires
|
|
additional processing time, static SQL might be more efficient. If you choose
|
|
static over dynamic SQL, then DB2 UDB CLI is not an option.</p>
|
|
<p>In most cases the choice between either interface is open to personal preference.
|
|
Your previous experience might make one alternative seem more intuitive than
|
|
the other.</p>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzadpbackground.htm" title="Learn about the basics of the DB2 UDB CLI, how it compares to embedded SQL, and how to select the best interface for your programming needs.">Get started with DB2 UDB CLI</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |