Action How To Delete Objects

Assigned
ABR+TSH+BAM

Prev assigned

Tasks adressed

TaskA.5

Time estimated
1md

Time used
0.5md

Priority
1

Status
Finished

Iteration
14

Notes

Problem

Deleting objects while maintaining referential integrity is a complex task. The action should provide a general algorithm for how to implement deletions, so that the DOMS will not be left in an inconsistent state, no matter how they are performed.

Consider the Reeltape object. Such an object has relations to a collection, a license, and a number of sides and recordings. Deleting this object will leave the sides and recordings isolated. Deleting everything it references will destroy the collection and licenses. Only deleting the objects in the view will work, but then deletions are subject to a specific view, which might still leave unwanted objects dangling just because they are not part of the view.

A system that address all these issues should be devised.

Work

The Progress section below describes the current version of object deletion. To complete this action, we need:

  1. an internal meeting to make the final decision on how to delete objects. DONE!
  2. an object deletion documentation as part of the datamodel documentation. DONE, changed in FedoraState

  3. communication of this object deletion workflow to MjĂžlner (+feedback +?) DONE, skrevet til Lennert

Progress

We agreed to the following formulation: When deleting an object, you must delete all the objects in this objects view, but only if no object in the view is referenced from outside the view, except from a list of approved objects. Then purge the relations referencing objects in the view from all objects in the approved list. The approved list is supplied by the user; it contains the objects which are known to reference the objects to be deleted and deleting these references will be fine.

Given: Object d (to be deleted). Objectlist approved (the approved objects)

The formal algorithm to do this is:

  1. Find the view 'v' of object d.
  2. Find the list of objects 'e' that reference an object from 'v'
  3. Remove from the list 'e' all objects in approved, and all objects in 'v'
  4. If 'e' is not empty, the delete fails, and the user is notified about the contents of 'e'
  5. If 'e' is empty
    • 1.1 for all objects in approved, delete any relation they have to an object in 'v' 1.1 mark all objects in 'v' as deleted

This system could still potentially leave dangling objects, if they are not in the view. This is unwanted.

Checklist For Working On An Action

The Life Cycle of an Action:

Please make sure that you address the below issues, when working on an action:

ActionHowToDeleteObjects (last edited 2010-03-17 13:09:19 by localhost)