[Building Sakai] Removing unused data

David Horwitz david.horwitz at uct.ac.za
Thu Jan 10 03:05:44 PST 2013


I Have a quartz job I run periodically to clean up orphaned content
collections (ie collections for the site has been deleted):

http://source.cet.uct.ac.za/svn/sakai/QuartzJobs/trunk/scheduler-component-shared/src/java/org/sakaiproject/component/app/scheduler/jobs/CleanOrphanedContent.java

warning contains mysql specific queries and direct db calls (on the
lookup)

D

On Thu, 2013-01-10 at 11:51 +0100, Jean-Francois Leveque wrote:
> I know about this surface delete being helpful at times.
>
> But this leads to another issue with unused data and unused files that
> are still in DB and/or FS.
>
> If you're short on storage, is there a currently documented way to
> remove unused data and files?
>
> On 09/01/2013 16:40, Matthew Jones wrote:
> > I'd agree the foreign keys within a tool (like Samigo, Gradebook) are
> > probably good, but there's no links across tools. For instance nothing
> > that relates User or Site (context) to Gradebook, Assessment,
> > Assignment, Forum, etc. in the database as an explicit foreign key. This
> > seems like it could make figuring out relationships difficult, but it
> > also has the side benefit of not forcing data to need to be removed when
> > the parent is removed. For instance in Sakai if a user or site is
> > deleted, the content they created isn't deleted, they can just be
> > re-added and it will all show up again.
> >
> > It's possible that someone may want to delete a site and have it cascade
> > delete everything related to that site, but this just isn't possible
> > with how Sakai is designed. I guess that's a that's a possible negative
> > side effect of not knowing how some of these high level things link
> > together, easy recovery, but nothing is cleaned up. If this was desired,
> > this work would be up to a developer, and would likely be a lot of work.
> >
> > In addition, some older tools store their metadata as 'Nosql-style' XML
> > blobs, so there was no way to do foreign key relationships anyway.
> >
> >
> > On Wed, Jan 9, 2013 at 10:16 AM, Sam Ottenhoff <ottenhoff at longsight.com
> > <mailto:ottenhoff at longsight.com>> wrote:
> >
> >     Sakai has explicit foreign keys; I'm not sure what Chuck's problem
> >     was.  Using DbVisualizer on a proper Sakai database will show lots
> >     of foreign key relationships.
> >
> >     Using MySQL *without* InnoDB enabled means that your database was
> >     probably created using MyISAM tables.  MyISAM tables do not support
> >     foreign keys.
> >
> >     --Sam
> >
> >
> >     On Wed, Jan 9, 2013 at 6:50 AM, Jean-Francois Leveque
> >     <jean-francois.leveque at upmc.fr
> >     <mailto:jean-francois.leveque at upmc.fr>> wrote:
> >
> >         Hi Chuck,
> >
> >         Do you mean foreign keys are handled by the app instead of being
> >         part of
> >         the DDL, when writing about "lack of explicit foreign keys"?
> >
> >         If it's the case, shouldn't we improve the DDL?
> >
> >         Thanks,
> >
> >         J-F
> >
> >         On 22/03/2012 13:23, csev wrote:
> >          > Thanks to everyone with the db visualizer help.
> >          >
> >          > Of course I dumped Sakai in and the lack of explicit foreign
> >         keys kept
> >          > the model quite boring.
> >          >
> >          > So I did it by hand in Keynote for my lecture.
> >          >
> >          > Lecture went well.
> >          >
> >          > Again, thanks.
> >          >
> >          > /Chuck
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
>

________________________________
 UNIVERSITY OF CAPE TOWN

This e-mail is subject to the UCT ICT policies and e-mail disclaimer published on our website at http://www.uct.ac.za/about/policies/emaildisclaimer/ or obtainable from +27 21 650 9111. This e-mail is intended only for the person(s) to whom it is addressed. If the e-mail has reached you in error, please notify the author. If you are not the intended recipient of the e-mail you may not use, disclose, copy, redirect or print the content. If this e-mail is not related to the business of UCT it is sent by the sender in the sender's individual capacity.


More information about the sakai-dev mailing list