db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r422098 - in /db/derby/site/trunk: build/site/binaries/ build/site/images/ build/site/integrate/ src/documentation/content/xdocs/binaries/ src/documentation/content/xdocs/images/ src/documentation/content/xdocs/integrate/
Date Fri, 14 Jul 2006 23:47:51 GMT
Author: jta
Date: Fri Jul 14 16:47:49 2006
New Revision: 422098

URL: http://svn.apache.org/viewvc?rev=422098&view=rev
Log:
DERBY-1512 Added Susan Cline's paper "Using SQuirreL SQL Client with Derby" to
the web site.

Added:
    db/derby/site/trunk/build/site/binaries/squirrel_derby.zip   (with props)
    db/derby/site/trunk/build/site/images/sq_alias_1.gif   (with props)
    db/derby/site/trunk/build/site/images/sq_alias_client.gif   (with props)
    db/derby/site/trunk/build/site/images/sq_create_tables.gif   (with props)
    db/derby/site/trunk/build/site/images/sq_derby_client_session.gif   (with props)
    db/derby/site/trunk/build/site/images/sq_first_screen.gif   (with props)
    db/derby/site/trunk/build/site/images/sq_make_editable.gif   (with props)
    db/derby/site/trunk/build/site/images/sq_object_options.gif   (with props)
    db/derby/site/trunk/build/site/integrate/SQuirreL_Derby.html   (with props)
    db/derby/site/trunk/src/documentation/content/xdocs/binaries/squirrel_derby.zip   (with props)
    db/derby/site/trunk/src/documentation/content/xdocs/images/sq_alias_1.gif   (with props)
    db/derby/site/trunk/src/documentation/content/xdocs/images/sq_alias_client.gif   (with props)
    db/derby/site/trunk/src/documentation/content/xdocs/images/sq_create_tables.gif   (with props)
    db/derby/site/trunk/src/documentation/content/xdocs/images/sq_derby_client_session.gif   (with props)
    db/derby/site/trunk/src/documentation/content/xdocs/images/sq_first_screen.gif   (with props)
    db/derby/site/trunk/src/documentation/content/xdocs/images/sq_make_editable.gif   (with props)
    db/derby/site/trunk/src/documentation/content/xdocs/images/sq_object_options.gif   (with props)
    db/derby/site/trunk/src/documentation/content/xdocs/integrate/SQuirreL_Derby.xml   (with props)
Modified:
    db/derby/site/trunk/build/site/integrate/index.html
    db/derby/site/trunk/src/documentation/content/xdocs/integrate/index.xml

Added: db/derby/site/trunk/build/site/binaries/squirrel_derby.zip
URL: http://svn.apache.org/viewvc/db/derby/site/trunk/build/site/binaries/squirrel_derby.zip?rev=422098&view=auto
==============================================================================
Binary file - no diff available.

Propchange: db/derby/site/trunk/build/site/binaries/squirrel_derby.zip
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: db/derby/site/trunk/build/site/images/sq_alias_1.gif
URL: http://svn.apache.org/viewvc/db/derby/site/trunk/build/site/images/sq_alias_1.gif?rev=422098&view=auto
==============================================================================
Binary file - no diff available.

Propchange: db/derby/site/trunk/build/site/images/sq_alias_1.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: db/derby/site/trunk/build/site/images/sq_alias_client.gif
URL: http://svn.apache.org/viewvc/db/derby/site/trunk/build/site/images/sq_alias_client.gif?rev=422098&view=auto
==============================================================================
Binary file - no diff available.

Propchange: db/derby/site/trunk/build/site/images/sq_alias_client.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: db/derby/site/trunk/build/site/images/sq_create_tables.gif
URL: http://svn.apache.org/viewvc/db/derby/site/trunk/build/site/images/sq_create_tables.gif?rev=422098&view=auto
==============================================================================
Binary file - no diff available.

Propchange: db/derby/site/trunk/build/site/images/sq_create_tables.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: db/derby/site/trunk/build/site/images/sq_derby_client_session.gif
URL: http://svn.apache.org/viewvc/db/derby/site/trunk/build/site/images/sq_derby_client_session.gif?rev=422098&view=auto
==============================================================================
Binary file - no diff available.

Propchange: db/derby/site/trunk/build/site/images/sq_derby_client_session.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: db/derby/site/trunk/build/site/images/sq_first_screen.gif
URL: http://svn.apache.org/viewvc/db/derby/site/trunk/build/site/images/sq_first_screen.gif?rev=422098&view=auto
==============================================================================
Binary file - no diff available.

Propchange: db/derby/site/trunk/build/site/images/sq_first_screen.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: db/derby/site/trunk/build/site/images/sq_make_editable.gif
URL: http://svn.apache.org/viewvc/db/derby/site/trunk/build/site/images/sq_make_editable.gif?rev=422098&view=auto
==============================================================================
Binary file - no diff available.

Propchange: db/derby/site/trunk/build/site/images/sq_make_editable.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: db/derby/site/trunk/build/site/images/sq_object_options.gif
URL: http://svn.apache.org/viewvc/db/derby/site/trunk/build/site/images/sq_object_options.gif?rev=422098&view=auto
==============================================================================
Binary file - no diff available.

