RDB Tutorial

This document walks you through the relational database (RDB) open source features in the Eclipse Web Tooling Project.  You must have either the RDB open source binaries or the source code downloaded from the Eclipse Web site.


The supported features include the following:


Connection Wizard – Create a live connection to the database server using the JDBC driver.

Data Output view – View the messages, parameters, and results that are related to the database objects that you work with.

Database Explorer – Support the live view of database server elements including tables, views, stored procedures, and user-defined functions. In the Database Explorer, you can also view a database sever in an offline mode.

Data Browse – Browse table content from the connected database server.

SQL Scrapbook – A SQL utility/editor which can be used to construct SQL commands to be executed to a connected server in the Database Explorer.


Opening the RDB related view

Click Window -> Show View -> Others -> Data, then select Data Output and Database Explorer.




Creating a new connection using the Connection wizard


To create a new connection using the Connection wizard:


  1. In the Database Explorer window, click the New Connection toolbar button.
  2. Select the database that you would like to connect to, and fill in the JDBC connection information.

Note: The Test Connection and Next buttons will not show up unless all of the required information has been filled in.


·        To connect to a Derby database:



·        To connect to the SQL Server 2000 database:

Note:  If you are connecting to SQL Server 2000 using the MS JDBC driver, you must specify the path to the three required jar files (for example, mssqlserver.jar, msbase.jar, and msutil.jar).


3.   Click Test Connection.



  1. Click OK to close the confirmation window, then click Next.
  2. Set filters as appropriate.  You can also filter after the connection is made.

    In a future milestone, you will be able to filter schemas, tables, views, stored procedures, and so on, from the folder in your Database Explorer.
  3. Click Finish.


In the Database Explorer, expand the Server node and view the folders for schemas, tables, views, stored procedures, and so on.



Reconnecting to a server from the Database Explorer

From the Database Explorer, you can reconnect to a server.  Right-click on the disconnected server, and select Reconnect.



Work offline in Database Explorer:

To save a new object in the Database Explorer, right-click a server connection, and select Save Offline.  Currently, the Database Explorer only supports read-only mode.  You can get read/write mode by generating a DDL to run on the database Server.



Browse Data feature


To browse data:

In the Database Explorer, right-click a table, and select Data -> Sample Contents.



Here is an example of a result set of a table with data:


Opening the SQL Scrapbook

To open the SQL Scrapbook, you must have a project and a folder created.  You can open the SQL Scrapbook in two different ways:


  1. From the Database Explorer, click the Open SQL Scrapbook icon.

  2. Choose a connection to associate your scrapbook with.

  3. Specify a folder name and a name for your sqlpage file.


  1. Select the folder.
  2. Click File -> New -> Other, expand the Data node and click SQL Scrapbook Page.

  1. Click Next.
  2. Type a name for your sqlpage file.  For example, CreateTable.sqlpage.
  3. Click Finish. The SQL Scrapbook opens in the editor area.
  4. Right-click in a blank space in the SQL Scrapbook and select Use Database Connection. The Connection Selection window opens.  

  5. Select a server, and click OK.

You can now start typing a SQL statement in the SQL scrapbook.  For example,

Create table APP.Parent (col1 integer not null, col2 char(11), primary key(col1))

To run the SQL, click Run > Run SQL from the main menu.



After you run the SQL, the view is automatically refreshed.  If you want to manually refresh the view, right-click the folder in the Database Explorer, and select Refresh.