This section presents a summary of drag-and-drop operations for models managed in MySQL repository. Refer to the step-by-step instructions in the Syndeia Tutorials document (see section 3.2 for details).
# | Drag This | To This | With This Connection Type | And This Will Happen |
M1 | Anything from the System Model Panel (or Repository Panel) | Anything in the Repository Panel (or System Model Panel) | Reference | Reference Connection will be created but nothing will be generated. |
M2 | SysML Block | MySQL Database | Model Transform | - A new table will be generated in the database with columns corresponding to value properties of the SysML block.
- A model transform connection will be created between the SysML block and the MySQL table.
|
M3 | MySQL Table | SysML package | Model Transform | - A new SysML block will be generated with value properties corresponding to columns of the MySQL table.
- A model transform connection will be created between the SysML block and the MySQL table.
|
M4 | SysML Block | MySQL Table | Data Map | - A new row will be generated in the table with column values corresponding to the default values of the value properties of the SysML block ONLYIF a model transform connection exists between a parent block (supertype) of the given block and the MySQL table (such as by operations M2 - M3).
- A data map connection will be created between the SysML block and the MySQL table row.
|
M5 | SysML Block Instance | MySQL Table | Data Map | - A new row will be generated in the table with column values corresponding to the slot values of the SysML block instance ONLYIF a model transform connection exists between the classifying Classifying block is the block that was instantiated to create the given block instance. block of the instance and the MySQL table (such as by operations M2 – M3).
- A data map connection will be created between the SysML block instance and the MySQL table row.
|
M6 | MySQL Table Row | SysML package | Data Map | - User will be asked to select one of the two options: (1) generate a block instance (default option), or (2) generate a specialized (subtype) block.Â
If the first option is selected, a SysML block instance will be generated with slot values corresponding to the columns values of the given row. This block instance will be an instance of the block that has a model transform connection to the table. If such a block does not exist, then a new block will also be generated with a model transform connection to the MySQL table (same as operation M3). If the second option is selected, a SysML block will be generated with value properties (and default values) corresponding to the columns values of the given row. This block will be a child (subtype) of the block that has a model transform connection to the table. If such a block does not exist, then a new block will also be generated with a model transform connection to the MySQL table (same as operation M3). - A data map connection will be created between the SysML block instance (or specialized block) and the MySQL table row.
|
Creating connections between existing model elements
The drag-n-drop operations listed in the table above generate models. Starting with this release, Syndeia can also create model transform connections between existing model elements without generation. You can then perform a compare and sync operation on these connections to sync the models. The following drag-n-drop operations are available between existing model elements:
- SysML Block < – > MySQL Table (Model Transform)
- SysML Block < – > MySQL Table Row (Data Map)
- SysML Block Instance < – > MySQL Table Row (Data Map)
Additional Notes on SysML and MySQL drag-n-drop operations
- Column names in the MySQL table must be alpha numeric (white spaces and underscores are allowed) so that they can be used to generate block value properties.
When generating SysML block / instances from MySQL data, or when synchronizing MySQL > SysML, the following data mapping rules are followed.
MySQL data type | SysML value type |
int / INT | Integer |
dec / DEC | Real |
float / FLOAT | Real |
double / DOUBLE | Real |
char / CHAR | String |
varchar / VARCHAR | String |
When generating MySQL tables and rows from SysML elements, or when synchronizing SysML > MySQL, the following data mapping rules are followed.
SysML value type | MySQL data type |
String | VARCHAR |
Real | DOUBLE |
Integer | INT |