Propchange: db/derby/site/trunk/build/site/images/sq_object_options.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: db/derby/site/trunk/build/site/integrate/SQuirreL_Derby.html
URL: http://svn.apache.org/viewvc/db/derby/site/trunk/build/site/integrate/SQuirreL_Derby.html?rev=422098&view=auto
==============================================================================
--- db/derby/site/trunk/build/site/integrate/SQuirreL_Derby.html (added)
+++ db/derby/site/trunk/build/site/integrate/SQuirreL_Derby.html Fri Jul 14 16:47:49 2006
@@ -0,0 +1,1059 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="Apache Forrest" name="Generator">
+<meta name="Forrest-version" content="0.7">
+<meta name="Forrest-skin-name" content="pelt">
+<title>Using SQuirreL SQL Client with Derby</title>
+<link type="text/css" href="../skin/basic.css" rel="stylesheet">
+<link media="screen" type="text/css" href="../skin/screen.css" rel="stylesheet">
+<link media="print" type="text/css" href="../skin/print.css" rel="stylesheet">
+<link type="text/css" href="../skin/profile.css" rel="stylesheet">
+<script src="../skin/getBlank.js" language="javascript" type="text/javascript"></script><script src="../skin/getMenu.js" language="javascript" type="text/javascript"></script><script src="../skin/fontsize.js" language="javascript" type="text/javascript"></script>
+<link rel="shortcut icon" href="../">
+</head>
+<body onload="init()">
+<script type="text/javascript">ndeSetTextSize();</script>
+<div id="top">
+<div class="breadtrail">
+<a href="http://www.apache.org/">apache</a> &gt; <a href="http://db.apache.org/">db</a><script src="../skin/breadcrumbs.js" language="JavaScript" type="text/javascript"></script>
+</div>
+<div class="header">
+<div class="grouplogo">
+<a href="http://db.apache.org/derby"><img class="logoImage" alt="Apache Derby" src="../images/derby-logo-web.png" title="Derby is a zero-admin Java RDBMS"></a>
+</div>
+<div class="projectlogoA1">
+<a href="http://db.apache.org"><img class="logoImage" alt="Apache DB Project" src="../images/db-logo-white.png" title="Apache DB creates and maintains database solutions."></a>
+</div>
+<ul id="tabs">
+<li>
+<a class="base-not-selected" href="../index.html">Home</a>
+</li>
+<li>
+<a class="base-not-selected" href="../quick_start.html">Quick Start</a>
+</li>
+<li>
+<a class="base-not-selected" href="../derby_downloads.html">Download</a>
+</li>
+<li>
+<a class="base-not-selected" href="../derby_comm.html">Community</a>
+</li>
+<li>
+<a class="base-not-selected" href="../manuals/index.html">Documentation</a>
+</li>
+<li>
+<a class="base-not-selected" href="../integrate/index.html">Resources</a>
+</li>
+</ul>
+</div>
+</div>
+<div id="main">
+<div id="publishedStrip">
+<div id="level2tabs"></div>
+<script type="text/javascript"><!--
+document.write("<text>Last Published:</text> " + document.lastModified);
+//  --></script>
+</div>
+<div class="breadtrail">
+             
+             &nbsp;
+           </div>
+<div id="menu">
+<div onclick="SwitchMenu('menu_1.1', '../skin/')" id="menu_1.1Title" class="menutitle">Home</div>
+<div id="menu_1.1" class="menuitemgroup">
+<div class="menuitem">
+<a href="../index.html">Apache Derby</a>
+</div>
+<div class="menuitem">
+<a href="../derby_charter.html">Charter</a>
+</div>
+<div class="menuitem">
+<a href="../license.html">License</a>
+</div>
+<div class="menuitem">
+<a href="../faq.html">FAQs</a>
+</div>
+<div class="menuitem">
+<a href="http://wiki.apache.org/db-derby/">Derby Wiki</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.2', '../skin/')" id="menu_1.2Title" class="menutitle">Quick Start</div>
+<div id="menu_1.2" class="menuitemgroup">
+<div class="menuitem">
+<a href="../quick_start.html">Quick Start</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.3', '../skin/')" id="menu_1.3Title" class="menutitle">Download</div>
+<div id="menu_1.3" class="menuitemgroup">
+<div class="menuitem">
+<a href="../derby_downloads.html">Overview</a>
+</div>
+<div class="menuitem">
+<a href="../releases/release-10.1.2.1.cgi">10.1.2.1</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.4', '../skin/')" id="menu_1.4Title" class="menutitle">Community</div>
+<div id="menu_1.4" class="menuitemgroup">
+<div class="menuitem">
+<a href="../derby_comm.html">Get Involved!</a>
+</div>
+<div class="menuitem">
+<a href="../derby_mail.html">Mailing Lists</a>
+</div>
+<div class="menuitem">
+<a href="../DerbyBugGuidelines.html">BUGS</a>
+</div>
+<div class="menuitem">
+<a href="../derby_tests.html">Tests</a>
+</div>
+<div class="menuitem">
+<a href="../logo.html">Logo</a>
+</div>
+<div class="menuitem">
+<a href="../papers/derby_web.html">Updating the web site</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.5', '../skin/')" id="menu_1.5Title" class="menutitle">Documentation</div>
+<div id="menu_1.5" class="menuitemgroup">
+<div class="menuitem">
+<a href="../manuals/index.html">Overview</a>
+</div>
+<div class="menuitem">
+<a href="../manuals/dita.html">DITA Source</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.6', '../skin/')" id="menu_1.6Title" class="menutitle">Other Products</div>
+<div id="menu_1.6" class="menuitemgroup">
+<div class="menuitem">
+<a href="../integrate/index.html">Overview</a>
+</div>
+<div class="menuitem">
+<a href="../integrate/index.html#uses">What works with Derby?</a>
+</div>
+<div class="menuitem">
+<a href="../integrate/index.html#products">Product Writeups</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.7', '../skin/')" id="menu_1.7Title" class="menutitle">Eclipse Plug-ins</div>
+<div id="menu_1.7" class="menuitemgroup">
+<div class="menuitem">
+<a href="../integrate/derby_plugin.html">10.1 Core</a>
+</div>
+<div class="menuitem">
+<a href="../integrate/func_spec_plugins.html">1.0 UI Functional Spec</a>
+</div>
+<div class="menuitem">
+<a href="../integrate/plugin_howto.html">10.1 Core and 1.1 UI</a>
+</div>
+<div class="menuitem">
+<a href="../integrate/Readme.html">Building 1.1 UI</a>
+</div>
+<div class="menuitem">
+<a href="../integrate/plugin_slides.html">Derby Plug-ins Slides and Lab</a>
+</div>
+<div onclick="SwitchMenu('menu_1.7.6', '../skin/')" id="menu_1.7.6Title" class="menutitle">10.1 Core and 1.1 UI Documentation</div>
+<div id="menu_1.7.6" class="menuitemgroup">
+<div class="menuitem">
+<a href="../integrate/plugin_help/start_toc.html">Getting Started</a>
+</div>
+<div class="menuitem">
+<a href="../integrate/plugin_help/java_project.html">Creating an Eclipse Project</a>
+</div>
+<div onclick="SwitchMenu('menu_1.7.6.3', '../skin/')" id="menu_1.7.6.3Title" class="menutitle">Derby Nature</div>
+<div id="menu_1.7.6.3" class="menuitemgroup">
+<div class="menuitem">
+<a href="../integrate/plugin_help/nature_toc.html">Adding or Removing</a>
+</div>
+<div class="menuitem">
+<a href="../integrate/plugin_help/nature.html">Adding the Derby Nature</a>
+</div>
+<div class="menuitem">
+<a href="../integrate/plugin_help/remove_nature.html">Removing the Derby Nature</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.7.6.4', '../skin/')" id="menu_1.7.6.4Title" class="menutitle">Network Server</div>
+<div id="menu_1.7.6.4" class="menuitemgroup">
+<div class="menuitem">
+<a href="../integrate/plugin_help/server_toc.html">Starting and Stopping</a>
+</div>
+<div class="menuitem">
+<a href="../integrate/plugin_help/start_server.html">Starting the Server</a>
+</div>
+<div class="menuitem">
+<a href="../integrate/plugin_help/stop_server.html">Stopping the Server</a>
+</div>
+</div>
+<div class="menuitem">
+<a href="../integrate/plugin_help/properties.html">Derby Properties</a>
+</div>
+<div onclick="SwitchMenu('menu_1.7.6.6', '../skin/')" id="menu_1.7.6.6Title" class="menutitle">ij</div>
+<div id="menu_1.7.6.6" class="menuitemgroup">
+<div class="menuitem">
+<a href="../integrate/plugin_help/ij_toc.html">Using ij</a>
+</div>
+<div class="menuitem">
+<a href="../integrate/plugin_help/ij.html">SQL commands</a>
+</div>
+<div class="menuitem">
+<a href="../integrate/plugin_help/ij2.html">SQL scripts</a>
+</div>
+</div>
+<div class="menuitem">
+<a href="../integrate/plugin_help/derby_app.html">Building a Java App</a>
+</div>
+<div class="menuitem">
+<a href="../integrate/plugin_help/sysinfo.html">Running sysinfo</a>
+</div>
+<div class="menuitem">
+<a href="../integrate/plugin_help/resources.html">Derby Manuals</a>
+</div>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.8', '../skin/')" id="menu_1.8Title" class="menutitle">Papers</div>
+<div id="menu_1.8" class="menuitemgroup">
+<div class="menuitem">
+<a href="../papers/index.html">Overview</a>
+</div>
+<div onclick="SwitchMenu('menu_1.8.2', '../skin/')" id="menu_1.8.2Title" class="menutitle">Derby Engine</div>
+<div id="menu_1.8.2" class="menuitemgroup">
+<div onclick="SwitchMenu('menu_1.8.2.1', '../skin/')" id="menu_1.8.2.1Title" class="menutitle">Javadoc</div>
+<div id="menu_1.8.2.1" class="menuitemgroup">
+<div class="menuitem">
+<a href="http://db.apache.org/derby/javadoc/engine">Engine</a>
+</div>
+<div class="menuitem">
+<a href="http://db.apache.org/derby/javadoc/language">Language</a>
+</div>
+<div class="menuitem">
+<a href="http://db.apache.org/derby/javadoc/tools">Tools</a>
+</div>
+<div class="menuitem">
+<a href="http://db.apache.org/derby/javadoc/publishedapi">API</a>
+</div>
+</div>
+<div class="menuitem">
+<a href="../papers/derby_arch.html">Architecture</a>
+</div>
+<div class="menuitem">
+<a href="../papers/btree_package.html">BTree</a>
+</div>
+<div class="menuitem">
+<a href="../papers/pageformats.html">Disk Page Format</a>
+</div>
+<div class="menuitem">
+<a href="../papers/derby_htw.html">How Things Work</a>
+</div>
+<div class="menuitem">
+<a href="../papers/Intersect-design.html">Intersect &amp; Except</a>
+</div>
+<div class="menuitem">
+<a href="../papers/JDBCImplementation.html">JDBC</a>
+</div>
+<div class="menuitem">
+<a href="../papers/logformats.html">Log Format</a>
+</div>
+<div class="menuitem">
+<a href="../papers/recovery.html">Logging &amp; Recovery</a>
+</div>
+<div class="menuitem">
+<a href="../papers/optimizer.html">Optimizer</a>
+</div>
+<div class="menuitem">
+<a href="http://svn.apache.org/repos/asf/db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/package.html">Type System</a>
+</div>
+<div class="menuitem">
+<a href="../papers/versionupgrade.html">Versioning</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.8.3', '../skin/')" id="menu_1.8.3Title" class="menutitle">Derby Network Client</div>
+<div id="menu_1.8.3" class="menuitemgroup">
+<div class="menuitem">
+<a href="../papers/DerbyClientSpec.html">Functional Spec</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.8.4', '../skin/')" id="menu_1.8.4Title" class="menutitle">Derby Tutorial</div>
+<div id="menu_1.8.4" class="menuitemgroup">
+<div class="menuitem">
+<a href="../papers/DerbyTut/index.html">Overview</a>
+</div>
+<div class="menuitem">
+<a href="../papers/DerbyTut/install_software.html">Step 1: Install Software</a>
+</div>
+<div class="menuitem">
+<a href="../papers/DerbyTut/ij_intro.html">Step 2: ij Basics</a>
+</div>
+<div class="menuitem">
+<a href="../papers/DerbyTut/embedded_intro.html">Step 3: Embedded Derby</a>
+</div>
+<div class="menuitem">
+<a href="../papers/DerbyTut/ns_intro.html">Step 4: Derby Network Server</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.8.5', '../skin/')" id="menu_1.8.5Title" class="menutitle">Presentations</div>
+<div id="menu_1.8.5" class="menuitemgroup">
+<div class="menuitem">
+<a href="../papers/ApacheCon.html">ApacheCon</a>
+</div>
+<div class="menuitem">
+<a href="../papers/MiscPresentations.html#OSCON+2005">OSCON 2005</a>
+</div>
+<div class="menuitem">
+<a href="../papers/MiscPresentations.html#Colorado+Software+Summit+2004">Colorado 2004</a>
+</div>
+</div>
+</div>
+<div class="searchbox">
+<hr>
+<form action="http://www.google.com/search" method="get">
+<input value="db.apache.org" name="sitesearch" type="hidden"><input onFocus="getBlank (this, 'Search the site with google');" size="18" name="q" id="query" type="text" value="Search the site with google">&nbsp; 
+                  <input attr="value" name="Search" value="Search" type="submit">
+</form>
+</div>
+<div id="credit"></div>
+<div id="roundbottom">
+<img style="display: none" class="corner" height="15" width="15" alt="" src="../skin/images/rc-b-l-15-1body-2menu-3menu.png"></div>
+<div id="credit2"></div>
+</div>
+<div id="content">
+<div class="trail">
+<text>Font size:</text> 
+	          &nbsp;<input value="Reset" class="resetfont" title="Reset text" onclick="ndeSetTextSize('reset'); return false;" type="button">      
+	          &nbsp;<input value="-a" class="smallerfont" title="Shrink text" onclick="ndeSetTextSize('decr'); return false;" type="button">
+	          &nbsp;<input value="+a" class="biggerfont" title="Enlarge text" onclick="ndeSetTextSize('incr'); return false;" type="button">
+</div>
+<h1>Using SQuirreL SQL Client with Derby</h1>
+<div id="minitoc-area">
+<ul class="minitoc">
+<li>
+<a href="#Overview">Overview</a>
+</li>
+<li>
+<a href="#Prerequisites">Prerequisites</a>
+</li>
+<li>
+<a href="#Configuring+SQuirreL+for+the+Derby+Embedded+JDBC+Driver">Configuring SQuirreL for the Derby Embedded JDBC Driver </a>
+</li>
+<li>
+<a href="#Creating+an+Alias+to+a+Derby+database+using+the+Embedded+Driver">Creating an Alias to a Derby database using the Embedded Driver</a>
+</li>
+<li>
+<a href="#Configuring+the+Derby+Client+Driver+in+the+Drivers+window">Configuring the Derby Client Driver in the Drivers window</a>
+</li>
+<li>
+<a href="#Creating+an+Alias+for+an+existing+Derby+database+using+the+Client+Driver">Creating an Alias for an existing Derby database using the Client Driver</a>
+</li>
+<li>
+<a href="#Creating+a+session+to+issue+SQL+and+browse+the+database">Creating a session to issue SQL and browse the database</a>
+</li>
+<li>
+<a href="#Modifying+data+objects+via+the+Objects+tab">Modifying data objects via the Objects tab</a>
+</li>
+<li>
+<a href="#SQuirreL+and+Derby+Resources">SQuirreL and Derby Resources</a>
+</li>
+</ul>
+</div> 
+
+
+<a name="N1000C"></a><a name="Overview"></a>
+<h2 class="boxed">Overview</h2>
+<div class="section">
+<p>
+SQuirreL SQL Client is a useful tool for browsing and manipulating SQL databases via JDBC. This paper discusses setting up SQuirreL to access Derby databases via the Derby Embedded Driver and Client Drivers with the 10.1 version of Derby.
+
+</p>
+<p>
+Some of the features of SQuirreL that are discussed in relation to 
+working with Derby databases are:
+</p>
+<ul>
+
+<li>
+Configuring the SQuirreL Drivers window to use the Derby JDBC drivers
+</li>
+
+<li>
+Creating aliases to new or existing Derby databases
+</li>
+
+<li>
+Executing, editing and running SQL scripts and commands
+</li>
+
+<li>
+Browsing the objects in a database using the session window
+</li>
+
+<li>
+Extracting and loading data to and from a Derby table via a local file 
+</li>
+
+<li>
+Generating DDL
+</li>
+
+<li>
+Dropping tables
+</li>
+
+</ul>
+</div>
+
+
+<a name="N10031"></a><a name="Prerequisites"></a>
+<h2 class="boxed">Prerequisites</h2>
+<div class="section">
+<p>
+Download and install the following software to use SQuirreL SQL Client with Derby:
+</p>
+<table class="ForrestTable" cellspacing="1" cellpadding="4">
+
+<tr>
+
+<th colspan="1" rowspan="1">Software</th>
+<th colspan="1" rowspan="1">Minimum Release Level Required</th>
+<th colspan="1" rowspan="1">Release Used in this Example</th>
+<th colspan="1" rowspan="1">Download Location</th>
+
+</tr>
+
+<tr>
+
+<td colspan="1" rowspan="1">Java JRE or JDK or SDK</td> 
+<td colspan="1" rowspan="1">1.4.x</td>
+<td colspan="1" rowspan="1">1.5.x</td>
+<td colspan="1" rowspan="1">Any J2SE-compliant JVM, Java's reference implementation is at <a class="external" href="http://java.sun.com/j2se">http://java.sun.com/j2se</a></td>
+
+</tr>
+
+<tr>
+
+<td colspan="1" rowspan="1">SQuirreL SQL Client</td>
+<td colspan="1" rowspan="1">Version 2.0</td> 
+<td colspan="1" rowspan="1">Version 2.2 Final</td>
+<td colspan="1" rowspan="1"><a class="external" href="http://squirrelsql.org/#installation">SQuirreL SQL Client, Version 2.2 Final</a></td>
+
+</tr>
+
+<tr>
+
+<td colspan="1" rowspan="1">Apache Derby</td>
+<td colspan="1" rowspan="1">Version 10.1.x</td> 
+<td colspan="1" rowspan="1">Version 10.1.3</td>
+<td colspan="1" rowspan="1"><a href="http://db.apache.org/derby/derby_downloads.html#Latest+Official+Release">Apache Derby, Version 10.1</a></td>
+
+</tr>
+
+</table>
+<p>
+Additionally, if you would like to follow some of the examples for
+creating tables and loading data, download the file, <a href="../binaries/squirrel_derby.zip">squirrel_derby.zip</a>.
+</p>
+<p>
+After downloading SQuirreL, follow the instructions on the installation page,
+<a class="external" href="http://squirrelsql.org/#installation">squirrel.org/#installation</a>, 
+on how to install SQuirreL using the executable jar file.  On my system,
+this command worked to launch the install wizard: 
+</p>
+<p class="code-block">
+java -jar squirrel-sql-2.2final-install.jar 
+</p>
+<p>
+The wizard lets you choose the location where you wish to install SQuirreL,
+as well as which plugins you would like to install. I selected the Standard
+plugins because this paper will make use of the SQL Scripts standard plugin.
+Note that some of the Optional Plugins are considered Beta quality. After the
+installation is complete go to the directory where you installed SQuirreL and
+launch (or double-click on Windows) the squirrel-sql.bat file, or the squirrel-sql.sh file on Linux.
+</p>
+</div>
+
+
+<a name="N100B5"></a><a name="Configuring+SQuirreL+for+the+Derby+Embedded+JDBC+Driver"></a>
+<h2 class="boxed">Configuring SQuirreL for the Derby Embedded JDBC Driver </h2>
+<div class="section">
+<p>
+When you first launch SQuirreL it will create a directory called <span class="codefrag">.squirrel-sql</span> in your <span class="codefrag">C:\Documents and Settings\&lt;username&gt;</span> 
+directory on Windows, or <span class="codefrag">$HOME</span> on Linux.  This is where configuration settings and history are stored.  The first screen that appears in the 
+desktop will show 
+two windows - the Drivers and the Aliases windows. The Drivers window will
+show the Apache Derby Client and the Apache Derby Embedded drivers in the
+list.  If the jar files for either of these drivers, <span class="codefrag">derbyclient.jar</span>
+ or <span class="codefrag">derby.jar</span>, are in your system CLASSPATH then they will have a blue check next to them.
+If not, a red 'X' will appear in front of them as shown below.
+</p>
+<p>
+
+<strong>Figure 1.  The SQuirreL SQL Client desktop prior to configuration</strong>
+
+</p>
+<p>
+
+<img alt="SQuirreL desktop" height="467" src="../images/sq_first_screen.gif" width="671">
+</p>
+<p>
+Although you need to install Derby prior to going further, I'll assume you
+don't have the jar files in your CLASSPATH and we'll set up SQuirreL correctly
+so you don't need to.  
+</p>
+<p>
+
+<strong>Configuring the Derby Embedded Driver in the Drivers window</strong>
+
+</p>
+<p>
+Select the <strong>Apache Derby Embedded</strong> option from the Drivers window and
+click the pencil icon, which allows you to Modify the Selected Driver.
+We need to point to the location of the <span class="codefrag">derby.jar</span> file on 
+the file system, which contains the Derby Embedded Driver.  Click the <strong>Extra Class Path</strong> tab, and then the <strong>Add</strong> button.  Browse to this directory and 
+select <span class="codefrag">derby.jar</span>.  
+On my machine I browsed to <span class="codefrag">C:\derby_home\derby_10.1.3\lib\derby.jar</span>.
+</p>
+<p>Now, click the <strong>List Drivers</strong> button and the <strong>Class Name</strong> pulldown list will 
+be automatically populated.  Select the Class Name of <strong>org.apache.derby.jdbc.EmbeddedDriver</strong> from the list and click <strong>OK</strong>.
+</p>
+<p>
+Don't modify the Example URL in the Drivers window since this is just a listing
+of available drivers, and does not represent a connection to a specific
+database.  That is what the Aliases window is for. 
+Now you should be returned to the main desktop of SQuirreL and if the driver was
+added successfully,  you will see this message in the status window, with green highlighting;
+</p>
+<p class="code-block">Driver class org.apache.derby.jdbc.EmbeddedDriver 
+successfully registered for driver definition: Apache Derby Embedded</p>
+<p>
+Also, there should be a blue check mark next to the Apache Derby Embedded
+listing in the Drivers window now.
+</p>
+</div>
+
+
+<a name="N10114"></a><a name="Creating+an+Alias+to+a+Derby+database+using+the+Embedded+Driver"></a>
+<h2 class="boxed">Creating an Alias to a Derby database using the Embedded Driver</h2>
+<div class="section">
+<p>
+Now go to the Aliases window and click the blue '+' mark.  Name the Alias
+something descriptive.  I'm going to create a database using SQuirreL called 
+<span class="codefrag">FirstDB</span> so I'll name the Alias <strong>Derby_Embedded_FirstDB</strong>.  For the driver, 
+pull down the list to select <strong>Apache Derby Embedded</strong>.
+For the URL, I want to create the <span class="codefrag">FirstDB</span> database so the URL 
+will look like this:
+<span class="codefrag">jdbc:derby:FirstDB;create=true</span>.
+</p>
+<p>
+A User Name and Password are not required to make a connection using the 
+Embedded Derby driver, so I will not enter any values for this.  Also, at
+this time I do not want to automatically logon or connect at startup, so I'll
+leave those boxes unchecked.
+</p>
+<p>
+<strong>Figure 2. Creating an alias for the Embedded Driver</strong>
+</p>
+<p>
+<img alt="Creating an alias" height="605" src="../images/sq_alias_1.gif" width="719"></p>
+<p>
+Test the connection by clicking the <strong>Test</strong> button.  The <strong>Connect to: Derby_Embedded_FirstDB</strong> window
+will appear and prompt again for a username and password, but they are not
+required.  Just click the <strong>Connect</strong> button to test.  If all goes well the
+<span class="codefrag">FirstDB</span> database will be created in the directory where you launched SQuirreL from, and a popup box will tell you the Connection was successful. 
+Say <strong>OK</strong> to dismiss this window, and from the next window click the <strong>OK</strong>
+button too.  Close the next window instead of connecting, so we can set up
+the Derby Client driver first, before browsing the database.  
+</p>
+</div>
+
+
+<a name="N10150"></a><a name="Configuring+the+Derby+Client+Driver+in+the+Drivers+window"></a>
+<h2 class="boxed">Configuring the Derby Client Driver in the Drivers window</h2>
+<div class="section">
+<p>
+The Derby Client driver is used with the Derby network server, so we'll
+discuss the network server prior to configuring the client driver.
+</p>
+<p>
+
+<strong>Starting the Network Server and creating a database using ij</strong>
+
+</p>
+<p>
+The Derby Network server should be used in environments where multiple JVMs
+are connecting to a single Derby database.  In the context of using
+SQuirreL to browse a Derby database this configuration is required if other 
+users will be connecting to the same database via other clients, for instance,
+<strong>ij</strong> or some other application. 
+</p>
+<p>
+Let's start the network server now, and create the database
+using <strong>ij</strong> prior to creating the Alias for this database.
+</p>
+<p>
+Start the Derby Network server on your localhost.  If you don't know how to
+start the network server refer to the <a href="http://db.apache.org/derby/papers/DerbyTut/ns_intro.html">Derby tutorial</a>, which also shows you how to
+set up your environment to do so.  
+</p>
+<p>
+This is the command I used to start the network server on my host with
+<span class="codefrag">derbynet.jar</span> in my CLASSPATH:
+</p>
+<p class="code-block">
+java org.apache.derby.drda.NetworkServerControl start
+</p>
+<p>
+In another command window, with <span class="codefrag">derbyclient.jar</span> and 
+<span class="codefrag">derbytools.jar</span> in my classpath, I issued this command to 
+launch <span class="codefrag">ij</span>, and then created a database called <span class="codefrag">ClientDB</span> under my <span class="codefrag">C:/derby_home/databases/</span> directory. Notice the difference
+in the URL when connecting to the network server versus when making an
+embedded Derby connection.
+</p>
+<p class="code-block">
+java org.apache.derby.tools.ij 
+ij version 10.1
+ij&gt; connect 'jdbc:derby://localhost:1527/C:/derby_home/databases/ClientDB;create=true';
+</p>
+<p>
+Leave the network server and <span class="codefrag">ij</span> windows active.  Next we'll configure SQuirreL 
+for use with the Client driver and then create an alias to the <span class="codefrag">ClientDB</span> database.
+</p>
+<p>
+
+<strong>The Derby Client Driver configuration in the Drivers window</strong>
+
+</p>
+<p>
+Select the <strong>Apache Derby Client</strong> driver from the <strong>Drivers</strong> window
+in SQuirreL, and then click the pencil icon again.  Click the <strong>Extra Class Path</strong>
+tab and then the <strong>Add</strong> button to browse to the <span class="codefrag">derbyclient.jar</span>
+file.  The client driver only contains one Class of driver, so the <strong>Class Name</strong>
+category should be populated with the correct value, <span class="codefrag">org.apache.derby.jdbc.ClientDriver</span>.  Click <strong>OK</strong> and the blue check mark will appear
+next to the <strong>Apache Derby Client</strong> value in the list now.
+</p>
+<p>In the next section we'll configure an Alias to use the Derby Client Driver
+to connect to our database, <span class="codefrag">ClientDB</span>. 
+</p>
+</div>
+
+
+<a name="N101C6"></a><a name="Creating+an+Alias+for+an+existing+Derby+database+using+the+Client+Driver"></a>
+<h2 class="boxed">Creating an Alias for an existing Derby database using the Client Driver</h2>
+<div class="section">
+<p>
+Select the blue cross from the <strong>Aliases</strong> window and name the Alias something descriptive - I've chosen <strong>Derby_Client_ClientDB</strong>. Make sure the
+Driver is <strong>Apache Derby Client</strong> and for the URL, we will point to our
+database <span class="codefrag">ClientDB</span> we created earlier.  For my environment the
+correct value for the URL is:
+</p>
+<p class="code-block">
+jdbc:derby://localhost:1527/C:/derby_home/databases/ClientDB;
+</p>
+<p>
+Here is what the values for my environment look like, just before clicking
+the <strong>Test</strong> button. A user name and password is required in the SQuirreL
+environment although it is not required for <span class="codefrag">ij</span>.  Any value for
+the user name and password will do, but realize that the user name sets the
+default schema for the connection. <strong>Note:</strong> If you would like
+to require a specific username and password to connect to Derby, refer to
+this <a href="http://db.apache.org/derby/docs/10.1/devguide/cdevcsecure36127.html">section</a> of the Derby Developer's Guide, on configuring user authentication.
+</p>
+<p>
+<strong>Figure 3. Creating an Alias to an existing database using the Client Driver</strong>
+</p>
+<p>
+<img alt="Creating an alias" height="673" src="../images/sq_alias_client.gif" width="719"></p>
+<p>
+Once the test connection is successful, at the main screen for the <strong>Derby_Client_ClientDB</strong> window, select the <strong>OK</strong> button to close the window.  
+</p>
+<p>
+Remember how we left our <span class="codefrag">ij</span> session active?  When
+we clicked the test button, and later on when we connect to and browse the
+<span class="codefrag">ClientDB</span> database, we are taking advantage of the Derby Network
+Servers' ability to allow multiple client applications, running in different
+JVMs to connect to the same database.  
+</p>
+</div>
+
+
+<a name="N1020D"></a><a name="Creating+a+session+to+issue+SQL+and+browse+the+database"></a>
+<h2 class="boxed">Creating a session to issue SQL and browse the database</h2>
+<div class="section">
+<p>
+Double click the <strong>Derby_Client_ClientDB</strong> entry in the <strong>Aliases</strong>
+window which brings up another window.  Click the <strong>Connect</strong> button to
+connect to the database and bring up the session window.
+The session window is shown below with the Alias name listed and the username
+I connected with, in this case, as user <strong>slc</strong>.
+</p>
+<p>
+<strong>Figure 4. Creating a session for the Derby_Client_ClientDB alias</strong>
+</p>
+<p>
+<img alt="Creating a session" height="673" src="../images/sq_derby_client_session.gif" width="719"></p>
+<p>
+
+<strong>Executing, editing and running SQL scripts using the SQL tab</strong>
+
+</p>
+<p>
+Before we explore the <strong>Objects</strong> tab, it will be more interesting
+if we create some tables and insert data into our database.  
+Unzip the zip file, <span class="codefrag">squirrel_derby.zip</span> to
+a convenient location and locate the file <span class="codefrag">tables_inserts.sql</span>.
+
+Select the <strong>SQL</strong> tab of the session window and then use the
+folder icon in the session window to <strong>Open a file</strong>.  This allows
+you to browse to the <span class="codefrag">tables_inserts.sql</span> file and pastes
+the output into the SQL editor area so we can run it. 
+The <span class="codefrag">CREATE TABLE</span> statements included in this
+file are shown below (the inserts are omitted.)
+</p>
+<p class="code-block">
+CREATE TABLE CITIES
+(
+CITY_ID          INTEGER NOT NULL CONSTRAINT cities_pk PRIMARY KEY,
+CITY_NAME        VARCHAR(24) NOT NULL,
+COUNTRY          VARCHAR(26) NOT NULL,
+AIRPORT          CHAR(3),
+LANGUAGE         VARCHAR(16),
+COUNTRY_ISO_CODE CHAR(2) 
+);
+
+CREATE TABLE FLIGHTS
+(
+FLIGHT_ID      CHAR(6) NOT NULL,
+SEGMENT_NUMBER INTEGER NOT NULL,
+ORIG_AIRPORT   CHAR(3),
+DEPART_TIME    TIME,
+DEST_AIRPORT   CHAR(3),
+ARRIVE_TIME    TIME,
+MEAL           CHAR(1) CONSTRAINT MEAL_CONSTRAINT 
+CHECK (meal IN ('B', 'L', 'D', 'S')),
+FLYING_TIME    DOUBLE PRECISION,
+MILES          INTEGER,
+AIRCRAFT       VARCHAR(6),
+DEPART_DATE	 DATE,
+CONSTRAINT FLIGHTS_PK Primary Key (FLIGHT_ID)
+);
+
+CREATE INDEX DESTINDEX ON FLIGHTS (DEST_AIRPORT) ;
+
+CREATE INDEX ORIGINDEX ON FLIGHTS (ORIG_AIRPORT) ;
+
+CREATE TABLE USERS 
+(
+FIRSTNAME VARCHAR(40) NOT NULL,
+LASTNAME VARCHAR (40) NOT NULL,
+USERNAME VARCHAR(20) NOT NULL CONSTRAINT username_pk PRIMARY KEY, 
+PASSWORD VARCHAR(20) NOT NULL,
+PASSWORD_VERIFY VARCHAR(20),
+EMAIL VARCHAR(30) NOT NULL
+);
+
+CREATE TABLE USER_CREDIT_CARD
+(
+ID INT NOT NULL GENERATED ALWAYS AS IDENTITY CONSTRAINT user_cc_pk PRIMARY KEY,
+USERNAME varchar(20) NOT NULL,
+LASTNAME varchar(40),
+CREDIT_CARD_TYPE varchar(15) NOT NULL,
+CREDIT_CARD_NUMBER varchar(20) NOT NULL,
+CREDIT_CARD_DISPLAY varchar(25) NOT NULL
+);
+  
+ALTER TABLE USER_CREDIT_CARD ADD CONSTRAINT USERNAME_FK
+Foreign Key (username) REFERENCES USERS (username);
+
+CREATE TABLE FLIGHTHISTORY
+(
+ID INT NOT NULL GENERATED ALWAYS AS IDENTITY CONSTRAINT user_fh_pk PRIMARY KEY,
+USERNAME       VARCHAR(20) NOT NULL,
+FLIGHT_ID      CHAR(6) NOT NULL,
+ORIG_AIRPORT   CHAR(3) NOT NULL,
+DEST_AIRPORT   CHAR(3) NOT NULL,
+MILES     	 INTEGER,
+AIRCRAFT       VARCHAR(6),
+DEPARTURE_DATE VARCHAR(25),
+CREDIT_CARD_TYPE varchar(15) NOT NULL,
+CREDIT_CARD_DISPLAY varchar(25) NOT NULL
+);
+   
+ALTER TABLE FLIGHTHISTORY ADD CONSTRAINT USERNAME_FH_FK
+Foreign Key (username) REFERENCES USERS (username);
+</p>
+<p>
+All of the SQL should be selected (highlighted in grey), if not, select it by
+issuing a <strong>Ctrl + A</strong> and then click the icon of the running man 
+(or alternately enter a <strong>Ctrl + Enter</strong>).  The image below shows 
+what the session window looks like after I successfully executed all of the SQL in the file.
+</p>
+<p>
+<strong>Figure 5. Running SQL commands using the SQL tab</strong>
+</p>
+<p>
+<img alt="Running SQL commands" height="580" src="../images/sq_create_tables.gif" width="750"></p>
+<p>
+We just saw how to import an SQL file to run it, but other options available
+when running SQL commands or SQL scripts from the SQL tab are:
+</p>
+<ul>
+
+<li>
+New File - the icon with the blank page and the cross at the top.
+</li>
+
+<li>
+Appending a file to the editor contents - the icon with the file and the folder.
+</li>
+
+<li>
+Save editor contents to a file - the disk icon.
+</li>
+
+<li>
+Save editor contents to a new file - the disk icon with the ellipsis.
+</li>
+
+<li>
+Print the editor contents - the printer icon.
+</li>
+
+<li>
+Save the file - the 'X' icon.
+</li>
+
+</ul>
+<p>
+Additionally, ad hoc queries and commands can be entered in the SQL
+editor window.
+</p>
+<p>
+
+<strong>Browsing the database with the Objects tab</strong>
+
+</p>
+<p>
+Now that we have data in our <span class="codefrag">ClientDB</span> database, select
+the <strong>Objects</strong> tab of the session window.  The first thing you
+need to do to see the tables you just created is to refresh the tree
+structure. Click the <strong>Refresh Database Object Tree</strong>
+ icon (the little yellow arrows) or push <strong>F5</strong>.
+</p>
+<p>
+Select the schema folder which represents the user you connected as, in
+my case this is the <strong>SLC</strong> folder.  When connecting to a 
+database in Derby, the default schema is the username you connected with.
+Expand this folder and then expand the <strong>TABLE</strong>
+folder. The five tables you just created should appear. Select the
+<span class="codefrag">CITIES</span> table and notice how the tabs on the right change.
+SQuirreL provides a lot of metadata about each database object.  Look
+at some of the info provided by the different tabs and then click the
+<strong>Content</strong> tab.
+</p>
+<p>
+Some of the really nice things to note about the content tab are:
+</p>
+<ul>
+
+<li>
+The ability to sort the table (ascending or descending) by column name.
+Just click the column name and an up or down arrow will appear and
+sort it.
+</li>
+
+<li>
+Right-click one row or select all rows to see the variety of options
+available if you want to copy the data - copy as html, copy with headers,
+show row number, etc.
+</li>
+
+<li>
+Right-click one row or all rows to <strong>Make Editable</strong>.  This allows
+you to modify the data, insert or delete rows.
+</li>
+
+</ul>
+<p>
+The image below shows what the first row in the <span class="codefrag">CITIES</span> table looks
+like after I have right-clicked it and then single-clicked in this column.  
+The column that I am about to edit for this row is the <span class="codefrag">CITY_NAME</span> 
+column as shown by the yellow highlighting.
+By double-clicking the value in this column, several other options are available
+for updating or saving the value of this row's column, including importing and
+exporting values to a file or executing an external command.   Refer to the
+SQuirreL help system for a detailed explanation on these options.
+</p>
+<p>
+<strong>Figure 6. Making a row editable by right-clicking in a row</strong>
+</p>
+<p>
+<img alt="Making a row editable" height="580" src="../images/sq_make_editable.gif" width="750"></p>
+<p>
+To save an edit issue a <strong>Ctrl + S</strong> prior to exiting the session,
+otherwise your changes will be lost.  Also, exiting a session reverts the
+ability to edit the data to the setting which exists in the 
+<strong>New Session Properties</strong> setting. The place to set this property 
+for new sessions is under the main SQuirreL desktop menu item, <strong>File &gt;&gt; New Session Properties &gt;&gt; General </strong> 
+tab. Once there, look in the <strong>Output</strong> area, and the <strong>Table Contents</strong> setting.  To make the output for the table default to Not Editable select <strong>Table</strong>.  To enable editing by default, select
+<strong>Editable Table</strong>.
+</p>
+<p>
+To set the default to enable editing in the existing session, click the farthest
+left icon on the menu bar and set the property there.
+</p>
+</div>
+
+
+<a name="N102E4"></a><a name="Modifying+data+objects+via+the+Objects+tab"></a>
+<h2 class="boxed">Modifying data objects via the Objects tab</h2>
+<div class="section">
+<p>
+A plethora of options is available when right-clicking one of the
+tables in the <strong>Objects</strong> tab.  The available options can 
+be grouped into these major categories:
+</p>
+<ul>
+
+<li>
+Modifying the schema object - dropping the table or deleting records.
+</li>
+
+<li>
+Changing the view of the data - refreshing the object tree or specifying a where clause to limit the number of rows retrieved in the content tab.
+</li>
+
+<li>
+Copying the object name - either the fully qualified name or just the short name.
+</li>
+
+<li>
+Creating scripts - create table, create select, drop table, create data or create template data scripts.
+</li>
+
+</ul>
+<p>
+<strong>Figure 7. Options available for table objects</strong>
+</p>
+<p>
+<img alt="table editing options" height="614" src="../images/sq_object_options.gif" width="751"></p>
+<p>
+
+<strong>Extracting and loading data to a table via a local file</strong> 
+
+</p>
+<p>
+Let's "unload" the data from the <span class="codefrag">CITIES</span> into an SQL file
+so we can demonstrate how to delete the rows, drop the table, 
+recreate the table and then load the rows back.  In the current 
+version of SQuirreL, V2.2 Final Release, the only way to "unload" the 
+data is to create insert statements from the existing data.  In the 
+2.3 RC1 version of SQuirreL, there will be a way to export the data 
+into a CSV file.
+</p>
+<p>
+First select the <strong>SQL</strong> tab from the session window and
+click the <strong>New File</strong> icon.  This will clear the current
+SQL window and allow us to create a new file for the insert statements
+we are about to create.  Now go back to the <strong>Objects</strong>
+tab. Right-click the <span class="codefrag">CITIES</span> table and select <strong>Create Data Script</strong>.  This will automatically put you back in the <strong>SQL</strong>
+tab.  Now click the <strong>Save Editor contents to a file</strong>,
+or <strong>Ctrl + S</strong>.  Save the file with an SQL extension.
+I've called it <span class="codefrag">cities_inserts.sql</span>.
+</p>
+<p>
+<strong>Deleting the rows from a table</strong>
+</p>
+<p>
+Now go back to the <strong>Objects</strong> tab.  Right-click the
+<span class="codefrag">CITIES</span> table again and select <strong>Delete Rows</strong>.
+All of the rows in this table will be removed as well as any rows in
+other tables that are dependent on rows in the <span class="codefrag">CITIES</span>
+table.
+</p>
+<p>
+<strong>Generating a script to create a table</strong>
+</p>
+<p>
+Go back to the <strong>SQL</strong> tab and close the file with the
+insert statements, then go back to the <strong>Objects</strong> tab
+and select <strong>Create Table Script</strong> when right-clicking
+the <span class="codefrag">CITIES</span> table.  The <strong>SQL</strong> tab becomes
+active.  Save this script to a new file by issuing a <strong>Ctrl + S</strong> 
+or clicking the icon.  I've called the file <span class="codefrag">create_cities_table.sql</span>.
+Click the <strong>X</strong> icon to close the file.
+</p>
+<p>
+<strong>Dropping a table</strong>
+</p>
+<p>
+Back in the <strong>Objects</strong> table select the <span class="codefrag">CITIES</span>
+table and drop it by right-clicking it and selecting <strong>Drop</strong>.
+</p>
+<p>
+<strong>Running the scripts to recreate and "load" the data</strong>
+</p>
+<p>
+Select the <strong>SQL</strong> tab and select the <strong>Open a File</strong> icon, the folder icon.  Browse to the file you created that contains
+the create table statement.  Then execute the SQL by clicking on the
+running man icon.  The table should be recreated.  Close this file
+and open the SQL file that contained the insert statements and run this
+file. 
+</p>
+<p>
+Go back to the <strong>Objects</strong> tab and refresh the database
+object tree if necessary to see the <span class="codefrag">CITIES</span> table.
+Once the <span class="codefrag">CITIES</span> table is selected, click the <strong>Content</strong>
+tab to see all of the data you just loaded again!
+</p>
+</div>
+
+
+<a name="N10392"></a><a name="SQuirreL+and+Derby+Resources"></a>
+<h2 class="boxed">SQuirreL and Derby Resources</h2>
+<div class="section">
+<p>
+The <a href="http://db.apache.org/derby/">Derby</a> web site and 
+<a class="external" href="http://wiki.apache.org/db-derby/">wiki</a> are the best sources 
+of information about Derby. 
+</p>
+<p>
+The intent of this document was to discuss using SQuirreL in relation to Derby 
+databases and only provides a view which is a subset of the functionality
+available via SQuirreL.
+The documentation that comes with SQuirreL is very complete and provides
+much more information than provided here.  The help system, accessible
+via the main menu item <strong>Help &gt; Help</strong>, or as a static html page, 
+<span class="codefrag">quick_start.html</span>, is part of the installation under 
+the <span class="codefrag">doc</span> directory where you installed SQuirreL.
+</p>
+<p>
+Susan Cline wrote this paper and would appreciate any feedback in 
+the form of suggestions, corrections or questions about it by 
+posting to the <a class="external" href="mailto:derby-user@db.apache.org">derby-user</a> 
+mailing list. 
+</p>
+</div>
+
+
+
+<p>
+<em>Last updated: July 14, 2006</em>
+</p>
+
+
+</div>
+<div class="clearboth">&nbsp;</div>
+</div>
+<div id="footer">
+<div class="lastmodified">
+<script type="text/javascript"><!--
+document.write("<text>Last Published:</text> " + document.lastModified);
+//  --></script>
+</div>
+<div class="copyright">
+        Copyright &copy;
+         2004-2006 Apache Software Foundation</div>
+<div id="feedback">
+    Send feedback about the website to:
+  <a id="feedbackto" href="mailto:derby-user@db.apache.org?subject=Feedback%C2%A0integrate/SQuirreL_Derby.html">derby-user@db.apache.org</a>
+</div>
+</div>
+</body>
+</html>

