The auxiliary window and SQL Designer
The "SQL"
tab of the auxiliary window on a logical model package

Figure 61. The "SQL" tab of the auxiliary window on a logical model
package
Key:
·
The
"Stereotype" radio buttons are used to add the <<schema>> or <<sqlPhysicalModel>> stereotypes to a package.
·
The
"Schema name" field is used to add the {sqlName} tagged value to the package. This tagged value defines the name of the
schema which corresponds to the physical model, if the package is stereotyped
<<schema>>, or the name of the physical model, if a physical model
is generated from this package.
·
The
button
generates a new physical model from the package.
The "SQL"
tab of the auxiliary window on a physical model package

Figure 62. The
"SQL" tab of the auxiliary window on a physical model package
Key:
·
The
"Do not update" tickbox is used to add the {sqlDoNotUpdate} tagged
value to the package. This tagged value means that this schema is not updated
when the physical model is updated. If this tickbox is checked on a physical
model, updating it will do nothing.
·
The
"Stereotype" radio buttons are used to indicate whether or not the
model is physical. By default, the "Physical model" button is
selected.
·
The
button is used to select current physical
model’s logical model in the explorer.
·
The
button is used to update the physical model
from a package.
·
The
button is used to generate the SQL corresponding
to the physical model.
·
The
button is used to generate, if necessary, the
SQL corresponding to the physical model, and visualize the creation file in a
window.
·
The
button is used to generate, if necessary, the
SQL corresponding to the physical model, and run the creation script using the
SQL script interpreter of the target RDBMS. If it is not the first generation
and if the
"Keep old deletion file" and "Execute old deletion file before
creation" parameters have
been activated, the old SQL deletion script is executed first.
The "SQL"
tab of the auxiliary window on a package inside a physical model

Figure 63. The "SQL" tab of the auxiliary
window on a package inside a physical model
Key:
·
The
"Stereotype" radio buttons are used to add the <<schema>>
or <<database>> stereotypes to a package inside a physical model. In a physical model, a package can
only be stereotyped <<schema>>. The
button is used to select current physical
model’s logical model in the explorer.
·
The
button is used to generate the SQL
corresponding to the physical model.
·
The
button is used to generate, if necessary, the
SQL corresponding to the physical model, and visualize the creation file in a
window.
·
The
button is used to generate, if necessary, the
SQL corresponding to the physical model, and run the creation script using the
SQL script interpreter of the target RDBMS. If it is not the first generation
and if the
"Keep old deletion file" and "Execute old deletion file before
creation" parameters have
been activated, the old SQL deletion script is executed first.
The "SQL"
tab of the auxiliary window on a class

Figure 64. The "SQL" tab of the auxiliary
window on a class
Key:
·
The
"Persistence" radio buttons are used to add the {persistence} tagged value to the class. If the "Undefined" radio button is
selected, the class will have the same behavior as the parent class.
·
The
"Generalization handling" field is used to select the way in which
generalization is managed. "Undefined (same as parent)" indicates
that the class will handle generalization in the same way as its parent class;
"One table" adds the {oneTable} tagged
value to the class; "One table per class" adds the {oneTablePerClass} tagged value to the class; "One table per concrete class" adds
the {oneTablePerConcreteClass} tagged value to the class.
·
The
"Stereotype" radio buttons are used to stereotype the class <<sqlView>>
or <<procedureClass>>. <<sqlView>> means the class is an
SQL view, whilst <<procedureClass>> indicates that the class is
only meant to contain stored procedures.
·
The
"oid type" field is used to select the type of the oid.
·
The
"SQL name" fields are used to add the {sqlName} tagged value to the
class.
·
The
button is used to add or remove primary keys
to or from the class.
The "SQL"
tab of the auxiliary window on an attribute

