Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » EMF Database Schema: Custom or Generic?
EMF Database Schema: Custom or Generic? [message #759003] Fri, 25 November 2011 14:42 Go to next message
Hauke Fuhrmann is currently offline Hauke FuhrmannFriend
Messages: 333
Registered: July 2009
Senior Member
Hi there,

I want to learn about possibilities to persist EMF Model Instances in
relational databases.

I'm looking for a way that always keeps the same generic database schema
no matter what EMF Metamodel I use. I want to avoid that I have to
change DB schemas in a productive database during operation.

Is there such EMF-DB mapping available (e.g. some abstraction on objects
mapped to quite few DB tables like "Classes" and "Instances" or
something like that)?

I'm aware that such abstract mapping might be quite inperformant and
that you could have problems when the EMF schema changes and you have to
migrate old DB objects manually.

However, is there any such approach? Do you have any pointers for me?
Are there other generic approaches, like using NoSQL databases (e.g.
MongoDB)?


Cheers,
Hauke
Re: EMF Database Schema: Custom or Generic? [message #759006 is a reply to message #759003] Fri, 25 November 2011 14:53 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Hauke,
Teneo supports what you ask, it is the Entity-Attribute-Value schema:
http://wiki.eclipse.org/Teneo/Hibernate/ModelRelational/Entity_Attribute_Value_Mapping

you can even combine EAV mapped eclasses with 'normally' mapped eclasses.

But eventhough Teneo supports this... (without knowing your specific case) in all it is much much easier to have a
classic database schema and allow database changes. My experience with database model changes is that it is no problem
to do these changes in the model:
- remove eclasses from the model (the table is just ignored)
- remove nullable/non-mandatory efeatures from the model (column is just ignored)
- add eclasses (new tables can be created by hibernate)
- add nullable/non-mandatory efeatures to existing eclasses

These changes do not require explicit data migration.

Another project which might be interesting is Texo, it is an EMF variant which generates code which works standard with
any ORM:
http://wiki.eclipse.org/Texo

gr. Martin

On 11/25/2011 03:42 PM, Hauke Fuhrmann wrote:
> Hi there,
>
> I want to learn about possibilities to persist EMF Model Instances in relational databases.
>
> I'm looking for a way that always keeps the same generic database schema no matter what EMF Metamodel I use. I want to
> avoid that I have to change DB schemas in a productive database during operation.
>
> Is there such EMF-DB mapping available (e.g. some abstraction on objects mapped to quite few DB tables like "Classes"
> and "Instances" or something like that)?
>
> I'm aware that such abstract mapping might be quite inperformant and that you could have problems when the EMF schema
> changes and you have to migrate old DB objects manually.
>
> However, is there any such approach? Do you have any pointers for me?
> Are there other generic approaches, like using NoSQL databases (e.g. MongoDB)?
>
>
> Cheers,
> Hauke


--

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@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Previous Topic:[CDO] Exception on Repository activation
Next Topic:Extending an emf model & the generated editor?
Goto Forum:
  


Current Time: Thu Apr 18 15:04:57 GMT 2024

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

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

Back to the top