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.
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:
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.
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:
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:
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
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.