db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r408786 - /db/derby/docs/trunk/src/workingwithderby/
Date Mon, 22 May 2006 23:22:26 GMT
Author: jta
Date: Mon May 22 16:22:26 2006
New Revision: 408786

URL: http://svn.apache.org/viewvc?rev=408786&view=rev
Log:
DERBY-913 Applied patch containing the completed Working With Derby files, 
revision 1.0 . Patch by Stan.Bradbury@gmail.com.

Added:
    db/derby/docs/trunk/src/workingwithderby/cwwdsummary.dita   (with props)
    db/derby/docs/trunk/src/workingwithderby/twwdactivity4.dita   (with props)
Modified:
    db/derby/docs/trunk/src/workingwithderby/WorkingWithDerby.ditamap
    db/derby/docs/trunk/src/workingwithderby/cwwdactivities.dita
    db/derby/docs/trunk/src/workingwithderby/rwwdactivity3.dita
    db/derby/docs/trunk/src/workingwithderby/rwwdcopyright.dita
    db/derby/docs/trunk/src/workingwithderby/twwdIntro.dita
    db/derby/docs/trunk/src/workingwithderby/twwdactivity1.dita
    db/derby/docs/trunk/src/workingwithderby/twwdactivity1_Setup.dita
    db/derby/docs/trunk/src/workingwithderby/twwdactivity2.dita
    db/derby/docs/trunk/src/workingwithderby/twwdactivity3_Setup.dita

Modified: db/derby/docs/trunk/src/workingwithderby/WorkingWithDerby.ditamap
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/workingwithderby/WorkingWithDerby.ditamap?rev=408786&r1=408785&r2=408786&view=diff
==============================================================================
--- db/derby/docs/trunk/src/workingwithderby/WorkingWithDerby.ditamap (original)
+++ db/derby/docs/trunk/src/workingwithderby/WorkingWithDerby.ditamap Mon May 22 16:22:26
2006
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
+<!--       File Edit date of Contribution:  May 10, 2006         -->
 <!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN"
  "map.dtd">
 <!-- 
@@ -23,7 +24,7 @@
 <copyrholder>Apache Software Foundation</copyrholder>
 </copyright>
 <prodinfo>
-<prodname>Working With Derby - (partial: Chap 1 - 4)</prodname>
+<prodname>Working With Derby</prodname>
 <vrmlist><vrm version="10.2"/></vrmlist>
 <brand>Apache Derby</brand></prodinfo>
 </topicmeta>
@@ -40,4 +41,7 @@
 <topicref href="twwdactivity3_Setup.dita" navtitle="Activity 3: Run a JDBC program using
the Embedded driver">
 <topicref href="rwwdactivity3.dita" navtitle="The WwdEmbedded program"></topicref>
 </topicref>
+<topicref href="twwdactivity4.dita" navtitle="Activity 4: Create and run a JDBC program
using the Client driver and
+Network Server"></topicref>
+<topicref href="cwwdsummary.dita" navtitle="What next with Derby"></topicref>
 </map>

Modified: db/derby/docs/trunk/src/workingwithderby/cwwdactivities.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/workingwithderby/cwwdactivities.dita?rev=408786&r1=408785&r2=408786&view=diff
==============================================================================
--- db/derby/docs/trunk/src/workingwithderby/cwwdactivities.dita (original)
+++ db/derby/docs/trunk/src/workingwithderby/cwwdactivities.dita Mon May 22 16:22:26 2006
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
+<!--       File Edit date of Contribution:  May 10, 2006         -->
 <!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN"
  "concept.dtd">
 <!-- 
@@ -41,8 +42,7 @@
 and connection URL attribute <codeph>;shutdown=true</codeph> are introduced.</p></dd>
 <dd><p><b>Activity 4:</b> Modify the Java JDBC program to load the
client
 driver and connect to the Derby Network Server. Compile the altered program
-and test that it operates as it did in the previous activity. Verify that
-two instances of the program can be used at the same time.</p></dd>
+and test that it operates as it did in the previous activity.</p></dd>
 </dlentry></dl>
 </conbody>
 </concept>

Added: db/derby/docs/trunk/src/workingwithderby/cwwdsummary.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/workingwithderby/cwwdsummary.dita?rev=408786&view=auto
==============================================================================
--- db/derby/docs/trunk/src/workingwithderby/cwwdsummary.dita (added)
+++ db/derby/docs/trunk/src/workingwithderby/cwwdsummary.dita Mon May 22 16:22:26 2006
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--       File Edit date of Contribution:  May 10, 2006         -->
+<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN"
+ "concept.dtd">
+<!-- 
+Copyright 2006 The Apache Software Foundation or its licensors, as applicable.  
+
+Licensed under the Apache License, Version 2.0 (the "License");  
+you may not use this file except in compliance with the License.  
+You may obtain a copy of the License at      
+
+http://www.apache.org/licenses/LICENSE-2.0  
+
+Unless required by applicable law or agreed to in writing, software  
+distributed under the License is distributed on an "AS IS" BASIS,  
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  
+See the License for the specific language governing permissions and  
+limitations under the License.
+-->
+<concept id="cwwdsummary" rev="1.0" xml:lang="en-us">
+<title>What next with Derby</title>
+<shortdesc>Congratulations on completing the activities in this workbook.
+You now have experience with using Derby in both the embedded and client /
+server architectures. With this basic knowledge you are ready to begin using
+Derby to address your own specific needs. We recommend visiting the Apache
+Derby website as your next step in leaning about this lightweight and powerful
+tool.</shortdesc>
+<conbody>
+<lines frame="topbot" importance="high" scale="120">   <b>Use this link:</b>
         <xref
