Interactive interface

 

Overview

The user interface of generation for relational databases allows you:

·         to annotate your model, through the auxiliary window and the Objecteering dialog boxes

·         to generate a physical model from a logical model

·         to update a physical model from a modified logical model

·         to generate the SQL which corresponds to the physical model

·         to visualize the SQL produced

·         to launch the interpretation of the produced SQL

 

 

Project configuration

Before executing any operations concerning the generation of the relational database, you must configure your project in order to:

·         take into account the UML profile corresponding to the target RDBMS you are using

·         choose the default generation characteristics you wish to use

 

For further information, please see "Configuring SQL Designer".

 

 

Outlook

The interface for generating the database diagram provides all or part of the predefined characteristics at project level, depending on the case. In this way, default interactive generation corresponds to the planned configuration. However, it is possible to modify these choices dynamically, in order to:

·         test different characteristics

·         carry out updates on the existing diagram database but without requesting the re-interpretation of the whole of the SQL leading to the final package

 

 

Menus

Commands are available by clicking on the right mouse-button.

 

Figure 58 shows the commands available on a package.


Figure 58. Commands available on a package in the Objecteering explorer

 

The ... command

is used to ...

Generate physical model

launch the generation of the physical model.

Import first steps

import the SQL Designer first steps project.

Generate SQL files

launch the generation of SQL files.

Refactor MLD…

open the physical model refactoring.

 

 

Figure 59 shows the commands available on a class.



Figure 59. Commands available on a class in the Objecteering explorer

 

The ... command

is used to ...

Primary key

open the primary key window, in which primary keys can be created and managed.

Add an index

open the index creation window, in which indexes can be created.

Add a composite key

open the composite key creation window, in which composite keys can be created.

Indexes

open the index editing window, in which indexes can be managed.

Composite keys

open the composite key editing window, in which composite keys can be managed.

Update from logical model

update a single table of the physical model, without having to update the entire model.

Generate SQL files for this table

generate the SQL code for the creation and destruction of the selected table.

 

 

Command buttons

Command buttons are available by clicking "SQL" tab in the auxiliary window while an element is selected in the explorer.

 

Figure 60. Available command buttons on a package

 

 

<<physicalModel>> in the "SQL" of the auxiliary window

 

The … icon

Is a command button for…

Is available on…

Primary key

Class

View logical model

Any Model Element in <<physicalModel>>

Generate physical model

Package (not project root package)

Update current physical model

Package, Class <<physicalModel>>, if not tagged {sqlDoNotUpdate}

Generate SQL files

Package <<physicalModel>>

View SQL creation file

Package <<physicalModel>>

Execute SQL creation file

Package <<physicalModel>>

 

 

Usage precautions

For each execution of a new SQL, it is recommended that you keep an SQL script after having previously generated it. This will enable you to destroy tables and constraints added to the database. Without this precaution, you may lose table names or constraints always present in the database. Pollution can then occur, or the database can be blocked because of obsolete constraints related to the tables to be destroyed.
For this, Objecteering SQL Designer keeps the former SQL delete file, and can launch it automatically before running the creation script. This behavior can be deactivated at
MDAC parameter level.