File: dbmanager.xml

package info (click to toggle)
hsqldb 1.8.0.7-1etch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 11,824 kB
  • ctags: 11,226
  • sloc: java: 71,953; xml: 10,832; sql: 1,038; sh: 875; makefile: 58
file content (293 lines) | stat: -rw-r--r-- 13,327 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id: dbmanager.xml,v 1.13 2006/07/27 21:08:21 fredt Exp $ -->
<appendix>
  <title>Database Manager</title>

  <appendixinfo>
    <authorgroup>
      <author>
        <firstname>Fred</firstname>

        <surname>Toussi</surname>

        <affiliation>
          <orgname>HSQLDB Development Group</orgname>
        </affiliation>

        <email>ft@cluedup.com</email>
      </author>

      <author>
        <firstname>Blaine</firstname>

        <surname>Simpson</surname>

        <affiliation>
          <orgname>HSQLDB Development Group</orgname>
        </affiliation>

        <email>ft@cluedup.com</email>
      </author>
    </authorgroup>

    <edition>$Revision: 1.13 $</edition>

    <pubdate>$Date: 2006/07/27 21:08:21 $</pubdate>

    <keywordset>
      <keyword>Hsqldb</keyword>

      <keyword>Database</keyword>

      <keyword>Manager</keyword>
    </keywordset>
  </appendixinfo>

  <section>
    <title>Brief Introduction</title>

    <para>The Database Manager tool is a simple GUI database query tool with a
    tree display of the tables. Both AWT and SWING versions of the tool are
    available and work almost identically. The AWT version class name is
    org.hsqldb.util.DatabaseManager; the SWING version,
    org.hsqldb.util.DatabaseManagerSwing.</para>

    <para>The AWT version of the database manager can be deployed as an applet
    in a browser. A demo HTML file with an embedded Database Manager is
    included in the /demo directory.</para>

    <para>When the Database Manager is started, a dialogue allows you to enter
    the JDBC driver, URL, user and password for the new connection. A
    drop-down box, Type, offers preset values for JDBC driver and URL for most
    popular database engines, including HSQLDB. Once you have selected an item
    from this drop-down box, you should edit the URL to specify the details of
    the database or any additional properties to pass. You should also enter
    the username and password before clicking on the OK button.</para>

    <para>The connection dialogue allows you to save the settings for the
    connection you are about to make. You can then access the connection in
    future sessions. To save a connection setting, enter a name in the Setting
    Name box before clicking on the OK button. Next time the connection
    dialogue is displayed, the drop-down box labeled Recent will include the
    name for all the saved connection settings. When you select a name, the
    individual settings are displayed in the appropriate boxes.</para>

    <para>The small Clr button next to the drop-down box allows you to clear
    all the saved settings. If you want to modify an existing setting, first
    select it from the drop-down box then modify any of the text boxes before
    making the connection. The modified values will be saved.</para>

    <simpara>Most menu items have context-sensitive tool tip help text which
    will appear if you hold the mouse cursor still over the desired menu item.
    (Assuming that you don't turn Tooltips off under the
    <guimenu>Help</guimenu> menu.</simpara>

    <simpara>The DatabaseManagers do work with HSQLDB servers serving
    TLS-encrypted JDBC data. See the <link endterm="tls-title"
    linkend="tls-chapter" /> chapter and the <link endterm="auth-title"
    linkend="auth-section" /> section of this Guide.</simpara>

    <tip>
        If you are using DatabaseManagerSwing with Oracle, you will want
        to make sure that <guimenuitem>Show row counts</guimenuitem>
        and <guimenuitem>Show row counts</guimenuitem> are both off
        <emphasis>before connecting to the database</emphasis>.
        You may also want to turn off Auto tree-update, as described in
        the next section.
    </tip>
  </section>

  <section>
    <title>Auto tree-update</title>

    <simpara>By default, the object tree in the left panel is refreshed when
    you execute DDL which may update those objects. If you are on a slow
    network or performance-challenged PC, use the <guimenu>view</guimenu> /
    <guimenuitem>Auto-refresh tree</guimenuitem> menu item to turn it off. You
    will then need to use the <guimenu>view</guimenu><guimenuitem>Refresh
    tree</guimenuitem> menu item every time that you want to refresh the
    tree.</simpara>

    <note>
      <simpara>Auto-refresh tree does not automatically show all updates to
      database objects, it only refreshes when you submit DDL which may update
      database objects. (This behavior is a compromise between utility and
      performance).</simpara>
    </note>
  </section>

  <section>
    <title>Automatic Connection</title>

    <para>You can use command-line switches to supply connection information.
    If you use these switch(es), then the connection dialog window will be
    skipped and a JDBC connection will be established immediately. Assuming
    that the hsqldb.jar (or an alternative jar) are in your CLASSPATH, this
    command will list the available command-line options. <informalexample>
        <screen>
    java org.hsqldb.util.DatabaseManagerSwing --help</screen>
      </informalexample></para>

    <simpara>It's convenient to skip the connection dialog window if you
    always work with the same database account.</simpara>

    <warning>
      <simpara>Use of the --password switch is not secure. Everything typed on
      command-lines is generally available to other users on the computer. The
      problem is compounded if you use a network connection to obtain your
      command line. The RC File section explains how you can set up automatic
      connections without supplying a password on the command line.</simpara>
    </warning>
  </section>

  <section>
    <title>RC File</title>

    <simpara>You can skip the connection dialog window securely by putting the
    connection information into an RC file and then using the
    <literal>--urlid</literal> switch to DatabaseManager or
    DatabaseManagerSwing. This strategy is great for adding launch menu items
    and/or launch icons to your desktop. You can set up one icon for each of
    the database accounts which you regularly use.</simpara>

    <simpara>The default location for the RC file is
    <filename>dbmanager.rc</filename> in your home directory. The <link
    endterm="auth-title" linkend="auth-section" /> section explains how to put
    the connection information into this text file. If you also run <link
    endterm="sqltool-title" linkend="sqltool-chapter" />, then you can share
    the RC file with SqlTool by using a sym-link (if your operating system
    supports sym links), or by using the <literal>--rcfile</literal> switch
    for either SqlTool or DatabaseManagerSwing.</simpara>

    <warning>
      <simpara>Use your operating system facilities to prevent others from
      reading your RC file, since it contains passwords.</simpara>
    </warning>

    <para>To set up launch items/icons, first experiment on your command line
    to find exactly what command works. For example, <informalexample>
        <screen>
    java -cp /path/to/hsqldb.jar org.hsqldb.util.DatabaseManagerSwing --urlid mem</screen>
      </informalexample> Then, use your window manager to add an item that
    runs this command.</para>
  </section>

  <section>
    <title>Using the current DatabaseManagers with an older HSQLDB
    distribution.</title>

    <simpara>This procedure will allow users of a legacy version of HSQLDB to
    use all of the new features of the DatabaseManagers. You will also get the
    new version of the SqlTool! This procedure works for distros going back to
    1.7.3.3 at least, probably much farther.</simpara>

    <simpara>These instructions assume that you are capable of running an Ant
    build. See the <link endterm="building-title"
    linkend="building-appendix" /> chapter.</simpara>

    <procedure>
      <step>
        <simpara>Download and extract a current HSQLDB distribution. If you
        don't want to use the source code, documentation, etc., you can use a
        temporary directory and remove it afterwards.</simpara>
      </step>

      <step>
        <simpara>Cd to the build directory under the root directory where you
        extracted the distribution to.</simpara>
      </step>

      <step>
        <simpara>Run <literal>ant hsqldbutil</literal>.</simpara>
      </step>

      <step>
        <simpara>If you're going to wipe out the build directory, copy
        <filename>hsqldbutil.jar</filename> to a safe location
        first.</simpara>
      </step>

      <step>
        <simpara>For now on, whenver you are going to run DatabaseManager*,
        make sure that you have this <filename>hsqldbutil.jar</filename> as
        the first item in your CLASSPATH.</simpara>
      </step>
    </procedure>

    <para>Here's a UNIX example where somebody wants to use the new
    DatabaseManagerSwing with their older HSQLDB database, as well as with
    Postgresql and a local application. <informalexample>
        <screen>
CLASSPATH=/path/to/hsqldbutil.jar:/home/bob/myapp/classes:/usr/local/lib/pg.jdbc3.jar
export CLASSPATH
java org.hsqldb.util.DatabaseManagerSwing --urlid urlid</screen>
      </informalexample></para>
  </section>

  <section>
      <title>DatabaseManagerSwing as an Applet</title>
      <simpara>
          DatabaseManagerSwing is also an applet.
          You can use it in HTML, JSPs, etc.
          Be aware that in Applet mode, actions to load or save local files
          will be disabled, and attempts to access any server other than 
          the HTML-serving-host will be fail.
      </simpara>
      <para>
          Since the Applet can not store or load locally saved preferences,
          the only way to have persistent preference settings is by using
          Applet parameters.
          <variablelist><title>DatabaseManagerSwing Applet Parameters</title>
              <varlistentry><term>jdbcUrl</term><listitem><simpara>
                  URL of a data source to auto-connect to.  String value.
              </simpara></listitem></varlistentry>
              <varlistentry><term>jdbcDriver</term><listitem><simpara>
                  URL of a data source to auto-connect to.  String value.
                  Defaults to <literal>org.hsqldb.jdbcDriver</literal>.
              </simpara></listitem></varlistentry>
              <varlistentry><term>jdbcUser</term><listitem><simpara>
                  User name for data source to auto-connect to.  String value.
              </simpara></listitem></varlistentry>
              <varlistentry><term>jdbcPassword</term><listitem><simpara>
                  Password for data source to auto-connect to.  String value.
                  Defaults to zero-length string.
              </simpara></listitem></varlistentry>
              <varlistentry><term>schemaFilter</term><listitem><simpara>
                  Display only object from this schema in the object navigator.
                  String value.
              </simpara></listitem></varlistentry>
              <varlistentry><term>laf</term><listitem><simpara>
                  Look-and-feel.  String value.
              </simpara></listitem></varlistentry>
              <varlistentry><term>loadSampleData</term><listitem><simpara>
                  Auto-load sample data.  Boolean value.
                  Defaults to false.
              </simpara></listitem></varlistentry>
              <varlistentry><term>autoRefresh</term><listitem><simpara>
                  Auto-refresh the object navigator when DDL modifications
                  detected in user SQL commands.  Boolean value.
                  Defaults to true.
              </simpara></listitem></varlistentry>
              <varlistentry><term>showRowCounts</term><listitem><simpara>
                  Show number of rows in each table in the object navigator.
                  Boolean value.  Defaults to false.
              </simpara></listitem></varlistentry>
              <varlistentry><term>showSysTables</term><listitem><simpara>
                  Show system tables in the object navigator.  Boolean value.
                  Defaults to false.
              </simpara></listitem></varlistentry>
              <varlistentry><term>showSchemas</term><listitem><simpara>
                  Show object names like schema.name in object navigator.
                  Boolean value.  Defaults to true.
              </simpara></listitem></varlistentry>
              <varlistentry><term>resultGrid</term><listitem><simpara>
                  Show query results in Gui grid (as opposed to in plain text).
                  Boolean value.  Defaults to true.
              </simpara></listitem></varlistentry>
              <varlistentry><term>showToolTips</term><listitem><simpara>
                  Show help hover-text.  Boolean value.  Defaults to true.
              </simpara></listitem></varlistentry>
          </variablelist>
      </para>
  </section>
</appendix>