Propchange: db/derby/site/trunk/build/site/integrate/SQuirreL_Derby.html
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: db/derby/site/trunk/build/site/integrate/index.html
URL: http://svn.apache.org/viewvc/db/derby/site/trunk/build/site/integrate/index.html?rev=422098&r1=422097&r2=422098&view=diff
==============================================================================
--- db/derby/site/trunk/build/site/integrate/index.html (original)
+++ db/derby/site/trunk/build/site/integrate/index.html Fri Jul 14 16:47:49 2006
@@ -302,7 +302,7 @@
 
 <tr>
   
-<th colspan="1" rowspan="1">Navigation Menu Entry</th>
+<th colspan="1" rowspan="1">Product</th>
   <th colspan="1" rowspan="1">Title</th>
 
 </tr>
@@ -380,6 +380,16 @@
 
 </tr>
 
+
+<tr>
+   
+<td colspan="1" rowspan="1">SQuirreL SQL</td>
+   <td colspan="1" rowspan="1"><em><a href="SQuirreL_Derby.html">Using SQuirreL SQL Client 
+    with Derby</a></em></td>
+
+</tr>
+
+
 <tr>
    
 <td colspan="1" rowspan="1">Tomcat Demo</td>
@@ -411,7 +421,7 @@
 </div>
 
 