Figure 65. The
"SQL" tab of the auxiliary window on an attribute
Key:
·
The
"Persistence" radio buttons are used to add the {persistence} tagged value to the attribute.
·
The
"SQL name" fields are used to add the {sqlName} tagged value to the attribute.
·
The
"SQL default value" fields are used to add the {sqlDefault} tagged value to the attribute.
·
The
"Not null" tickbox is used to add the <<notNull>> constraint to the attribute.
·
The
Unique" tickbox is used to add the <<unique>> constraint to the attribute.
·
The
"SQL type" field adds the {sqlType(selected element)} to the attribute, if an element other than "Default translation"
is selected from the dropdown list. The list of values available depends on the
RDBMS selected at module configuration level.
·
The
"Check constraint" field, if defined, adds a <<check>> type constraint with the text as its body.
·
The
"Rule constraint" field, if defined, adds a <<rule>>
constraint, with the entered text as its body (not available when Oracle is the
target RDBMS).
The "SQL"
tab of the auxiliary window on an association

Figure 66. The "SQL" tab of the auxiliary
window on an association
Key:
·
The
"Persistence" radio buttons are used to add the {persistence} tagged value to the association.
·
The
"Table name" field indicates the name of the table which manages the
association, if it is external.
·
The
"External association" tickbox forces the association to be external,
by adding the {external} tagged value.
·
The
"X SQL Name" fields are used to add the {sqlName} tagged value to the X named association ends.
For an association which has 0..1 multiplicity, the following option is also
available:
·
The "Add "class2" PK to
"class1" PK" tickbox is used to add the {primaryKey} tagged
value to the "the_class2" role.
For an association in which both roles have multiplicity of 1, the following
options are also available:
·
The
"Merge "class1" into "class2" " tickbox adds the {sqlOptimized} tagged value to the "the_class1" role. This signifies that the
table which corresponds to the "class1" class must be merged in the
table which corresponds to the "class2" class. The name of the table
is then "class2".
·
Conversely,
the "Merge "class2" into "class1" " tickbox adds
the {sqlOptimized} tagged value to the "the_class2" role.
The "SQL"
tab of the auxiliary window on a datatype

Figure 67. The
"SQL" tab of the auxiliary window on a datatype
Key:
·
The
"SQL name" field adds the {sqlName} tagged
value to the datatype.
·
The
"SQL code" field is used to add an "sqlCode" note to the datatype. This field only appears
if the database manager selected at MDAC configuration level is "Sybase" or "SQLServer".
·
The
"Rule constraint" field, if defined, adds a <<rule>>
constraint, with the entered text as its body.
The "SQL"
tab of the auxiliary window on a
physical model class or on a class stereotyped <<table>>

Figure 68. The
"SQL" tab of the auxiliary window on a physical model class or a
class stereotyped <<table>>
Key:
·
The
button is used to select the original class of
the logical model in the UML explorer.
·
The
button is used to add or remove primary keys
to or from the class.
·
The
button is used to update a single table of a
physical model without updating the whole model.
·
The
"Do not update" tickbox is used to add the {sqlDoNotUpdate} tagged value.
·
The “Table
owner” field is used to mention the current table owner.
·
The
"Stereotype" combo box adds the <<table>> stereotype (the "SQL table" button), the <<sqlView>> stereotype (the "SQL view" button) or the <<procedureClass>> stereotype (the "Procedure class button).
·
The
"Max rows per page", "Fill factor", "Segment" and
"Partition" fields are used to add tagged values specific to the
database selected at MDAC
configuration level.
The "SQL"
tab of the auxiliary window on a physical model attribute or a table column

Figure 69. The
"SQL" tab of the auxiliary window on a physical model attribute or
table column
Key:
·
The
button is used to select the original
attribute of the logical model in the explorer.
·
The
"Do not update" tickbox is used to add the {sqlDoNotUpdate} tagged value.
·
The
"Do not generate" tickbox is used to add the {sqlDoNotGenerate} tagged value.
·
The
"SQL default value" field is used to add the {sqlDefaultValue} tagged value.
·
The
"Not null" tickbox, when checked, adds the <<notNull>> constraint to the attribute.
·
The
"Unique" tickbox, when checked, adds the <<unique>> constraint to the attribute.
·
The
"SQL type" field is used to add the {sqlType} tagged value with the selection as its parameter, as long as the
selection is not "Default translation".
·
The
"Check constraint" field, if defined, adds a <<check>> constraint, with the entered text as its body.
·
The
"Rule constraint" field, if defined, adds a <<rule>> constraint, with the entered text as its body.