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:
-
Create a Data Model (available on UML Package): Creation of the root of the conceptual model.
-
Create a Data Model (available on
Data Model /
Data Model): Creation of a package in the conceptual model.
-
Create an Entity: (available on
Data Model /
Data Model): Creation of a persistent class.
-
Create an Identifier: (available on
Entity): Creation of an attribute that will serve as the identifier of a persistent class.
-
Property (available on
Entity): Creation of an attribute for a persistent class.
-
Relationship (available on
Entity): Creation of an association between two persistent classes.
-
Hierarchy (available on
Entity): Creation of a generalization link between two persistent classes.
-
Persistent Diagram (available on
DataModel /
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.