-<a name="N100F3"></a><a name="eclipse"></a>
+<a name="N10103"></a><a name="eclipse"></a>
 <h2 class="boxed">Eclipse Plug-ins</h2>
 <div class="section">
 <p>
@@ -482,7 +492,7 @@
 
 
 <p>
-<em>Last Updated: March 30, 2006</em>
+<em>Last Updated: July 14, 2006</em>
 </p>
 
 

Added: db/derby/site/trunk/src/documentation/content/xdocs/binaries/squirrel_derby.zip
URL: http://svn.apache.org/viewvc/db/derby/site/trunk/src/documentation/content/xdocs/binaries/squirrel_derby.zip?rev=422098&view=auto
==============================================================================
Binary file - no diff available.

Propchange: db/derby/site/trunk/src/documentation/content/xdocs/binaries/squirrel_derby.zip
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: db/derby/site/trunk/src/documentation/content/xdocs/images/sq_alias_1.gif
URL: http://svn.apache.org/viewvc/db/derby/site/trunk/src/documentation/content/xdocs/images/sq_alias_1.gif?rev=422098&view=auto
==============================================================================
Binary file - no diff available.

Propchange: db/derby/site/trunk/src/documentation/content/xdocs/images/sq_alias_1.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: db/derby/site/trunk/src/documentation/content/xdocs/images/sq_alias_client.gif
URL: http://svn.apache.org/viewvc/db/derby/site/trunk/src/documentation/content/xdocs/images/sq_alias_client.gif?rev=422098&view=auto
==============================================================================
Binary file - no diff available.

