DTP Connectivity: Data Source Explorer

Design Document

Version 0.5

10/19/2005

Brian Fitzpatrick

Table of Contents

1.     Introduction. 2

2.     Requirements. 2

3.     High-Level Design. 2

3.1       Background. 2

3.1.1        WST’s Database Explorer 2

3.1.2        Sybase WorkSpace’s Enterprise Explorer 4

3.2       Data Source Explorer 6

3.2.1        The Interface. 6

3.2.2        Menu/Toolbar Actions. 8

3.3       Dependencies. 9

3.4       Tasks. 9

3.4.1        Create new Data Source Explorer view based on either Platform or WTP extensible navigator. 10

3.4.2        Create a Generic JDBC profile. 10

3.4.3        Create a SQL/Database Model sub-profile. 11

3.4.4        Create DSE actions. 11

3.4.5        Create DSE filters. 12

3.4.6        Create DSE drag/drop capabilities. 12

3.5       Additional Notes. 12

3.5.1        SQL Model Content/Label Providers. 12

3.5.2        Common Components. 13

 


1.     Introduction

The purpose for this document is to describe the high-level design of the Data Source Explorer for the DTP Connectivity project.

2.     Requirements

The Data Source Explorer (DSE) should:

1)      Display a list of connection profile (CP) instances.

2)      When a CP is connected…

a)      Surface capabilities of the CP (via context and view menu contributions and toolbar contributions).

b)      Display data source content (such as lists of stored procedures, functions, events, tables, etc. for a database).

3)      Serve as a mediator for drag and drop calls:

a)      Dragging within the DSE (from one profile to another)

b)      Dragging from the DSE to an outside target (such as to a view or editor)

c)      Dragging from an outside source to a target inside the DSE

4)      Facilitate import and export of CP instances and driver instances

5)      Be extensible to support non-database CP if required by other projects

3.     High-Level Design

3.1     Background

3.1.1     WST’s Database Explorer

The current Database Explorer view that is contributed as part of the WST project provides a method of creating a connection to a database and displaying detailed information about that database. The screen shot below shows an example that is connected to a local Sybase ASA database.

As you can see, the tree provides the following:

3.1.2     Sybase WorkSpace’s Enterprise Explorer

The Enterprise Explorer that is part of the Sybase WorkSpace product also provides a method for connecting to a database and retrieving a list of stored procedures. The screen shot below shows an example that is connected to a local Sybase ASA database. The following is representative of what the initial contribution for the Data Source Explorer was. It is intended that this contribution be updated to reflect the above requirements and to bring it in line with the capabilities of the WST Data Explorer.

As you can see, the tree provides the following:

For each JDBC profile, we provide:

Note: Though I suspect that the ability to inspect multiple databases in certain DBMS systems is supported by the SQL model (via extending the base database model), the old version of the Database Explorer from WTP requires you connect to a specific database and I can’t determine if it is flexible enough to provide a list of databases and their resulting data trees. We will hold an additional meeting to determine if this support can be added, as Sybase ASE is not the only database that will need this functionality.

3.2     Data Source Explorer

The Data Source Explorer is the main interface through which the user will be interacting with other components in the DTP Connectivity project. It will provide a method to create, maintain, and interact with connection profiles (just databases initially, though the framework can support other types of connections) in a single Eclipse view.

3.2.1     The Interface

The Data Source Explorer (DSE) will be composed of a single Eclipse view (accessible through the Window -> Show View menu or through a perspective that opens the view automatically). The view’s tree will show a hierarchy of categories, connection profiles, and database/SQL model information.

Question: Are we supporting refactoring of model objects? For example, if a user wants to copy a table or stored procedure from one database to another, do we support this? If not, what sort of refactoring will we support?

A sample tree might look something like the following:

3.2.1.1     Node Types

The following node types would be important to the Data Source Explorer:

Node Type

Description

Category

Category of Connection Profile. May be a parent or child category, depending on depth.

Connection Profile

The Connection Profile itself.

Other Nodes

The Database & SQL model will contribute other nodes (as appropriate) such as databases, schemas, stored procedures, tables, etc.

3.2.2     Menu/Toolbar Actions

3.2.2.1     Menus

Node

Menu

Action

Category

New

Opens the New Connection Profile wizard.

Connection Profile

Connect

Connects to the database and populates the SQL/Database models.

 

Disconnect

Disconnects from the database.

 

Save Offline

Saves the SQL/Database models offline for use in disconnected mode.

 

Refresh

Repopulates the SQL/Database models (while connected).

 

Delete

Deletes the selected profile.

 

Refresh

Refreshes the SQL/Database models from the connection or offline instance.

 

Duplicate

Copies the connection profile and creates a new instance in the view.

 

Rename

Allows renaming of the selected profile.

 

Properties

Opens the Properties dialog for the selected profile.

3.2.2.2     Toolbar Actions

Button

Action

Home

If currently drilled-into the view at a particular level, this brings the user back to the top (root) level of the view.

