Database Connection


This chapter is composed of :

  1. Introduction
  2. New Database Connection
    1. New Folder
      1. Parent Folder
      2. Folder name
      3. Advanced
    2. New Database Connection
    3. New Database Schema
    4. New Database Schema DTD
    5. Finish
  3. Database Connection Update
    1. Database Connection Update
    2. Database Schema Update
    3. Database Schema DTD Update
  4. Refresh
  5. Reverse

1. Introduction

The purpose of this chapter is to show you how to create and update a Database Connection in the workspace.

 

2. New Database Connection

To start the Database Connection wizard, select :

File->New->Other->Database->Database Connection

or

Select an object in the Package Explorer View or the Navigator View then right-click and select :

New->Other->Database->Database Connection

 

 

The New Database Connection wizard is composed of the following pages :

 

2.1. New Folder

 

 

The New Folder page lets you choose a target inside your workspace.

 

2.1.1. Parent Folder

You can type an existing path or you can select an existing node in the resource tree.

This selection is mandatory.

 

2.1.2. Folder name

Once you have selected a parent node, you can type the name of a new node.

This node will be created as a child of your selected parent node.

It will be considered as the parent node of your new Database Connection.

This value is optional.

 

2.1.3. Advanced

 

 

The Advanced button lets you create a link to an existing folder in the file system.

The Browse button opens a folder selector.

 

 

The Variables button opens a variable selector.

 

 

With this dialog box you can select or create a new Path variable.

 

 

Here is the result in your Database Folder page:

 

 

This described mechanism is the standard Eclipse way of working when you create a Folder.

 

2.2. New Database Connection

 

 

The Database Connection page has the same fields as the Database Connection wizard page in the Database Explorer.

However the Reverse check box is inherited from the Connection Global Preferences.

This means that a Database Reverse is optionally performed when you create a Database Connection in the workspace.

 

2.3. New Database Schema

The Database Schema page has the same fields as the Database Schema wizard page in the Database Explorer.

 

2.4. New Database Schema DTD

The Database Schema DTD page has the same fields as the Database Schema DTD wizard wage in the Database Explorer.

 

2.5. Finish

Once you have defined your connection and pressed the Finish button, your Database Connection is created.

Two or three files are defined in your workspace :

A folder is optionally defined.

If you requested a Reverse, a connection will be established to your database and a reverse will be performed.

A report is printed in the DatabaseConsole.

 

 

3. Database Connection Update

 

 

When you want to modify the parameters of an existing Database Connection, select any of its related files, right-click and select

Database->Update

In the Introduction of this chapter you learned that a selection is contextual.

In the Overview of this documentation, you saw the UML Class Diagram of a Database Connection.

Each file belonging to a Database Connection could be the starting point to open its Database Connection.

Right-Clicking on an SQL file or a Schema DTD will let you select the Database->Update command.

This mechanism is managed by an Index.

 

3.1. Database Connection Update

 

 

The Database Connection Update page has the same fields as the Database Connection wizard page in the Database Explorer.

 

3.2. Database Schema Update

 

 

The Database Schema Update page has the same fields as the Database Schema wizard page in the Database Explorer.

 

3.3. Database Schema DTD Update

 

 

The Database Schema DTD Update page has the same fields as the Database Schema DTD wizard wage in the Database Explorer.

In update mode the wizard doesn't know which kind of DTD you previously selected.

 

4. Refresh

Select a Database Object in the Package Explorer View or the Navigator View then right-click and select :

Database->Refresh

 

 

If a Database Connection file is refreshed, then it will be parsed.

 

 

If a Database Schema or a Database Schema DTD file is refreshed, then the Database Schema file will be parsed.

As a general rule this command reads the selected Database Object.

 

5. Reverse

Select a Database Object in the Package Explorer View or the Navigator View then right-click and select :

Database->Reverse

 

 

The Database Meta Data will be reversed and a merge process will be performed with the current content of your Database Schema.

A report will be displayed in the DatabaseConsole.