Propchange: db/derby/site/trunk/src/documentation/content/xdocs/images/sq_alias_client.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: db/derby/site/trunk/src/documentation/content/xdocs/images/sq_create_tables.gif
URL: http://svn.apache.org/viewvc/db/derby/site/trunk/src/documentation/content/xdocs/images/sq_create_tables.gif?rev=422098&view=auto
==============================================================================
Binary file - no diff available.

Propchange: db/derby/site/trunk/src/documentation/content/xdocs/images/sq_create_tables.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: db/derby/site/trunk/src/documentation/content/xdocs/images/sq_derby_client_session.gif
URL: http://svn.apache.org/viewvc/db/derby/site/trunk/src/documentation/content/xdocs/images/sq_derby_client_session.gif?rev=422098&view=auto
==============================================================================
Binary file - no diff available.

Propchange: db/derby/site/trunk/src/documentation/content/xdocs/images/sq_derby_client_session.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: db/derby/site/trunk/src/documentation/content/xdocs/images/sq_first_screen.gif
URL: http://svn.apache.org/viewvc/db/derby/site/trunk/src/documentation/content/xdocs/images/sq_first_screen.gif?rev=422098&view=auto
==============================================================================
Binary file - no diff available.

Propchange: db/derby/site/trunk/src/documentation/content/xdocs/images/sq_first_screen.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: db/derby/site/trunk/src/documentation/content/xdocs/images/sq_make_editable.gif
URL: http://svn.apache.org/viewvc/db/derby/site/trunk/src/documentation/content/xdocs/images/sq_make_editable.gif?rev=422098&view=auto
==============================================================================
Binary file - no diff available.

