Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » From UML to SQL
From UML to SQL [message #1829428] Fri, 03 July 2020 07:50 Go to next message
Yoann Farré is currently offline Yoann FarréFriend
Messages: 235
Registered: November 2017
Senior Member
Hello,

I could be interested by a way to generate SQL code from an UML model. I am aware of the Information Modeling project but I'm not sure it adress this topic, As far as I know, we can't generate SQL code to create a relationnal DB from a model. I believe we can do that with EA for example. Is there such feature in Eclipse/UML/Papyrus world?
If not, what could be the most appropriate entry point to do that? Information Modeling project? Existing profile?

Regards.

Yoann.
Re: From UML to SQL [message #1829432 is a reply to message #1829428] Fri, 03 July 2020 09:24 Go to previous messageGo to next message
Carsten Pitz is currently offline Carsten PitzFriend
Messages: 479
Registered: May 2015
Location: Germany
Senior Member
Hi Yoann,

to generate which SQL code?
There is CRUD (create, read, update, delete) for both the tables themselves and the data to be managed.

And why?
The persistence frameworks around abstract completely from the kind of database without any runtime performance impact. And if you decide to use a rDBMS the persistence framework does the SQL magic.

/Carsten
Re: From UML to SQL [message #1829433 is a reply to message #1829432] Fri, 03 July 2020 09:45 Go to previous messageGo to next message
Yoann Farré is currently offline Yoann FarréFriend
Messages: 235
Registered: November 2017
Senior Member
Hi Carsten,

For the moment, I would generate SQL code to init the DB (at least tables creation). If possible manage all operations (CRUD) on the tables would be good.

And to answer to the why : I'm developping a feature to make easier the interaction between a code generated from Papyrus (in C++) with a relationnal DB. I would like to make that the user can create the database structure in UML and use a SQL generator to build the corresponding DB.

Hopefully the need is clearer.

Yoann.
Re: From UML to SQL [message #1829440 is a reply to message #1829433] Fri, 03 July 2020 14:20 Go to previous messageGo to next message
Carsten Pitz is currently offline Carsten PitzFriend
Messages: 479
Registered: May 2015
Location: Germany
Senior Member
Hi Yoann,

I am not aware of any such generator for Eclipse Papyrus.

I wrote such a generator for a customer as AndroMDA cartridge some 15 years ago. That generator utilized some naming conventions to mark table columns should be unique or indexed. Query-, update- and delete-operations were only generated for indexed columns. These conventions made the generator damn easy to implement and the resulting code quite well performing.

But this approach requires a pure data model being used by other code.

/Carsten


Re: From UML to SQL [message #1830334 is a reply to message #1829440] Thu, 23 July 2020 13:40 Go to previous messageGo to next message
Vincent Lorenzo is currently offline Vincent LorenzoFriend
Messages: 248
Registered: June 2010
Location: Paris Saclay, France
Senior Member
Hello Yoann,
Papyrus doesn't provide such a generator to create SQL table. I think you should modelize your table with a Class Diagram, then write the generator to create the table.

Regards,
/Vincent
Re: From UML to SQL [message #1836608 is a reply to message #1830334] Fri, 08 January 2021 21:51 Go to previous messageGo to next message
pere joseph rodríguez is currently offline pere joseph rodríguezFriend
Messages: 51
Registered: October 2014
Member
Https://www.samsara-software.es
Can find a plugin for Oracle, mysql and Postgres.
Code generation for JPA and queries included for JPQL.
If interested, contact perelengo@hotmail.com the project is in standby but can provide some help.
Re: From UML to SQL [message #1836609 is a reply to message #1836608] Fri, 08 January 2021 21:53 Go to previous message
pere joseph rodríguez is currently offline pere joseph rodríguezFriend
Messages: 51
Registered: October 2014
Member
Check this channel if wanna have a look to a demo
https://youtube.com/channel/UC7a_91A5Ikp21POVurHKX8Q
Previous Topic:Create a diagram programmatically
Next Topic:Diagram and model synchronisation
Goto Forum:
  


Current Time: Tue Apr 23 09:43:56 GMT 2024

Powered by FUDForum. Page generated in 0.04972 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top