Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo] Generate ecore model from database?
[Teneo] Generate ecore model from database? [message #1106627] Wed, 11 September 2013 06:45 Go to next message
John M. is currently offline John M.
Messages: 176
Registered: July 2010
Senior Member
Hello everyone,

I have used Hibernate before and I know that it is possible to generate from the database structure hibernate classes.
Is something similar possible with Teneo or is there a recommended way to create an ecore model for an existing database?

Thanks in advance.
Re: [Teneo] Generate ecore model from database? [message #1106688 is a reply to message #1106627] Wed, 11 September 2013 08:01 Go to previous messageGo to next message
Martin Taal is currently offline Martin Taal
Messages: 5162
Registered: July 2009
Senior Member
Hi John,
This topic has come up a few times the past few years. I even tried to start with a contributor on this, but this
initiative didn't continue. It is a fair amount of work I guess (to do it smartly for example detect join tables).

It makes really sense to have this logic but it is some work to do and therefore would need to be contributed (I can
help out in that case) or funded/sponsored.

gr. Martin

On 09/11/2013 12:45 PM, John M. wrote:
> Hello everyone,
>
> I have used Hibernate before and I know that it is possible to generate from the database structure hibernate classes.
> Is something similar possible with Teneo or is there a recommended way to create an ecore model for an existing database?
>
> Thanks in advance.


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: [Teneo] Generate ecore model from database? [message #1111696 is a reply to message #1106688] Wed, 18 September 2013 11:42 Go to previous messageGo to next message
John M. is currently offline John M.
Messages: 176
Registered: July 2010
Senior Member
Hello Martin,

sounds really interesting. Are there any stubs from the first "try"?
I think a good start would be the generation of the eclass out of a database. If this works fine add the relations and so on. Smile
Re: [Teneo] Generate ecore model from database? [message #1111860 is a reply to message #1111696] Wed, 18 September 2013 16:57 Go to previous messageGo to next message
Martin Taal is currently offline Martin Taal
Messages: 5162
Registered: July 2009
Senior Member
Hmm, I did a search, a bit awkard but I can't find any artifacts from this first effort... it is from many years back.

I totally agree that a first step would generate the eclass. So using the database metadata generate eclasses and some
ereferences (based on foreign keys). A next step/future thing is to generate JPA annotations in the generated ecore to
support mapping of the ecore to the original database model.
Other future topic is to support some name mapping from database technical names to readable names. Sometimes in the
dbschema there are very technical names or name length limitations, while in the model you want readable names.

Let me know if you need some help or if you want me to review code, or would want to cooperate in a different way, you
can always drop me a direct email to discuss more. Whatever works best for you!

gr. Martin

On 09/18/2013 05:42 PM, John M. wrote:
> Hello Martin,
>
> sounds really interesting. Are there any stubs from the first "try"?
> I think a good start would be the generation of the eclass out of a database. If this works fine add the relations and
> so on. :)


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: [Teneo] Generate ecore model from database? [message #1122595 is a reply to message #1106627] Tue, 01 October 2013 14:55 Go to previous message
Miles Parker is currently offline Miles Parker
Messages: 1322
Registered: July 2009
Senior Member
MoDisco already has some support for reverse engineering SQL databases. I haven't played around with it that much, but perhaps it could be helpful for your use case.

cheers,

Miles
Previous Topic:Best way to listen to eclipse Notification
Next Topic:[Texo] Support overidding xtend2 templates.
Goto Forum:
  


Current Time: Mon Oct 07 08:27:11 EDT 2013

Powered by FUDForum. Page generated in 0.01584 seconds