+format="html" href="http://wiki.apache.org/db-derby/WorkingWithDerby" importance="high"
+scope="local"><b>WorkingWithDerby Resources page</b></xref>
+   browser URL:       <codeph><b>http://wiki.apache.org/db-derby/WorkingWithDerby</b></codeph></lines>
+<section><title>Activities Summary</title><p>We hope you have found
these
+activities useful in understanding the steps needed to create and access Derby
+databases. Though simple to setup and use you will find that Derby has the
+features and reliability of much larger database systems. The examples presented
+here do not begin to scratch the surface of what can be done. Please take
+a few moments to become familiar with the many online resources available
+to Derby users and developers by browsing the Derby website at Apache. Whether
+you are performing a general evaluation of Derby or have a specific need to
+address the above link is a good stepping stone to finding additional information
+of interest. The <xref format="html" href="http://db.apache.org/derby/quick_start.html"
+scope="local">Derby Quick Start page</xref> is a good reference page organized
+by area of interest. You will find many content rich areas such as the <cite>Derby
+Wiki</cite> and the <cite>Derby Users mailing list</cite> available to
you.
+If you are interested in how others are using Derby see the <cite>Uses of
+Derby</cite> page on the WIKI. This page contains informational links to development
+projects and products that use Derby. When you implement a system using Derby
+please add it to this list.</p></section>
+</conbody>
+</concept>

Propchange: db/derby/docs/trunk/src/workingwithderby/cwwdsummary.dita
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: db/derby/docs/trunk/src/workingwithderby/rwwdactivity3.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/workingwithderby/rwwdactivity3.dita?rev=408786&r1=408785&r2=408786&view=diff
==============================================================================
--- db/derby/docs/trunk/src/workingwithderby/rwwdactivity3.dita (original)
+++ db/derby/docs/trunk/src/workingwithderby/rwwdactivity3.dita Mon May 22 16:22:26 2006
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
+<!--       File Edit date of Contribution:  May 10, 2006         -->
 <!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN"
  "reference.dtd">
 <!-- 

Modified: db/derby/docs/trunk/src/workingwithderby/rwwdcopyright.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/workingwithderby/rwwdcopyright.dita?rev=408786&r1=408785&r2=408786&view=diff
==============================================================================
--- db/derby/docs/trunk/src/workingwithderby/rwwdcopyright.dita (original)
+++ db/derby/docs/trunk/src/workingwithderby/rwwdcopyright.dita Mon May 22 16:22:26 2006
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
+<!--       File Edit date of Contribution:  May 10, 2006         -->
 <!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN"
  "reference.dtd">
 <!-- 

Modified: db/derby/docs/trunk/src/workingwithderby/twwdIntro.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/workingwithderby/twwdIntro.dita?rev=408786&r1=408785&r2=408786&view=diff
==============================================================================
--- db/derby/docs/trunk/src/workingwithderby/twwdIntro.dita (original)
+++ db/derby/docs/trunk/src/workingwithderby/twwdIntro.dita Mon May 22 16:22:26 2006
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
+<!--       File Edit date of Contribution:  May 10, 2006         -->
 <!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN"
  "task.dtd">
 <!--
@@ -47,14 +48,14 @@
 that Java and Derby software be installed on the computer and the ability
 to enter computer operating system commands. Specifically:<ul>
 <li>A Java development kit version 1.3 or higher</li>
-<li>The binary (<codeph>bin</codeph>) installation of Apache Derby</li>
+<li>The binary (<codeph>bin</codeph>) installation of Apache Derby version
+10.2</li>
 <li>A basic knowledge of the computer command line interface<ul>
 <li>how to start a command shell or window</li>
 <li>how to navigate the filesystem hierarchy</li>
 </ul></li>
-</ul></p><p>If unsure about the Java or Derby environments installed preform
-the following steps to obtain the information necessary to perform the subsequent
-activities:</p></context>
+</ul></p><p>If unsure about the Java or Derby environments installed perform
+the following steps before attempting the subsequent activities:</p></context>
 <steps>
 <step><cmd>Verify that the JAVA_HOME environment variable is set and points
 to a Java development kit version 1.3 or higher.</cmd><info>Open a command

Modified: db/derby/docs/trunk/src/workingwithderby/twwdactivity1.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/workingwithderby/twwdactivity1.dita?rev=408786&r1=408785&r2=408786&view=diff
==============================================================================
--- db/derby/docs/trunk/src/workingwithderby/twwdactivity1.dita (original)
+++ db/derby/docs/trunk/src/workingwithderby/twwdactivity1.dita Mon May 22 16:22:26 2006
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
+<!--       File Edit date of Contribution:  May 10, 2006         -->
 <!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN"
  "task.dtd">
 <!-- 
@@ -29,54 +30,77 @@
 <steps>
 <step><cmd>Run the Derby IJ tool.</cmd><stepxmp><dl><dlentry>
 <dt>On Windows platforms:</dt>
-<dd><codeblock frame="topbot"><b><userinput>java -jar %DERBY_HOME%\lib\derbyrun.jar
ij</userinput></b>
-<i><systemoutput>ij version 10.2</systemoutput></i>
+<dd><codeblock frame="topbot"><b>java -jar %DERBY_HOME%\lib\derbyrun.jar
ij</b>
+
+<i>ij version 10.2</i>
 </codeblock></dd>
 </dlentry></dl><dl><dlentry>
 <dt>On UNIX Korn Shell platforms:</dt>