Back

If currently drilled into the view at a level deeper than the root, this moves back up a level in the hierarchy.

Go Into

If a container node is selected (i.e. a category), this will drill into the hierarchy and make the selected node the root of the view.

Collapse All

Collapses all nodes in the view.

Export

Exports one or more profiles to a file.

Import

Imports one or more profiles from a file.

Show Categories Toggle

If set, the view will show a hierarchical view including categories and subcategories. If not set, the view will show a simple, flat list of profiles.

New Connection Profile

Opens the New Connection Profile wizard.

3.3     Dependencies

We will be dependent on the following components:

3.4     Tasks

1)      Create new Data Source Explorer view based on either Platform or WTP extensible navigator.

a.       Use the navigator framework to extend the Common Viewer.

b.      Use the new Profile Management tools in DTP Connectivity to populate the content provider for the DSE.

c.       Create a label provider for the DSE. (Does the Profile framework manage icons?)

d.      Create a preference page for DSE preferences

2)      Create a Generic JDBC profile

a.       Use the navigator framework to contribute a node for each profile

3)      Create a SQL/Database Model sub-profile

a.       Use the navigator framework to contribute content from the Database/SQL models for a given connection

4)      Create DSE actions

a.       Create Connect/Disconnect actions for profile nodes (use the connection management tools available in Connectivity)

b.      Create Save and Work Offline actions for profile nodes (use persistence features of SQL model)

c.       Create a Properties action for profile nodes

d.      Create a Refresh action for profile nodes

e.       Create an Export action (export wizard with the option to export driver instances)

f.        Create an Import action (import wizard with the option to process incoming driver instances (ignore/overwrite/rename/ignore all duplicates))

5)      Create DSE filters

a.       Create a filter that only shows database profiles

b.      Create a filter that only shows profiles for a given driver

6)      Create DSE drag/drop capabilities

a.       What do we need to drag and drop?

3.4.1     Create new Data Source Explorer view based on either Platform or WTP extensible navigator.

Part

Dependency

Risks

Time to Complete (min/max)

Use the navigator framework to extend the Common Viewer.

WTP/DTP Navigator or Platform

Will the Platform extensible navigator be available in M3?

1 day/3 days

Use the new Profile Management tools in DTP Connectivity to populate the content provider for the DSE.

Connectivity Profile Framework

N/A

1 day/3 days

Create a label provider for the DSE. (Does the Profile framework manage icons?)

Connectivity Profile Framework

Icons

1 day/3 days

Create a preference page for DSE preferences

None

Unsure at this point what preferences this view will need

1 day/2 days

 

3.4.2     Create a Generic JDBC profile

Part

Dependency

Risks

Time to Complete (min/max)

Use the navigator framework to contribute a node for each profile

DSE

N/A

1 days/2 days

Integrate with SQL/Database Model sub-profile

DSE & SQL/DB Model sub profile

Understanding of the models

2 days/5 days

 

3.4.3     Create a SQL/Database Model sub-profile

Part

Dependency

Risks

Time to Complete (min/max)

Use the navigator framework to contribute content from the Database/SQL models for a given connection

DSE & SQL/DB Model sub profile

Understanding of the models

2 days/5 days

 

3.4.4     Create DSE actions

Part

Dependency

Risks

Time to Complete (min/max)

Create Connect/Disconnect actions for profile nodes (use the connection management tools available in Connectivity)

Connectivity Profile/ Connection Mgmt Framework

Availability of connection management tools

1 day/3 days

Create Save and Work Offline actions for profile nodes

SQL Model

Availability of model persistence tools

1 day/2 days

Create a Properties action for profile nodes

Connectivity Profile Framework

N/A

1 day/2 days

Create a Refresh action for profile nodes

DSE

N/A

1 day/1 day

Create an Export action (export wizard with the option to export driver instances)

DSE

N/A

2 days/3 days

Create an Import action (import wizard with the option to process incoming driver instances (ignore/overwrite/rename/ignore all duplicates))

DSE

N/A

3 days/4 days

 

3.4.5     Create DSE filters

Part

Dependency

Risks

Time to Complete (min/max)

Create a filter that only shows database profiles (by category)

WTP/DTP Navigator or Platform and Connectivity Profile Framework

Filter capabilities in navigator framework

1 day/3 days

Create a filter that only shows profiles for a given driver

WTP/DTP Navigator or Platform and Connectivity Profile Framework and Driver Framework

Filter capabilities in navigator framework

1 day/3 days

 

3.4.6     Create DSE drag/drop capabilities

Part

Dependency

Risks

Time to Complete (min/max)

What do we need to drag and drop?

Unknown

Unknown quantity at this point

Unknown

3.5     Additional Notes

3.5.1     SQL Model Content/Label Providers

The SQL Model Content and Label providers will be made public so users have the ability to change them as necessary.

3.5.2     Common Components

The DSE will provide several common components that can be re-used and changed by DTP consumers. These include (more may be added):