[Building Sakai] Resource Tool Database

Jim Eng jimeng at umich.edu
Mon Mar 9 14:01:27 PDT 2009


Hi Iuliana,

I still do not understand what you want to accomplish.

We strongly recommend against making changes in the data for  
ContentHosting by direct access through the database.  I will give you  
the SQL that provides a count of the number of files in dropboxes, in  
workspace sites, and in other sites, but trying to use SQL to access  
records for individual files (or the contents of those files) is not a  
good idea.  That is likely to lead to corruption of your data and  
instability of your system.  If there is some specific problem you are  
trying to solve, it would probably be better to discuss that problem  
on sakai-dev or sakai-production to see if someone has some advice.

Here are the queries to get counts of records, using MySQL syntax:

For DROPBOX:
select count(*) from content_resource where resource_id like '/group- 
user/%';

For WORKSPACE sites:
select count(*) from content_resource where resource_id like '/user/%';

For other sites (Course sites and Project sites):
select count(*) from content_resource where resource_id like '/group/%';

Because these queries use a 'like' operator, they are likely to be  
slow.  They would not be recommended for use on a production system  
with large numbers of resources.

Jim


On Mar 9, 2009, at 3:58 PM, Iuliana wrote:

> Jim, only remmenber...
> Still desperate...
>
> ---------- Forwarded message ----------
> From: Iuliana <iulianas at gmail.com>
> Date: Mon, Mar 9, 2009 at 8:51 AM
> Subject: Re: Reaource Tool Database
> To: Jim Eng <jimeng at umich.edu>
>
>
> Hi Jim, thanks for the answer...
>
> Maybe I do not have explain so good.
>
> I need especifically one "select" clause...
> One select where I can take the information about
> Dropbox tool and another select where I can take
> the information about Resources Tool.
>
> For example:
> "SELECT id, in_collection, context, file_path, file_size, date FROM  
> CONTENT_RESOUCE WHERE toolid='resources'", And them I will have the  
> resources tool information.
>
> "SELECT id, in_collection, context, file_path, file_size, date FROM  
> CONTENT_RESOUCE WHEREwhere toolid='dropbox'", And them I will have  
> the dropbox tool information.
>
> I'm following your recommendation. I'm not putting
> tools in separeted tables.
>
> Best wishes,
> iuliana.
>
>
> On Fri, Mar 6, 2009 at 4:11 PM, Jim Eng <jimeng at umich.edu> wrote:
> Hi Luliana,
>
> I'm not understanding exactly what you are trying to accomplish. Can  
> you give me more detail?
>
> Dropbox and Resources are implemented in the same service.  They do  
> have different resource-id's though.  Resources and folders in  
> dropboxes have id's that start with "/group-user/", resources and  
> folders in MyWorkspace have id's that start with "/user/", and items  
> in other kinds of sites (course sites and project sites) have id's  
> that start with "/group/".  Is this what you are looking for?
>
> I would not recommend putting them in separate tables, if that is  
> what you are suggesting.  The code for storing and retrieving  
> resource info is pretty complex.
>
> Jim
>
>
>
> On Mar 6, 2009, at 1:51 PM, Iuliana wrote:
>
>> Hi Jim,
>>
>> Aaron give-me your reference in content/resources tool.
>> I need mer or something about resources tool where I can
>> to split resouce, dropbox, presentations and other tool who
>> use the same CONTENT_RESOUCE table to save the resource file.
>> Or same place at code who say where or what api can I do this.
>>
>> I have been examining db-api, BaseContentResouce.java and
>> others but is so hard understand.
>>
>> Please help-me Jim.
>> I'm desperate.
>>
>> Best wish...
>>
>> -- 
>> Iuliana Souza
>> System Analyst
>> University of São Paulo - Brazil
>> (16) 9963-9155
>
>
>
>
> -- 
> Iuliana Souza
> Graduada em Análise de Sistemas
> (16) 9963-9155
>
>
>
> -- 
> Iuliana Souza
> Graduada em Análise de Sistemas
> (16) 9963-9155

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20090309/69b454b5/attachment.html 


More information about the sakai-dev mailing list