-<dd><codeblock frame="topbot"><b><userinput>java -jar $DERBY_HOME/lib/derbyrun.jar
ij</userinput></b>
-<i><systemoutput>ij version 10.2</systemoutput></i></codeblock></dd>
+<dd><codeblock frame="topbot"><b>java -jar $DERBY_HOME/lib/derbyrun.jar
ij</b>
+
+<i>ij version 10.2</i></codeblock></dd>
 </dlentry></dl></stepxmp></step>
 <step><cmd>Create the database and open a connection to it using the embedded
-driver.</cmd><stepxmp><codeblock frame="topbot"><b><userinput>CONNECT
'jdbc:derby:firstdb;create=true';</userinput></b></codeblock></stepxmp>
+driver.</cmd><stepxmp><codeblock frame="topbot"><b>CONNECT 'jdbc:derby:firstdb;create=true';</b></codeblock></stepxmp>
 </step>
 <step><cmd>Create a table with two columns using standard SQL.</cmd><stepxmp><codeblock
-frame="topbot"><b><userinput>CREATE TABLE FIRSTTABLE
+frame="topbot"><b>CREATE TABLE FIRSTTABLE
     (ID INT PRIMARY KEY,
-    NAME VARCHAR(12));</userinput></b>
-<i><systemoutput>0 rows inserted/updated/deleted</systemoutput></i></codeblock></stepxmp>
-</step>
-<step><cmd>Insert three records.</cmd><stepxmp><codeblock frame="topbot"><b><userinput>INSERT
INTO FIRSTTABLE VALUES 
-    (10,'TEN'),(20,'TWENTY'),(30,'THIRTY');</userinput></b>
-<i><systemoutput>3 rows inserted/updated/deleted</systemoutput></i></codeblock></stepxmp>
-</step>
+    NAME VARCHAR(12));</b>
+
+<i>0 rows inserted/updated/deleted</i></codeblock></stepxmp></step>
+<step><cmd>Insert three records.</cmd><stepxmp><codeblock frame="topbot"><b>INSERT
INTO FIRSTTABLE VALUES 
+    (10,'TEN'),(20,'TWENTY'),(30,'THIRTY');</b>
+
+<i>3 rows inserted/updated/deleted</i></codeblock></stepxmp></step>
 <step><cmd>Perform a simple select of all records in the table.</cmd><stepxmp><codeblock
-frame="topbot"><b><userinput>SELECT * FROM FIRSTTABLE;</userinput></b>
-<b></b><i><systemoutput> ID         |NAME
+frame="topbot"><b>SELECT * FROM FIRSTTABLE;</b>
+
+<i>     ID         |NAME
     ------------------------
     10         |TEN
     20         |TWENTY
     30         |THIRTY
 
-3 rows selected</systemoutput></i></codeblock></stepxmp></step>
+3 rows selected</i></codeblock></stepxmp></step>
 <step><cmd>Preform a qualified select of the record with column ID=20.</cmd>
-<stepxmp><codeblock frame="topbot"><b><userinput>SELECT * FROM FIRSTTABLE
-WHERE ID=20;</userinput>
-</b><i><systemoutput>    ID         |NAME
+<stepxmp><codeblock frame="topbot"><b>SELECT * FROM FIRSTTABLE
+WHERE ID=20;</b>
+
+<i>    ID         |NAME
     ------------------------
     20         |TWENTY
 