Propchange: db/derby/site/trunk/src/documentation/content/xdocs/images/sq_make_editable.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: db/derby/site/trunk/src/documentation/content/xdocs/images/sq_object_options.gif
URL: http://svn.apache.org/viewvc/db/derby/site/trunk/src/documentation/content/xdocs/images/sq_object_options.gif?rev=422098&view=auto
==============================================================================
Binary file - no diff available.

Propchange: db/derby/site/trunk/src/documentation/content/xdocs/images/sq_object_options.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: db/derby/site/trunk/src/documentation/content/xdocs/integrate/SQuirreL_Derby.xml
URL: http://svn.apache.org/viewvc/db/derby/site/trunk/src/documentation/content/xdocs/integrate/SQuirreL_Derby.xml?rev=422098&view=auto
==============================================================================
--- db/derby/site/trunk/src/documentation/content/xdocs/integrate/SQuirreL_Derby.xml (added)
+++ db/derby/site/trunk/src/documentation/content/xdocs/integrate/SQuirreL_Derby.xml Fri Jul 14 16:47:49 2006
@@ -0,0 +1,607 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+
+<document> 
+  <header> 
+    <title>Using SQuirreL SQL Client with Derby</title> 
+  </header> 
+  <body> 
+
+<section>
+<title>Overview</title>
+<p>
+SQuirreL SQL Client is a useful tool for browsing and manipulating SQL databases via JDBC. This paper discusses setting up SQuirreL to access Derby databases via the Derby Embedded Driver and Client Drivers with the 10.1 version of Derby.
+
+</p>
+<p>
+Some of the features of SQuirreL that are discussed in relation to 
+working with Derby databases are:
+</p>
+<ul>
+<li>
+Configuring the SQuirreL Drivers window to use the Derby JDBC drivers
+</li>
+<li>
+Creating aliases to new or existing Derby databases
+</li>
+<li>
+Executing, editing and running SQL scripts and commands
+</li>
+<li>
+Browsing the objects in a database using the session window
+</li>
+<li>
+Extracting and loading data to and from a Derby table via a local file 
+</li>
+<li>
+Generating DDL
+</li>
+<li>
+Dropping tables
+</li>
+</ul>
+
+</section>
+
+<section><title>Prerequisites</title>
+<p>
+Download and install the following software to use SQuirreL SQL Client with Derby:
+</p>
+<table>
+<tr>
+<th>Software</th>
+<th>Minimum Release Level Required</th>
+<th>Release Used in this Example</th>
+<th>Download Location</th>
+</tr>
+<tr>
+<td>Java JRE or JDK or SDK</td> 
+<td>1.4.x</td>
+<td>1.5.x</td>
+<td>Any J2SE-compliant JVM, Java's reference implementation is at <a href="http://java.sun.com/j2se">http://java.sun.com/j2se</a></td>
+</tr>
+<tr>
+<td>SQuirreL SQL Client</td>
+<td>Version 2.0</td> 
+<td>Version 2.2 Final</td>
+<td><a href="http://squirrelsql.org/#installation">SQuirreL SQL Client, Version 2.2 Final</a></td>
+</tr>
+<tr>
+<td>Apache Derby</td>
+<td>Version 10.1.x</td> 
+<td>Version 10.1.3</td>
+<td><a href="http://db.apache.org/derby/derby_downloads.html#Latest+Official+Release">Apache Derby, Version 10.1</a></td>
+</tr>
+</table>
+<p>
+Additionally, if you would like to follow some of the examples for
+creating tables and loading data, download the file, <a href="../binaries/squirrel_derby.zip">squirrel_derby.zip</a>.
+</p>
+
+<p>
+After downloading SQuirreL, follow the instructions on the installation page,
+<a href="http://squirrelsql.org/#installation">squirrel.org/#installation</a>, 
+on how to install SQuirreL using the executable jar file.  On my system,
+this command worked to launch the install wizard: 
+</p>
+<p class="code-block">
+java -jar squirrel-sql-2.2final-install.jar 
+</p>
+<p>
+The wizard lets you choose the location where you wish to install SQuirreL,
+as well as which plugins you would like to install. I selected the Standard
+plugins because this paper will make use of the SQL Scripts standard plugin.
+Note that some of the Optional Plugins are considered Beta quality. After the
+installation is complete go to the directory where you installed SQuirreL and
+launch (or double-click on Windows) the squirrel-sql.bat file, or the squirrel-sql.sh file on Linux.
+</p>
+</section>
+
+<section>
+<title>Configuring SQuirreL for the Derby Embedded JDBC Driver </title>
+
+<p>
+When you first launch SQuirreL it will create a directory called <code>.squirrel-sql</code> in your <code>C:\Documents and Settings\&lt;username&gt;</code> 
+directory on Windows, or <code>$HOME</code> on Linux.  This is where configuration settings and history are stored.  The first screen that appears in the 
+desktop will show 
+two windows - the Drivers and the Aliases windows. The Drivers window will
+show the Apache Derby Client and the Apache Derby Embedded drivers in the
+list.  If the jar files for either of these drivers, <code>derbyclient.jar</code>
+ or <code>derby.jar</code>, are in your system CLASSPATH then they will have a blue check next to them.
+If not, a red 'X' will appear in front of them as shown below.
+</p>
+<p>
+<strong>Figure 1.  The SQuirreL SQL Client desktop prior to configuration</strong>
+</p>
+<p>
+<img src="../images/sq_first_screen.gif" alt="SQuirreL desktop" width="671" height="467"></img>
+</p>
+<p>
+Although you need to install Derby prior to going further, I'll assume you
+don't have the jar files in your CLASSPATH and we'll set up SQuirreL correctly
+so you don't need to.  
+</p>
+<p>
+<strong>Configuring the Derby Embedded Driver in the Drivers window</strong>
+</p>
+<p>
+Select the <strong>Apache Derby Embedded</strong> option from the Drivers window and
+click the pencil icon, which allows you to Modify the Selected Driver.
+We need to point to the location of the <code>derby.jar</code> file on 
+the file system, which contains the Derby Embedded Driver.  Click the <strong>Extra Class Path</strong> tab, and then the <strong>Add</strong> button.  Browse to this directory and 
+select <code>derby.jar</code>.  
+On my machine I browsed to <code>C:\derby_home\derby_10.1.3\lib\derby.jar</code>.
+</p>
+<p>Now, click the <strong>List Drivers</strong> button and the <strong>Class Name</strong> pulldown list will 
+be automatically populated.  Select the Class Name of <strong>org.apache.derby.jdbc.EmbeddedDriver</strong> from the list and click <strong>OK</strong>.
+</p>
+<p>
+Don't modify the Example URL in the Drivers window since this is just a listing
+of available drivers, and does not represent a connection to a specific
+database.  That is what the Aliases window is for. 
+Now you should be returned to the main desktop of SQuirreL and if the driver was
+added successfully,  you will see this message in the status window, with green highlighting;
+</p>
+
+<p class="code-block">Driver class org.apache.derby.jdbc.EmbeddedDriver 
+successfully registered for driver definition: Apache Derby Embedded</p>
+<p>
+Also, there should be a blue check mark next to the Apache Derby Embedded
+listing in the Drivers window now.
+</p>
+</section>
+
+<section>
+<title>Creating an Alias to a Derby database using the Embedded Driver</title>
+
+<p>
+Now go to the Aliases window and click the blue '+' mark.  Name the Alias
+something descriptive.  I'm going to create a database using SQuirreL called 
+<code>FirstDB</code> so I'll name the Alias <strong>Derby_Embedded_FirstDB</strong>.  For the driver, 
+pull down the list to select <strong>Apache Derby Embedded</strong>.
+For the URL, I want to create the <code>FirstDB</code> database so the URL 
+will look like this:
+<code>jdbc:derby:FirstDB;create=true</code>.
+</p>
+<p>
+A User Name and Password are not required to make a connection using the 
+Embedded Derby driver, so I will not enter any values for this.  Also, at
+this time I do not want to automatically logon or connect at startup, so I'll
+leave those boxes unchecked.
+</p>
+<p><strong>Figure 2. Creating an alias for the Embedded Driver</strong></p>
+<p><img src="../images/sq_alias_1.gif" alt="Creating an alias" width="719" height="605"></img></p>
+<p>
+Test the connection by clicking the <strong>Test</strong> button.  The <strong>Connect to: Derby_Embedded_FirstDB</strong> window
+will appear and prompt again for a username and password, but they are not
+required.  Just click the <strong>Connect</strong> button to test.  If all goes well the
+<code>FirstDB</code> database will be created in the directory where you launched SQuirreL from, and a popup box will tell you the Connection was successful. 
+Say <strong>OK</strong> to dismiss this window, and from the next window click the <strong>OK</strong>
+button too.  Close the next window instead of connecting, so we can set up
+the Derby Client driver first, before browsing the database.  
+</p>
+</section>
+
+<section>
+<title>Configuring the Derby Client Driver in the Drivers window</title>
+<p>
+The Derby Client driver is used with the Derby network server, so we'll
+discuss the network server prior to configuring the client driver.
+</p>
+<p>
+<strong>Starting the Network Server and creating a database using ij</strong>
+</p>
+<p>
+The Derby Network server should be used in environments where multiple JVMs
+are connecting to a single Derby database.  In the context of using
+SQuirreL to browse a Derby database this configuration is required if other 
+users will be connecting to the same database via other clients, for instance,
+<strong>ij</strong> or some other application. 
+</p>
+<p>
+Let's start the network server now, and create the database
+using <strong>ij</strong> prior to creating the Alias for this database.
+</p>
+<p>
+Start the Derby Network server on your localhost.  If you don't know how to
+start the network server refer to the <a href="http://db.apache.org/derby/papers/DerbyTut/ns_intro.html">Derby tutorial</a>, which also shows you how to
+set up your environment to do so.  
+</p>
+<p>
+This is the command I used to start the network server on my host with
+<code>derbynet.jar</code> in my CLASSPATH:
+</p>
+<p class="code-block">
+java org.apache.derby.drda.NetworkServerControl start
+</p>
+<p>
+In another command window, with <code>derbyclient.jar</code> and 
+<code>derbytools.jar</code> in my classpath, I issued this command to 
+launch <code>ij</code>, and then created a database called <code>ClientDB</code> under my <code>C:/derby_home/databases/</code> directory. Notice the difference
+in the URL when connecting to the network server versus when making an
+embedded Derby connection.
+</p>
+<p class="code-block">
+java org.apache.derby.tools.ij 
+ij version 10.1
+ij> connect 'jdbc:derby://localhost:1527/C:/derby_home/databases/ClientDB;create=true';
+</p>
+<p>
+Leave the network server and <code>ij</code> windows active.  Next we'll configure SQuirreL 
+for use with the Client driver and then create an alias to the <code>ClientDB</code> database.
+</p>
+
+<p>
+<strong>The Derby Client Driver configuration in the Drivers window</strong>
+</p>
+<p>
+Select the <strong>Apache Derby Client</strong> driver from the <strong>Drivers</strong> window
+in SQuirreL, and then click the pencil icon again.  Click the <strong>Extra Class Path</strong>
+tab and then the <strong>Add</strong> button to browse to the <code>derbyclient.jar</code>
+file.  The client driver only contains one Class of driver, so the <strong>Class Name</strong>
+category should be populated with the correct value, <code>org.apache.derby.jdbc.ClientDriver</code>.  Click <strong>OK</strong> and the blue check mark will appear
+next to the <strong>Apache Derby Client</strong> value in the list now.
+</p>
+<p>In the next section we'll configure an Alias to use the Derby Client Driver
+to connect to our database, <code>ClientDB</code>. 
+</p>
+</section>
+
+<section>
+<title>Creating an Alias for an existing Derby database using the Client Driver</title>
+<p>
+Select the blue cross from the <strong>Aliases</strong> window and name the Alias something descriptive - I've chosen <strong>Derby_Client_ClientDB</strong>. Make sure the
+Driver is <strong>Apache Derby Client</strong> and for the URL, we will point to our
+database <code>ClientDB</code> we created earlier.  For my environment the
+correct value for the URL is:
+</p>
+<p class="code-block">
+jdbc:derby://localhost:1527/C:/derby_home/databases/ClientDB;
+</p>
+<p>
+Here is what the values for my environment look like, just before clicking
+the <strong>Test</strong> button. A user name and password is required in the SQuirreL
+environment although it is not required for <code>ij</code>.  Any value for
+the user name and password will do, but realize that the user name sets the
+default schema for the connection. <strong>Note:</strong> If you would like
+to require a specific username and password to connect to Derby, refer to
+this <a href="http://db.apache.org/derby/docs/10.1/devguide/cdevcsecure36127.html">section</a> of the Derby Developer's Guide, on configuring user authentication.
+</p>
+<p><strong>Figure 3. Creating an Alias to an existing database using the Client Driver</strong></p>
+<p><img src="../images/sq_alias_client.gif" alt="Creating an alias" width="719" height="673"></img></p>
+
+<p>
+Once the test connection is successful, at the main screen for the <strong>Derby_Client_ClientDB</strong> window, select the <strong>OK</strong> button to close the window.  
+</p>
+<p>
+Remember how we left our <code>ij</code> session active?  When
+we clicked the test button, and later on when we connect to and browse the
+<code>ClientDB</code> database, we are taking advantage of the Derby Network
+Servers' ability to allow multiple client applications, running in different
+JVMs to connect to the same database.  
+</p>
+</section>
+
+<section>
+<title>Creating a session to issue SQL and browse the database</title>
+<p>
+Double click the <strong>Derby_Client_ClientDB</strong> entry in the <strong>Aliases</strong>
+window which brings up another window.  Click the <strong>Connect</strong> button to
+connect to the database and bring up the session window.
+The session window is shown below with the Alias name listed and the username
+I connected with, in this case, as user <strong>slc</strong>.
+</p>
+<p><strong>Figure 4. Creating a session for the Derby_Client_ClientDB alias</strong></p>
+<p><img src="../images/sq_derby_client_session.gif" alt="Creating a session" width="719" height="673"></img></p>
+<p>
+<strong>Executing, editing and running SQL scripts using the SQL tab</strong>
+</p>
+<p>
+Before we explore the <strong>Objects</strong> tab, it will be more interesting
+if we create some tables and insert data into our database.  
+Unzip the zip file, <code>squirrel_derby.zip</code> to
+a convenient location and locate the file <code>tables_inserts.sql</code>.
+
+Select the <strong>SQL</strong> tab of the session window and then use the
+folder icon in the session window to <strong>Open a file</strong>.  This allows
+you to browse to the <code>tables_inserts.sql</code> file and pastes
+the output into the SQL editor area so we can run it. 
+The <code>CREATE TABLE</code> statements included in this
+file are shown below (the inserts are omitted.)
+</p>
+
+<p class="code-block">
+CREATE TABLE CITIES
+(
+CITY_ID          INTEGER NOT NULL CONSTRAINT cities_pk PRIMARY KEY,
+CITY_NAME        VARCHAR(24) NOT NULL,
+COUNTRY          VARCHAR(26) NOT NULL,
+AIRPORT          CHAR(3),
+LANGUAGE         VARCHAR(16),
+COUNTRY_ISO_CODE CHAR(2) 
+);
+
+CREATE TABLE FLIGHTS
+(
+FLIGHT_ID      CHAR(6) NOT NULL,
+SEGMENT_NUMBER INTEGER NOT NULL,
+ORIG_AIRPORT   CHAR(3),
+DEPART_TIME    TIME,
+DEST_AIRPORT   CHAR(3),
+ARRIVE_TIME    TIME,
+MEAL           CHAR(1) CONSTRAINT MEAL_CONSTRAINT 
+CHECK (meal IN ('B', 'L', 'D', 'S')),
+FLYING_TIME    DOUBLE PRECISION,
+MILES          INTEGER,
+AIRCRAFT       VARCHAR(6),
+DEPART_DATE	 DATE,
+CONSTRAINT FLIGHTS_PK Primary Key (FLIGHT_ID)
+);
+
+CREATE INDEX DESTINDEX ON FLIGHTS (DEST_AIRPORT) ;
+
+CREATE INDEX ORIGINDEX ON FLIGHTS (ORIG_AIRPORT) ;
+
+CREATE TABLE USERS 
+(
+FIRSTNAME VARCHAR(40) NOT NULL,
+LASTNAME VARCHAR (40) NOT NULL,
+USERNAME VARCHAR(20) NOT NULL CONSTRAINT username_pk PRIMARY KEY, 
+PASSWORD VARCHAR(20) NOT NULL,
+PASSWORD_VERIFY VARCHAR(20),
+EMAIL VARCHAR(30) NOT NULL
+);
+
+CREATE TABLE USER_CREDIT_CARD
+(
+ID INT NOT NULL GENERATED ALWAYS AS IDENTITY CONSTRAINT user_cc_pk PRIMARY KEY,
+USERNAME varchar(20) NOT NULL,
+LASTNAME varchar(40),
+CREDIT_CARD_TYPE varchar(15) NOT NULL,
+CREDIT_CARD_NUMBER varchar(20) NOT NULL,
+CREDIT_CARD_DISPLAY varchar(25) NOT NULL
+);
+  
+ALTER TABLE USER_CREDIT_CARD ADD CONSTRAINT USERNAME_FK
+Foreign Key (username) REFERENCES USERS (username);
+
+CREATE TABLE FLIGHTHISTORY
+(
+ID INT NOT NULL GENERATED ALWAYS AS IDENTITY CONSTRAINT user_fh_pk PRIMARY KEY,
+USERNAME       VARCHAR(20) NOT NULL,
+FLIGHT_ID      CHAR(6) NOT NULL,
+ORIG_AIRPORT   CHAR(3) NOT NULL,
+DEST_AIRPORT   CHAR(3) NOT NULL,
+MILES     	 INTEGER,
+AIRCRAFT       VARCHAR(6),
+DEPARTURE_DATE VARCHAR(25),
+CREDIT_CARD_TYPE varchar(15) NOT NULL,
+CREDIT_CARD_DISPLAY varchar(25) NOT NULL
+);
+   
+ALTER TABLE FLIGHTHISTORY ADD CONSTRAINT USERNAME_FH_FK
+Foreign Key (username) REFERENCES USERS (username);
+</p>
+
+<p>
+All of the SQL should be selected (highlighted in grey), if not, select it by
+issuing a <strong>Ctrl + A</strong> and then click the icon of the running man 
+(or alternately enter a <strong>Ctrl + Enter</strong>).  The image below shows 
+what the session window looks like after I successfully executed all of the SQL in the file.
+</p>
+
+<p><strong>Figure 5. Running SQL commands using the SQL tab</strong></p>
+<p><img src="../images/sq_create_tables.gif" alt="Running SQL commands" width="750" height="580"></img></p>
+
+<p>
+We just saw how to import an SQL file to run it, but other options available
+when running SQL commands or SQL scripts from the SQL tab are:
+</p>
+<ul>
+<li>
+New File - the icon with the blank page and the cross at the top.
+</li>
+<li>
+Appending a file to the editor contents - the icon with the file and the folder.
+</li>
+<li>
+Save editor contents to a file - the disk icon.
+</li>
+<li>
+Save editor contents to a new file - the disk icon with the ellipsis.
+</li>
+<li>
+Print the editor contents - the printer icon.
+</li>
+<li>
+Save the file - the 'X' icon.
+</li>
+</ul>
+
+<p>
+Additionally, ad hoc queries and commands can be entered in the SQL
+editor window.
+</p>
+<p>
+<strong>Browsing the database with the Objects tab</strong>
+</p>
+<p>
+Now that we have data in our <code>ClientDB</code> database, select
+the <strong>Objects</strong> tab of the session window.  The first thing you
+need to do to see the tables you just created is to refresh the tree
+structure. Click the <strong>Refresh Database Object Tree</strong>
+ icon (the little yellow arrows) or push <strong>F5</strong>.
+</p>
+<p>
+Select the schema folder which represents the user you connected as, in
+my case this is the <strong>SLC</strong> folder.  When connecting to a 
+database in Derby, the default schema is the username you connected with.
+Expand this folder and then expand the <strong>TABLE</strong>
+folder. The five tables you just created should appear. Select the
+<code>CITIES</code> table and notice how the tabs on the right change.
+SQuirreL provides a lot of metadata about each database object.  Look
+at some of the info provided by the different tabs and then click the
+<strong>Content</strong> tab.
+</p>
+<p>
+Some of the really nice things to note about the content tab are:
+</p>
+<ul>
+<li>
+The ability to sort the table (ascending or descending) by column name.
+Just click the column name and an up or down arrow will appear and
+sort it.
+</li>
+<li>
+Right-click one row or select all rows to see the variety of options
+available if you want to copy the data - copy as html, copy with headers,
+show row number, etc.
+</li>
+<li>
+Right-click one row or all rows to <strong>Make Editable</strong>.  This allows
+you to modify the data, insert or delete rows.
+</li>
+</ul>
+<p>
+The image below shows what the first row in the <code>CITIES</code> table looks
+like after I have right-clicked it and then single-clicked in this column.  
+The column that I am about to edit for this row is the <code>CITY_NAME</code> 
+column as shown by the yellow highlighting.
+By double-clicking the value in this column, several other options are available
+for updating or saving the value of this row's column, including importing and
+exporting values to a file or executing an external command.   Refer to the
+SQuirreL help system for a detailed explanation on these options.
+</p>
+<p><strong>Figure 6. Making a row editable by right-clicking in a row</strong></p>
+<p><img src="../images/sq_make_editable.gif" alt="Making a row editable" width="750" height="580"></img></p>
+<p>
+To save an edit issue a <strong>Ctrl + S</strong> prior to exiting the session,
+otherwise your changes will be lost.  Also, exiting a session reverts the
+ability to edit the data to the setting which exists in the 
+<strong>New Session Properties</strong> setting. The place to set this property 
+for new sessions is under the main SQuirreL desktop menu item, <strong>File >> New Session Properties >> General </strong> 
+tab. Once there, look in the <strong>Output</strong> area, and the <strong>Table Contents</strong> setting.  To make the output for the table default to Not Editable select <strong>Table</strong>.  To enable editing by default, select
+<strong>Editable Table</strong>.
+</p>
+<p>
+To set the default to enable editing in the existing session, click the farthest
+left icon on the menu bar and set the property there.
+</p>
+</section>
+
+<section><title>Modifying data objects via the Objects tab</title>
+<p>
+A plethora of options is available when right-clicking one of the
+tables in the <strong>Objects</strong> tab.  The available options can 
+be grouped into these major categories:
+</p>
+<ul>
+<li>
+Modifying the schema object - dropping the table or deleting records.
+</li>
+<li>
+Changing the view of the data - refreshing the object tree or specifying a where clause to limit the number of rows retrieved in the content tab.
+</li>
+<li>
+Copying the object name - either the fully qualified name or just the short name.
+</li>
+<li>
+Creating scripts - create table, create select, drop table, create data or create template data scripts.
+</li>
+</ul>
+
+<p><strong>Figure 7. Options available for table objects</strong></p>
+<p><img src="../images/sq_object_options.gif" alt="table editing options" width="751" height="614"></img></p>
+<p>
+<strong>Extracting and loading data to a table via a local file</strong> 
+</p>
+<p>
+Let's "unload" the data from the <code>CITIES</code> into an SQL file
+so we can demonstrate how to delete the rows, drop the table, 
+recreate the table and then load the rows back.  In the current 
+version of SQuirreL, V2.2 Final Release, the only way to "unload" the 
+data is to create insert statements from the existing data.  In the 
+2.3 RC1 version of SQuirreL, there will be a way to export the data 
+into a CSV file.
+</p>
+<p>
+First select the <strong>SQL</strong> tab from the session window and
+click the <strong>New File</strong> icon.  This will clear the current
+SQL window and allow us to create a new file for the insert statements
+we are about to create.  Now go back to the <strong>Objects</strong>
+tab. Right-click the <code>CITIES</code> table and select <strong>Create Data Script</strong>.  This will automatically put you back in the <strong>SQL</strong>
+tab.  Now click the <strong>Save Editor contents to a file</strong>,
+or <strong>Ctrl + S</strong>.  Save the file with an SQL extension.
+I've called it <code>cities_inserts.sql</code>.
+</p>
+<p><strong>Deleting the rows from a table</strong></p>
+<p>
+Now go back to the <strong>Objects</strong> tab.  Right-click the
+<code>CITIES</code> table again and select <strong>Delete Rows</strong>.
+All of the rows in this table will be removed as well as any rows in
+other tables that are dependent on rows in the <code>CITIES</code>
+table.
+</p>
+<p><strong>Generating a script to create a table</strong></p>
+<p>
+Go back to the <strong>SQL</strong> tab and close the file with the
+insert statements, then go back to the <strong>Objects</strong> tab
+and select <strong>Create Table Script</strong> when right-clicking
+the <code>CITIES</code> table.  The <strong>SQL</strong> tab becomes
+active.  Save this script to a new file by issuing a <strong>Ctrl + S</strong> 
+or clicking the icon.  I've called the file <code>create_cities_table.sql</code>.
+Click the <strong>X</strong> icon to close the file.
+</p>
+
+<p><strong>Dropping a table</strong></p>
+<p>
+Back in the <strong>Objects</strong> table select the <code>CITIES</code>
+table and drop it by right-clicking it and selecting <strong>Drop</strong>.
+</p>
+<p><strong>Running the scripts to recreate and "load" the data</strong></p>
+<p>
+Select the <strong>SQL</strong> tab and select the <strong>Open a File</strong> icon, the folder icon.  Browse to the file you created that contains
+the create table statement.  Then execute the SQL by clicking on the
+running man icon.  The table should be recreated.  Close this file
+and open the SQL file that contained the insert statements and run this
+file. 
+</p>
+<p>
+Go back to the <strong>Objects</strong> tab and refresh the database
+object tree if necessary to see the <code>CITIES</code> table.
+Once the <code>CITIES</code> table is selected, click the <strong>Content</strong>
+tab to see all of the data you just loaded again!
+</p>
+</section>
+
+<section>
+<title>SQuirreL and Derby Resources</title>
+<p>
+The <a href="http://db.apache.org/derby/">Derby</a> web site and 
+<a href="http://wiki.apache.org/db-derby/">wiki</a> are the best sources 
+of information about Derby. 
+</p>
+<p>
+The intent of this document was to discuss using SQuirreL in relation to Derby 
+databases and only provides a view which is a subset of the functionality
+available via SQuirreL.
+The documentation that comes with SQuirreL is very complete and provides
+much more information than provided here.  The help system, accessible
+via the main menu item <strong>Help > Help</strong>, or as a static html page, 
+<code>quick_start.html</code>, is part of the installation under 
+the <code>doc</code> directory where you installed SQuirreL.
+</p>
+
+<p>
+Susan Cline wrote this paper and would appreciate any feedback in 
+the form of suggestions, corrections or questions about it by 
+posting to the <a href="mailto:derby-user&#064;db.apache.org">derby-user</a> 
+mailing list. 
+</p>
+</section>
+
+
+<p><em>Last updated: July 14, 2006</em></p>
+
+</body>
+</document>

