Skip to main content



      Home
Home » Modeling » EMF » [CDO] Delete values from version history(Deleting values from the version history to conserve space)
[CDO] Delete values from version history [message #1412244] Mon, 25 August 2014 12:53 Go to next message
Eclipse UserFriend
I am using a versioned CDO database, and everything is working marvelous.

In the database, we store mathematical models. We also store simulation definitions and simulation results, which can often become very large (50Mb or more). The model should be versioned, but the simulation results can be deleted after the Simulation object is deleted (as they can become very large).

Is there an easy way to modify the CDO version history, so that the results are completely removed (both from the Current version and from the history)? Or should I really set up two datastores (one versioned and one unversioned)?
Re: [CDO] Delete values from version history [message #1412443 is a reply to message #1412244] Tue, 26 August 2014 03:11 Go to previous messageGo to next message
Eclipse UserFriend
Hi Ruben,

You cannot remove old CDORevisions from the server's store without
breaking data's integrity because CDO expect to have these previous
CDORevisions when auditing is enabled.
Then I think having 2 datastores, one with auditing and another without
is a good solution.

Best Regards.

Le 25/08/2014 19:00, Ruben Faelens a écrit :
> I am using a versioned CDO database, and everything is working marvelous.
>
> In the database, we store mathematical models. We also store simulation
> definitions and simulation results, which can often become very large
> (50Mb or more). The model should be versioned, but the simulation
> results can be deleted after the Simulation object is deleted (as they
> can become very large).
>
> Is there an easy way to modify the CDO version history, so that the
> results are completely removed (both from the Current version and from
> the history)? Or should I really set up two datastores (one versioned
> and one unversioned)?


--
Esteban Dugueperoux - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: [CDO] Delete values from version history [message #1412612 is a reply to message #1412443] Tue, 26 August 2014 11:39 Go to previous messageGo to next message
Eclipse UserFriend
Thank you for the explanation.

I would be happy if I could just NULL the 'contents' feature of my CDOObject. That could be done with a simple SQL query:
UPDATE SimulationOutput SET output='' WHERE cdoId IN (SELECT cdoId FROM SimulationOutput WHERE deleted=TRUE) 
(pseudo-code)

Another option would be to never store this specific feature in the DB. Would this be another way? Immediately splitting my model over two repositories and requiring XA Transactions seems like a lot of refactoring...
Re: [CDO] Delete values from version history [message #1412794 is a reply to message #1412612] Wed, 27 August 2014 00:44 Go to previous message
Eclipse UserFriend
Am 26.08.2014 um 17:39 schrieb Ruben Faelens:
> Thank you for the explanation.
>
> I would be happy if I could just NULL the 'contents' feature of my CDOObject. That could be done with a simple SQL query:
> UPDATE SimulationOutput SET output='' WHERE cdoId IN (SELECT cdoId FROM SimulationOutput WHERE deleted=TRUE)
> (pseudo-code)
If you're absolutely sure that no other object (that doesn't get deleted at the same time) refers to the deleted objects
(at any time) it seems okay to me. Otherwise Esteban's suggestion is a little cleaner but probably not much safer
because referential integrity is not enforced for CDO's external references either.

>
> Another option would be to never store this specific feature in the DB. Would this be another way?
Of course you can set the respective features in your model to transient or add a CDO-specific annotation to set CDO
transient-ness independent of EMF's standard property.

> Immediately splitting my model over two repositories and requiring XA Transactions seems like a lot of refactoring...
I guess that would make more sense if atomicity isn't strictly needed across the repos.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Previous Topic:DelegatingWrapperItemProvider : how change the order of the properties
Next Topic:Custon type in <xs:list>
Goto Forum:
  


Current Time: Thu Jul 10 07:17:12 EDT 2025

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

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

Back to the top