-1 row selected</systemoutput></i></codeblock></stepxmp></step>
-<step><cmd>Load the SQL script <userinput>toursDB.sql</userinput>
to create
-other tables and load data to work with (this step is optional).</cmd><stepxmp><codeblock
-frame="topbot"><b><userinput>run 'toursDB.sql';</userinput></b>
+1 row selected</i></codeblock></stepxmp></step>
+<step><cmd>Load the SQL script <userinput>ToursDB_schema.sql</userinput>
to
+create the tables and other schema objects (this step is optional).</cmd>
+<stepxmp><codeblock frame="topbot"><b>run 'ToursDB_schema.sql';</b>
+
+<i>ij> CREATE TABLE AIRLINES
+   (  AIRLINE CHAR(2) NOT NULL ,
+      AIRLINE_FULL VARCHAR(24),
+      BASIC_RATE DOUBLE PRECISION,
+   . . .
+0 rows inserted/updated/deleted
+   . . .
+
+<b><apiname>===> Other output messages not shown &lt;=====</apiname></b></i>
+</codeblock></stepxmp>
+<substeps>
+<substep><cmd>Populate the tables with data by running the script <userinput>loadTables.sql</userinput></cmd>
+<stepxmp><codeblock frame="topbot"><b>run 'loadTables.sql';</b>
 
-<i><systemoutput>0 rows inserted/updated/deleted
+<i>ij> run 'loadCOUNTRIES.sql';
+ij> insert into COUNTRIES values ( 'Afghanistan','AF','Asia');
+1 row inserted/updated/deleted
+ij> insert into COUNTRIES values ( 'Albania','AL','Europe');
 1 row inserted/updated/deleted
-</systemoutput>
+    . . .
 <b><apiname>===> Other output messages not shown &lt;=====</apiname></b></i>
-</codeblock></stepxmp></step>
-<step><cmd>Exit the IJ tool.</cmd><stepxmp><codeblock frame="topbot"><b><userinput>exit;</userinput></b>
+</codeblock></stepxmp></substep>
+</substeps>
+</step>
+<step><cmd>Exit the IJ tool.</cmd><stepxmp><codeblock frame="topbot"><b>exit;</b>
 </codeblock></stepxmp></step>
 <step><cmd>Browse the key files created by the activity.</cmd><stepxmp><ul>
 <li>The <b><filepath><varname>derby.log</varname></filepath></b>
message and

Modified: db/derby/docs/trunk/src/workingwithderby/twwdactivity1_Setup.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/workingwithderby/twwdactivity1_Setup.dita?rev=408786&r1=408785&r2=408786&view=diff
==============================================================================
--- db/derby/docs/trunk/src/workingwithderby/twwdactivity1_Setup.dita (original)
+++ db/derby/docs/trunk/src/workingwithderby/twwdactivity1_Setup.dita Mon May 22 16:22:26
2006
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
+<!--       File Edit date of Contribution:  May 10, 2006         -->
 <!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN"
  "task.dtd">
 <!-- 
@@ -35,39 +36,40 @@
 paths <userinput>C:\derby</userinput> for Windows examples and <userinput>/opt/derby</userinput>
for
 UNIX examples. Be sure to adjust these commands so <varname>DERBY_HOME</varname>
indicates
 the location of the Derby installation on the system being used. The following
-activity sequence show</p> </context>
+activity sequence shows</p> </context>
 <steps>
 <step><cmd>Setting the <varname>DERBY_HOME</varname> environment
variable.</cmd>
 </step>
 <step><cmd>Creating the <codeph>DERBYDBS</codeph> work directory</cmd></step>
 <step><cmd>Changing the directory (<userinput>cd</userinput>) to
the work
 directory</cmd></step>
-<step><cmd>Copying the <userinput>toursDB.sql</userinput> script
from the
-Derby <codeph>demo</codeph> subdirectory into the <codeph>DERBYDBS</codeph>
directory.</cmd>
+<step><cmd>Copying the SQL scripts that create the tables and data for toursdb
+from the Derby <codeph>demo\toursdb</codeph> subdirectory into the <codeph>DERBYDBS</codeph>
directory.</cmd>
 </step>
 </steps>
-</taskbody>
-<task id="activity_setup">
-<title>Setup Activities</title>
-<taskbody>
 <example>Open a command window and perform the following activity sequence:<dl>
 <dlentry>
 <dt>On Windows platforms:</dt>
-<dd><codeblock frame="topbot"><b><userinput>set DERBY_HOME=C:\derby</userinput>
-<userinput>md DERBYDBS</userinput>
-<userinput>cd DERBYDBS</userinput>
-<userinput>copy %DERBY_HOME%\demo\scripts\toursDB.sql . </userinput></b>
+<dd><codeblock frame="topbot"><b>set DERBY_HOME=C:\derby
+
+md DERBYDBS
+
+cd DERBYDBS
+
+copy %DERBY_HOME%\demo\toursdb\*.sql . </b>
 </codeblock></dd>
 </dlentry><dlentry>
 <dt>On UNIX Korn Shell platforms:</dt>
-<dd><codeblock frame="topbot"><b><userinput>export DERBY_HOME=/opt/derby</userinput>
-<userinput>mkdir DERBYDBS</userinput>
-<userinput>cd DERBYDBS</userinput>
-<userinput>cp $DERBY_HOME/demo/scripts/toursDB.sql . </userinput></b>
+<dd><codeblock frame="topbot"><b>export DERBY_HOME=/opt/derby
+
+mkdir DERBYDBS
+
+cd DERBYDBS
+
+cp $DERBY_HOME/demo/toursdb/*.sql . </b>
 </codeblock></dd>
 </dlentry></dl><note type="important">A command prompt will be displayed
after
 each command is executed. If an error is displayed please double check the
 spelling and reenter the command.</note></example>
 </taskbody>
-</task>
 </task>

Modified: db/derby/docs/trunk/src/workingwithderby/twwdactivity2.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/workingwithderby/twwdactivity2.dita?rev=408786&r1=408785&r2=408786&view=diff
==============================================================================
--- db/derby/docs/trunk/src/workingwithderby/twwdactivity2.dita (original)
+++ db/derby/docs/trunk/src/workingwithderby/twwdactivity2.dita Mon May 22 16:22:26 2006
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
+<!--       File Edit date of Contribution:  May 10, 2006         -->
 <!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN"
  "task.dtd">
 <!-- 
@@ -41,12 +42,14 @@
 and set the <varname>DERBY_HOME</varname> environment variable.</cmd></step>
 <step><cmd>Start the Network Server.</cmd><stepxmp><dl><dlentry>
 <dt>On Windows platforms:</dt>
-<dd><codeblock frame="topbot"><b><userinput>java -jar %DERBY_HOME%\lib\derbynet.jar
start</userinput></b>
-<i><systemoutput>Server is ready to accept connections on port 1527.</systemoutput></i></codeblock></dd>
+<dd><codeblock frame="topbot"><b>java -jar %DERBY_HOME%\lib\derbynet.jar
start</b>
+
+<i>Server is ready to accept connections on port 1527.</i></codeblock></dd>
 </dlentry></dl><dl><dlentry>
 <dt>On UNIX Korn Shell platforms:</dt>
-<dd><codeblock frame="topbot"><b><userinput>java -jar $DERBY_HOME/lib/derbynet.jar
start</userinput></b>
-<i><systemoutput>Server is ready to accept connections on port 1527.</systemoutput></i></codeblock></dd>
+<dd><codeblock frame="topbot"><b>java -jar $DERBY_HOME/lib/derbynet.jar
start</b>
+
+<i>Server is ready to accept connections on port 1527.</i></codeblock></dd>
 <dd></dd>
 </dlentry></dl></stepxmp><stepresult>A Network Server startup message
is displayed
 in the <codeph>Shell-1</codeph> command window.</stepresult></step>
@@ -55,57 +58,65 @@
 and set the <varname>DERBY_HOME</varname> environment variable.</cmd></step>
 <step><cmd>Start <codeph>ij</codeph>.</cmd><stepxmp><dl><dlentry>
 <dt>On Windows platforms:</dt>
-<dd><codeblock frame="topbot"><b><userinput>java -jar %DERBY_HOME%\lib\derbyrun.jar
ij</userinput></b>
-<i><systemoutput>ij version 10.2</systemoutput></i>
+<dd><codeblock frame="topbot"><b>java -jar %DERBY_HOME%\lib\derbyrun.jar
ij</b>
+
+<i>ij version 10.2</i>
 </codeblock></dd>
 </dlentry></dl><dl><dlentry>
 <dt>On UNIX Korn Shell platforms:</dt>
-<dd><codeblock frame="topbot"><b><userinput>java -jar $DERBY_HOME/lib/derbyrun.jar
ij</userinput></b>
-<i><systemoutput>ij version 10.2</systemoutput></i></codeblock></dd>
+<dd><codeblock frame="topbot"><b>java -jar $DERBY_HOME/lib/derbyrun.jar
ij</b>
+
+<i>ij version 10.2</i></codeblock></dd>
 </dlentry></dl></stepxmp><stepresult>All subsequent commands are
entered from
 the network client, and are therefore entered in the <codeph>Shell-2</codeph>
command
 window.</stepresult></step>
 <step><cmd>Create and open a connection to the database using the client driver.</cmd>
-<stepxmp><codeblock frame="topbot"><b><userinput>CONNECT 'jdbc:derby://localhost:1527/seconddb;create=true';</userinput>
+<stepxmp><codeblock frame="topbot"><b>CONNECT 'jdbc:derby://localhost:1527/seconddb;create=true';
 </b></codeblock><note type="remember">A client connection URL contains
a hostname
 and a port number: <codeph>//localhost:1527/</codeph>.</note></stepxmp></step>
 <step><cmd>Create a table with two columns (<codeph>ID</codeph> and
<codeph>NAME</codeph>)
-using SQL.</cmd><stepxmp><codeblock frame="topbot"><b><userinput>CREATE
TABLE SECONDTABLE
+using SQL.</cmd><stepxmp><codeblock frame="topbot"><b>CREATE TABLE
SECONDTABLE
     (ID INT PRIMARY KEY,
-    NAME VARCHAR(14));</userinput></b>
-<i><systemoutput>0 rows inserted/updated/deleted</systemoutput></i>
+    NAME VARCHAR(14));</b>
+
+<i>0 rows inserted/updated/deleted</i>
 </codeblock></stepxmp></step>
-<step><cmd>Insert three records into the table.</cmd><stepxmp><codeblock
frame="topbot"><b><userinput>INSERT INTO SECONDTABLE VALUES 
-    (100,'ONE HUNDRED'),(200,'TWO HUNDRED'),(300,'THREE HUNDRED');</userinput>
-</b><i><systemoutput>3 rows inserted/updated/deleted</systemoutput></i>
+<step><cmd>Insert three records into the table.</cmd><stepxmp><codeblock
frame="topbot"><b>INSERT INTO SECONDTABLE VALUES 
+    (100,'ONE HUNDRED'),(200,'TWO HUNDRED'),(300,'THREE HUNDRED');</b>
+
+<i>3 rows inserted/updated/deleted</i>
 </codeblock></stepxmp></step>
 <step><cmd>Select all of the records in the table.</cmd><stepxmp><codeblock
-frame="topbot"><b><userinput>SELECT * FROM SECONDTABLE;</userinput></b>
-<i><systemoutput>    ID         |NAME
+frame="topbot"><b>SELECT * FROM SECONDTABLE;</b>
+
+<i>    ID         |NAME
     ------------------------
     100        |ONE HUNDRED
     200        |TWO HUNDRED
     300        |THREE HUNDRED
 
-3 rows selected</systemoutput></i></codeblock></stepxmp></step>
+3 rows selected</i></codeblock></stepxmp></step>
 <step><cmd>Select a subset of records from the table by qualifying the command.</cmd>
-<stepxmp><codeblock frame="topbot">ij> <b><userinput>SELECT *
FROM SECONDTABLE WHERE ID=200;</userinput></b>
-<i><systemoutput>    ID         |NAME
+<stepxmp><codeblock frame="topbot">ij> <b>SELECT * FROM SECONDTABLE
WHERE ID=200;</b>
+
+<i>    ID         |NAME
     ------------------------
     200        |TWO HUNDRED
 
-1 row selected</systemoutput></i> </codeblock></stepxmp></step>
-<step><cmd>Exit <codeph>ij</codeph>.</cmd><stepxmp><codeblock
frame="topbot"><b><userinput>exit;</userinput></b></codeblock></stepxmp>
+1 row selected</i> </codeblock></stepxmp></step>
+<step><cmd>Exit <codeph>ij</codeph>.</cmd><stepxmp><codeblock
frame="topbot"><b>exit;</b></codeblock></stepxmp>
 </step>
 <step><cmd>Shut down the Derby Network Server.</cmd><stepxmp><dl><dlentry>
 <dt>On Windows platforms:</dt>
-<dd><codeblock frame="topbot"><b><userinput>java -jar %DERBY_HOME%\lib\derbynet.jar
shutdown</userinput></b>
-<i><systemoutput>Shutdown successful.</systemoutput></i>
+<dd><codeblock frame="topbot"><b>java -jar %DERBY_HOME%\lib\derbynet.jar
shutdown</b>
+
+<i>Shutdown successful.</i>
 </codeblock></dd>
 </dlentry></dl><dl><dlentry>
 <dt>On UNIX Korn Shell platforms:</dt>
-<dd><codeblock frame="topbot"><b><userinput>java -jar $DERBY_HOME/lib/derbynet.jar
shutdown</userinput></b>
-<i><systemoutput>Shutdown successful.</systemoutput></i>
+<dd><codeblock frame="topbot"><b>java -jar $DERBY_HOME/lib/derbynet.jar
shutdown</b>
+
+<i>Shutdown successful.</i>
 </codeblock></dd>
 </dlentry></dl></stepxmp><stepresult>The server shutdown confirmation
appears
 in both command windows.</stepresult></step>
@@ -121,11 +132,10 @@
 caused the Derby engine to be embedded in the <codeph>ij</codeph> application
 (an embedded configuration).</p><p>Network Server start up and shutdown messages
 are written to the <codeph>derby.log</codeph> log file along with the standard
-database engine messages. For example:<codeblock frame="topbot"><i><systemoutput>Server
is ready to accept connections on port 1527.</systemoutput
-></i>
+database engine messages. For example:<codeblock frame="topbot"><i>Server is
ready to accept connections on port 1527.</i>
    ...( database engine messages not shown )...
-<i><systemoutput>Shutdown successful.</systemoutput></i></codeblock></p><p>Though
-not demonstrated here, multiple client programs can connect to Network Server
-and access the database simultaneously in this configuration.</p></postreq>
+<i>Shutdown successful.</i></codeblock></p><p>Though not demonstrated
here,
+multiple client programs can connect to Network Server and access the database
+simultaneously in this configuration.</p></postreq>
 </taskbody>
 </task>

Modified: db/derby/docs/trunk/src/workingwithderby/twwdactivity3_Setup.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/workingwithderby/twwdactivity3_Setup.dita?rev=408786&r1=408785&r2=408786&view=diff
==============================================================================
--- db/derby/docs/trunk/src/workingwithderby/twwdactivity3_Setup.dita (original)
+++ db/derby/docs/trunk/src/workingwithderby/twwdactivity3_Setup.dita Mon May 22 16:22:26
2006
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
+<!--       File Edit date of Contribution:  May 10, 2006         -->
 <!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN"
  "task.dtd">
 <!-- 
@@ -41,19 +42,21 @@
 <step><cmd>Copy the program files into the <codeph>DERBYDBS</codeph>
directory
 and set the <varname>CLASSPATH</varname>:</cmd><stepxmp><dl><dlentry>
 <dt>On Windows platforms:</dt>
-<dd><codeblock frame="topbot"><b><userinput>copy %DERBY_HOME%\demo\workingwithderby\*
.
-set CLASSPATH=%DERBY_HOME%\lib\derby.jar;.</userinput></b>
+<dd><codeblock frame="topbot"><b>copy %DERBY_HOME%\demo\workingwithderby\*
.
+
+set CLASSPATH=%DERBY_HOME%\lib\derby.jar;.</b>
 </codeblock></dd>
 </dlentry><dlentry>
 <dt>On UNIX Korn Shell platforms:</dt>
-<dd><codeblock frame="topbot"><b><userinput>cp $DERBY_HOME/demo/workingwithderby/*
.
-export CLASSPATH=$DERBY_HOME/lib/derby.jar:.</userinput></b>
+<dd><codeblock frame="topbot"><b>cp $DERBY_HOME/demo/workingwithderby/*
.
+
+export CLASSPATH=$DERBY_HOME/lib/derby.jar:.</b>
 </codeblock></dd>
 </dlentry></dl><note type="important">Include the dot (<b>.</b>)
at the end
 of each command so that your current working directory is included in the <varname>CLASSPATH</varname>
and
 the files are copied to the correct location.</note></stepxmp></step>
 <step><cmd>Compile the <codeph>WwdEmbedded.java</codeph> program:</cmd><stepxmp><codeblock
-frame="topbot"><b><userinput>javac WwdEmbedded.java</userinput></b>
+frame="topbot"><b>javac WwdEmbedded.java</b>
 </codeblock><note type="important">Only a command prompt will be displayed
 if the compilation is successful. The binary file <codeph>WwdEmbedded.class</codeph>
will
 be created. If an error is displayed please verify that the Java development
@@ -65,27 +68,33 @@
 will continue to ask for wish list items until the word <userinput>exit</userinput>
is
 entered or a problem is encountered. Some basic information on program progress
 is displayed at the beginning and the end of the program.</info><stepxmp><codeblock
-frame="topbot"><b><userinput>java WwdEmbedded</userinput></b>
-<i><systemoutput>org.apache.derby.jdbc.EmbeddedDriver loaded.
+frame="topbot"><b>java WwdEmbedded</b>
+
+<i>org.apache.derby.jdbc.EmbeddedDriver loaded.
 Connected to database jdbcDemoDB
  . . . . creating table WISH_LIST
-Enter wish-list item (enter exit to end):</systemoutput></i>
-<b><userinput>a peppermint stick</userinput></b>
-<i><systemoutput>  _________________________________________________________
+
+Enter wish-list item (enter exit to end):</i>
+<b>a peppermint stick</b>
+
+<i>  _________________________________________________________
 On 2006-09-21 15:11:50.412 I wished for a peppermint stick
   ________________________________________________________
-Enter wish-list item (enter exit to end):</systemoutput></i>
-<b><userinput>an all expenses paid vacation</userinput></b>
-<i><systemoutput>  ________________________________________________________
+
+Enter wish-list item (enter exit to end):</i>
+<b>an all expenses paid vacation</b>
+
+<i>  ________________________________________________________
 On 2006-09-21 15:11:50.412 I wished for a peppermint stick
 On 2006-09-21 15:12:47.024 I wished for an all expenses paid vacation
   ________________________________________________________
-Enter wish-list item (enter exit to end):</systemoutput></i>
-<b><userinput>exit</userinput></b>
-<i><systemoutput>Closed connection
+
+Enter wish-list item (enter exit to end):</i>
+<b>exit</b>
+
+<i>Closed connection
 Database shut down normally
-Working With Derby JDBC program ending.</systemoutput></i></codeblock></stepxmp>
-</step>
+Working With Derby JDBC program ending.</i></codeblock></stepxmp></step>
 </steps>
 </taskbody>
 </task>

Added: db/derby/docs/trunk/src/workingwithderby/twwdactivity4.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/workingwithderby/twwdactivity4.dita?rev=408786&view=auto
==============================================================================
--- db/derby/docs/trunk/src/workingwithderby/twwdactivity4.dita (added)
+++ db/derby/docs/trunk/src/workingwithderby/twwdactivity4.dita Mon May 22 16:22:26 2006
@@ -0,0 +1,181 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--       File Edit date of Contribution:  May 10, 2006         -->
+<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN"
+ "task.dtd">
+<!-- 
+Copyright 2006 The Apache Software Foundation or its licensors, as applicable.  
+
+Licensed under the Apache License, Version 2.0 (the "License");  
+you may not use this file except in compliance with the License.  
+You may obtain a copy of the License at      
+
+http://www.apache.org/licenses/LICENSE-2.0  
+
+Unless required by applicable law or agreed to in writing, software  
+distributed under the License is distributed on an "AS IS" BASIS,  
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  
+See the License for the specific language governing permissions and  
+limitations under the License.
+-->
+<task id="twwdactivity4" rev="1.0" xml:lang="en-us">
+<title>Activity 4: Create and run a JDBC program using the Client driver and
+Network Server</title>
+<shortdesc>This section demonstrates the ease with which a program that embeds
+Derby can be modified for a client / server implementation using the Derby
+Network Server. A Derby client program, <codeph>WwdClient.java</codeph>, is
+created by changing a few lines of the <codeph>WwdEmbedded.java</codeph> program.
+The client program can be run in multiple command shells allowing simultaneous
+update from two or more sources.</shortdesc>
+<prolog><metadata>
+<keywords><indexterm>WwdClient.java<indexterm>org.apache.derby.jdbc.ClientDriver</indexterm></indexterm>
+</keywords>
+</metadata></prolog>
+<taskbody>
+<prereq>This activity assumes you have performed the preceding activities
+and so have a working directory called <codeph>DERBYDBS</codeph>, are familiar
+with setting the <varname>DERBY_HOME</varname> and <varname>CLASSPATH</varname>
environment
+variables and have copies of the program files from the <varname>DERBY_HOME/demo/workingwithderby/</varname>
directory.
+A basic knowledge of the <codeph>WwdEmbedded.java</codeph> program and experience
+starting and connecting to Network Server is helpful. You will need to use
+a text editor to create the <codeph>WwdClient.java</codeph> program.</prereq>
+<context>Two command windows (<codeph>Server-Shell</codeph> and <codeph>Client-Shell</codeph>)
+are used in this activity. The <codeph>Server-Shell</codeph> is used to start
+the Derby Network Server and display Network Server messages. The <codeph>Client-Shell</codeph>
is
+used to edit, compile and run the newly created <codeph>WwdClient.java</codeph>
program.
+The <varname>CLASSPATH</varname> environment variable is set in <codeph>Client-Shell</codeph>
to
+support the client JDBC program.<p><b>Creating the WwdClient program</b></p></context>
+<steps>
+<step><cmd>Open a command window that we'll call the <codeph>Client-Shell</codeph>.
+Change directory (<userinput>cd</userinput>) to the <codeph>DERBYDBS</codeph>
directory.</cmd>
+</step>
+<step><cmd>Make a copy of the <codeph>WwdEmbedded.java</codeph> program
called <codeph>WwdClient.java</codeph></cmd>
+<stepxmp><dl><dlentry>
+<dt>On Windows platforms:</dt>
+<dd><codeblock frame="topbot"><b>copy WwdEmbedded.java WwdClient.java</b>
+</codeblock></dd>
+</dlentry></dl><dl><dlentry>
+<dt>On UNIX Korn Shell platforms:</dt>
+<dd><codeblock frame="topbot"><b>cp WwdEmbedded.java WwdClient.java</b>
+</codeblock></dd>
+</dlentry></dl></stepxmp></step>
+<step><cmd>Open the <codeph>WwdClient.java</codeph> file in your
favorite
+text editor and update the class name to reflect the new filename:</cmd><stepxmp><codeblock
+frame="topbot"><b>Original declaration</b>
+     public class WwdEmbedded
+
+<b>New declaration</b>
+     public class <b>WwdClient</b>
+</codeblock></stepxmp></step>
+<step><cmd>Edit the <cite>DEFINE VARIABLES SECTION</cite> of the
program so
+the <varname>driver</varname> variable contains the name of the Derby Client
+Driver class and the <varname>connectionURL</varname> variable contains the
+hostname and a port number of the Network Server.</cmd><stepxmp><codeblock
+frame="topbot"><b>Original definitions</b>
+     String driver = "org.apache.derby.jdbc.EmbeddedDriver";
+     String dbName="jdbcDemoDB";
+     String connectionURL = "jdbc:derby:" + dbName + ";create=true";
+
+<b>New definitions</b>
+     String driver = <b>"org.apache.derby.jdbc.ClientDriver"</b>;
+     ...
+     String connectionURL = <b>"jdbc:derby://localhost:1527/"</b> + dbName +
";create=true";
+</codeblock></stepxmp></step>
+<step><cmd>Compile the application.</cmd><stepxmp><codeblock frame="topbot"><b>javac
WwdClient.java</b>
+</codeblock><note type="important">Only a command prompt will be displayed
+if the compilation is successful. The binary file <codeph>WwdClient.class</codeph>
will
+be created. If a syntax error is displayed modify the line indicated so it
+is identical to the example.</note></stepxmp><info><p>That's all
there is
+to it.</p></info></step>
+</steps>
+<example><title>Setting up the client / server environment</title>Before
running
+the <codeph>WwdClient</codeph> program the Network Server needs to be started.
+To do this open a command window that we'll call the <codeph>Server-Shell</codeph>.
+Change directory (<userinput>cd</userinput>) to the <codeph>DERBYDBS</codeph>
directory
+and set the <varname>DERBY_HOME</varname> environment variable. Start the
+Network Server:<dl><dlentry>
+<dt>On Windows platforms:</dt>
+<dd><codeblock frame="topbot"><b>java -jar %DERBY_HOME%\lib\derbynet.jar
start</b>
+
+<i>Server is ready to accept connections on port 1527.</i></codeblock></dd>
+</dlentry></dl><dl><dlentry>
+<dt>On UNIX Korn Shell platforms:</dt>
+<dd><codeblock frame="topbot"><b>java -jar $DERBY_HOME/lib/derbynet.jar
start</b>
+
+<i>Server is ready to accept connections on port 1527.</i></codeblock></dd>
+</dlentry></dl><title>Running the client program</title><p>Return
to the <codeph>Client-Shell</codeph> window.
+If not already defined set the <varname>DERBY_HOME</varname> environment variable.
+Next set the <varname>CLASSPATH</varname> environment variable to include
+the location of the file <codeph>derbyclient.jar</codeph>:<dl><dlentry>
+<dt>On Windows platforms:</dt>
+<dd><codeblock frame="topbot"><b>set CLASSPATH=%DERBY_HOME%\lib\derbyclient.jar;.</b>
+</codeblock></dd>
+</dlentry></dl><dl><dlentry>
+<dt>On UNIX Korn Shell platforms:</dt>
+<dd><codeblock frame="topbot"><b>export CLASSPATH=$DERBY_HOME/lib/derby.jar:.</b>
+</codeblock></dd>
+</dlentry></dl><note type="important">Include the dot (<b>.</b>)
at the end
+of the command so that your current working directory is included in the <varname>CLASSPATH</varname>.</note><dl>
+<dlentry>
+<dt>Run the client program:</dt>
+<dd><codeblock frame="topbot"><b>java WwdClient</b>
+
+<i>org.apache.derby.jdbc.ClientDriver loaded.
+Connected to database jdbcDemoDB
+
+Enter wish-list item (enter exit to end):</i>
+<b>a sunny day</b>
+
+<i>  _________________________________________________________
+On 2006-09-21 15:11:50.412 I wished for a peppermint stick
+On 2006-09-21 15:12:47.024 I wished for an all expenses paid vacation
+On 2006-09-22 10:08:21.167 I wished for a sunny day
+  ________________________________________________________
+
+Enter wish-list item (enter exit to end):</i>
+<b>a new car</b>
+
+<i>  ________________________________________________________
+On 2006-09-21 15:11:50.412 I wished for a peppermint stick
+On 2006-09-21 15:12:47.024 I wished for an all expenses paid vacation
+On 2006-09-22 10:08:21.167 I wished for a sunny day
+On 2006-09-22 10:08:33.665 I wished for a new car
+  ________________________________________________________
+
+Enter wish-list item (enter exit to end):</i>
+<b>exit</b>
+
+<i>Closed connection
+Working With Derby JDBC program ending.</i></codeblock></dd>
+</dlentry></dl></p></example>
+<postreq><b>Activity notes</b><p>In a client / server environment
the client
+program is often used from other computers on the network. Whenever a system
+accepts connections from other computers there is a chance for abuse. To maintain
+security the Derby Network Server defaults to only accepting connections from
+clients running on the local machine (<codeph>localhost</codeph>). Before
+this or any other Derby client program can access Network Server from another
+machine additional steps should be taken to secure the Network Server environment.
+Once secured the Network Server can be safely configured it to accept connections
+from other machines. Refer the <cite>Network Server security</cite> and <cite>Running
+the Network Server under the security manager</cite> sections of the <cite>Derby
+Server and Administration Guide</cite> for important information on securing
+the Network Server and enabling network connections.</p><p>With Network Server
+started you can run the client program simultaneously in multiple windows.
+To demonstrate this open two command windows and perform the steps of the <cite>Running
+the client program</cite> section in each window. Both clients will operate
+without a problem. In contrast it would not be possible for a program that
+uses the embedded driver (e.g. <codeph>WwdEmbedded</codeph>) to access the
+database until the database or the Network Server is shutdown. </p><p>You
+may have noticed that the client program does not shutdown the database. This
+is because the database is a shared resource in a client / server environment
+and, in most cases, should only be shutdown when the Server is shutdown. If
+multiple clients are accessing the database and one shuts down the database
+the remaining clients will encounter a failure the next time they attempt
+an SQL command.</p><p>Derby's two architectures have caused confusion for
+some new Derby users. They mistakenly think that embedded is a single user
+configuration. This is not true. The embedded driver supports multiple simultaneous
+connections, performs locking and provides performance, integrity and recoverability.
+Any application using the embedded driver can open multiple Derby connections
+and then provide a means for multiple users to interact with the database
+on each connection. The Derby Network Server is an example of such an application.</p></postreq>
+</taskbody>
+</task>

Propchange: db/derby/docs/trunk/src/workingwithderby/twwdactivity4.dita
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message