Propchange: db/derby/site/trunk/src/documentation/content/xdocs/integrate/SQuirreL_Derby.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: db/derby/site/trunk/src/documentation/content/xdocs/integrate/index.xml
URL: http://svn.apache.org/viewvc/db/derby/site/trunk/src/documentation/content/xdocs/integrate/index.xml?rev=422098&r1=422097&r2=422098&view=diff
==============================================================================
--- db/derby/site/trunk/src/documentation/content/xdocs/integrate/index.xml (original)
+++ db/derby/site/trunk/src/documentation/content/xdocs/integrate/index.xml Fri Jul 14 16:47:49 2006
@@ -26,7 +26,7 @@
 
 <table>
 <tr>
-  <th>Navigation Menu Entry</th>
+  <th>Product</th>
   <th>Title</th>
 </tr>
 <tr>
@@ -78,6 +78,13 @@
    <td><em><a href="JPetStoreGeronimo.html">Using Apache Derby with 
          iBATIS JPetStore 4 running on the Geronimo J2EE Server</a></em></td>
 </tr>
+
+<tr>
+   <td>SQuirreL SQL</td>
+   <td><em><a href="SQuirreL_Derby.html">Using SQuirreL SQL Client 
+    with Derby</a></em></td>
+</tr>
+
 <tr>
    <td>Tomcat Demo</td>
    <td><em><a href="DerbyTomcat5512JPetStor.html">Embedding Apache Derby in
@@ -150,7 +157,7 @@
 </table>
 </section>
 
-<p><em>Last Updated: March 30, 2006</em></p>
+<p><em>Last Updated: July 14, 2006</em></p>
 
 </body>
 </document>



Mime
View raw message