In this first exercise, you will open and explore the SQL
and Routine Development perspective. This perspective in the workbench
is where you do all of your work in this tutorial.
The SQL and Routine Development perspective consists of several
default views, including:
- Data Project Explorer
- Data Source Explorer
- Properties view
- SQL Results view
As with any perspective in the workbench, you can customize the
perspective to include other views or exclude these or other default
views. Refer to the
Eclipse basic tutorial for more information about
views and editors and for instructions about how to customize your
environment. In this tutorial you will use the SQL and Routine Development
perspective default views.
To set up your environment:
Open the SQL and Routine Development perspective, if it
is not already open.- From the main toolbar, click . The Task Navigator allows you to quickly
switch between perspectives as you perform different categories of
tasks in the product.
The SQL and Routine Development perspective opens with
the default views.
The
Data Project Explorer appears by default in the top left area. This
explorer view is where you create data development projects. A data
development project is associated with a database connection. You
use data development projects to create and store application development
objects, such as routines and queries. In later lessons you will create
a data development project and create some basic artifacts. If you
have not previously created any data projects in the current workspace,
the Data Project Explorer is blank. The following screen capture shows
the Data Project Explorer with a sample project already created.

The Data Source Explorer appears by default in the
bottom left area. This explorer view contains connections to found
databases. If you have previously created and configured the DB2® SAMPLE database, it is displayed
(disconnected) in the Data Source Explorer. Other discovered databases
are also displayed. The following screen capture shows an example
of the Data Source Explorer with some existing connections. Your Data
Source Explorer might look slightly different, depending on whether
you have previously created any database connections.

The
Data Source Explorer is a live snapshot of a database connection and
the objects that are contained in the database. There are two main
functions of the Data Source Explorer:
- You can use the Data Source Explorer to browse data objects and
view their properties, or use the underlying model to create development
artifacts in a data development project. When you create a new data
development project, you specify a connection with which to associate
the project, and the editors and wizards that you use to create artifacts
such as routines and queries use the database model from this connection.
After you create a data development project, you can also copy and
paste or drag and drop some objects (such as stored procedures) from
the Data Source Explorer to the project, for further editing.
- You can also open wizards and editors from the Data Source Explorer
to modify data objects, the data that is contained in a database,
or privileges, by generating and running DDL scripts. These actions
are typically performed by database administrators.
On the bottom right portion of the perspective is a tabbed
area containing several views. These views typically open automatically
when you perform certain actions in the workbench, or you can click
or double-click a view to see its contents. The SQL Results view displays
the results when you perform database actions, for example running
a routine or a query. The Properties view displays the properties
of highlighted objects in the Data Source Explorer. Other views open
as needed when you perform certain tasks in the workbench.
The
following screen capture shows the Properties view when the SAMPLE
connection is selected in the Data Source Explorer.