Introduction

The SQL Designer module provides services for modeling databases at the conceptual (data model) and logical (table model) levels.

The term conceptual model refers here to a UML class model that has been annotated ready for the generation of SQL script files. This model also serves as the data model for the Hibernate Designer module.

Creating an SQL conceptual model

They are two methods for obtaining an SQL persistence model:

  • The manual creation of a new model.

  • The transformation of an existing class model into a conceptual model.

Manually creating a new model

The SQL Designer module comes with a set of commands for use when building a class model annotated for the generation of SQL script files.

List of commands:

  • image Create a Data Model (available on UML Package): Creation of the root of the conceptual model.

  • image Create a Data Model (available on image Data Model / image Data Model): Creation of a package in the conceptual model.

  • image Create an Entity: (available on image Data Model / image Data Model): Creation of a persistent class.

  • image Create an Identifier: (available on image Entity): Creation of an attribute that will serve as the identifier of a persistent class.

  • image Property (available on image Entity): Creation of an attribute for a persistent class.

  • image Relationship (available on image Entity): Creation of an association between two persistent classes.

  • image Hierarchy (available on image Entity): Creation of a generalization link between two persistent classes.

  • image Persistent Diagram (available on image DataModel / image DataModel): Creation of a diagram dedicated to conceptual SQL modeling.

Transforming an existing class model

An existing UML class model can be transformed into an SQL persistence model. To do this, simply select the package containing the classes that you want to make persistent and then check the "Persistent" tickbox in the SQL tab.

If you uncheck this tickbox, then an SQL model will be transformed into a class model.

image
The "Persistent" property