forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: luhuayi <luhuayi@huawei.com> Co-committed-by: luhuayi <luhuayi@huawei.com>
48 lines
4.2 KiB
HTML
48 lines
4.2 KiB
HTML
<a name="EN-US_TOPIC_0000001811610389"></a><a name="EN-US_TOPIC_0000001811610389"></a>
|
|
|
|
<h1 class="topictitle1">JDBC Development Process</h1>
|
|
<div id="body8662426"><p id="EN-US_TOPIC_0000001811610389__p545167125412">Java Database Connectivity (JDBC) is a Java API for executing SQL statements. It provides a unified access interface for multiple relational databases, enabling applications to work with data based on it. <span id="EN-US_TOPIC_0000001811610389__text1882152292010">GaussDB(DWS)</span> supports JDBC 4.0 and requires JDK 1.6 or later for code compiling. It does not support JDBC-ODBC Bridge. The following figure shows the JDBC application development process.</p>
|
|
<div class="fignone" id="EN-US_TOPIC_0000001811610389__feb66a934167849b38e150168fc75ccc7"><span class="figcap"><b>Figure 1 </b>JDBC-based application development process</span><br><span><img id="EN-US_TOPIC_0000001811610389__i93b7b54d75924255aa7a107b98b71aec" src="figure/en-us_image_0000002044100078.png"></span></div>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001811610389__table1659815133269" frame="border" border="1" rules="all"><caption><b>Table 1 </b>JDBC development process</caption><thead align="left"><tr id="EN-US_TOPIC_0000001811610389__row559915132261"><th align="left" class="cellrowborder" valign="top" width="19.55%" id="mcps1.3.3.2.3.1.1"><p id="EN-US_TOPIC_0000001811610389__p95992013182616"><strong id="EN-US_TOPIC_0000001811610389__b13284144519206">Procedure</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="80.45%" id="mcps1.3.3.2.3.1.2"><p id="EN-US_TOPIC_0000001811610389__p2599131311261"><strong id="EN-US_TOPIC_0000001811610389__b1734994816204">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001811610389__row9599161311267"><td class="cellrowborder" valign="top" width="19.55%" headers="mcps1.3.3.2.3.1.1 "><p id="EN-US_TOPIC_0000001811610389__p759961312263">Load the driver.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="80.45%" headers="mcps1.3.3.2.3.1.2 "><p id="EN-US_TOPIC_0000001811610389__p25991138265">Download the JDBC driver and edit and load it in the program.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001811610389__row115991113122613"><td class="cellrowborder" valign="top" width="19.55%" headers="mcps1.3.3.2.3.1.1 "><p id="EN-US_TOPIC_0000001811610389__p1724122064118">Connect to a database.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="80.45%" headers="mcps1.3.3.2.3.1.2 "><p id="EN-US_TOPIC_0000001811610389__p185991813112620">Connect to the database through the JDBC driver.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001811610389__row659919137269"><td class="cellrowborder" valign="top" width="19.55%" headers="mcps1.3.3.2.3.1.1 "><p id="EN-US_TOPIC_0000001811610389__p859911320269">Execute SQL statements.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="80.45%" headers="mcps1.3.3.2.3.1.2 "><p id="EN-US_TOPIC_0000001811610389__p16599413112618">Applications operate database data by executing SQL statements.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001811610389__row759919134261"><td class="cellrowborder" valign="top" width="19.55%" headers="mcps1.3.3.2.3.1.1 "><p id="EN-US_TOPIC_0000001811610389__p1159911352612">Process the result set.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="80.45%" headers="mcps1.3.3.2.3.1.2 "><p id="EN-US_TOPIC_0000001811610389__p7599131352611">Different types of result sets have different application scenarios. Applications need to select the appropriate result set type as needed.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001811610389__row9599161311264"><td class="cellrowborder" valign="top" width="19.55%" headers="mcps1.3.3.2.3.1.1 "><p id="EN-US_TOPIC_0000001811610389__p559991312264">Close the connection.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="80.45%" headers="mcps1.3.3.2.3.1.2 "><p id="EN-US_TOPIC_0000001811610389__p20599913192614">Make sure to close the database connection after completing the required data operations.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_04_0088.html">JDBC-Based Development</a></div>
|
|
</div>
|
|
</div>
|
|
|