[Building Sakai] Sakai databases..
Steve Swinsburg
steve.swinsburg at gmail.com
Sun Nov 25 22:11:18 PST 2012
Hi Gregory,
If you want to see the table mappings, have a look at the Hibernate mapping files (in this case, for MsgCntr):
https://source.sakaiproject.org/svn//msgcntr/trunk/messageforums-hbm/src/java/org/sakaiproject/component/app/messageforums/dao/hibernate/
They are generally on a per tool basis so for different tools you'll need to look at each tool's source. Plus not all tools use Hibernate, many use the Sakai SqlService, some use Spring JDBC.
cheers,
Steve
On 26/11/2012, at 4:29 PM, Gregory Guthrie <guthrie at mum.edu> wrote:
> Is there any place where the fields of the Sakai database tables are defined?
>
> For example, the surrogateKey and UUID fields in MFR_MESSAGE_T and MFR_OPEN_FORUM_T, of_surrogateKey & pf_surrogateKey in MFR_TOPIC_T, etc.
>
> I’m not a database expert, but I have found many instances where tables reference each-other by various keys like this, but very few are declared in the Foreign Keys definitions – is this accurate?
>
> I am trying to archive the forum messages from a course, and with the query below got them but I didn’t yet find the Thread labels; mostly because I am poking around blind in the database.
>
> PS: the basic idea worked, and then I could take the query results, export them into a file as html, and load into either Word or a browser to render them.
> (HeidiSQL allows export formats that makes this easy.)
>
> # Find all forum Messages for user ::
> select msg.Title, # msg.uuid, forum.uuid,
> # Email, concat(First_Name, " ", Last_name),
> Author, msg.Created,
> msg.Body
> from MFR_MESSAGE_T msg,
> MFR_OPEN_FORUM_T forum,
> MFR_AREA_T area,
> SAKAI_USER user, SAKAI_SITE site
> # MFR_TOPIC_T topic
>
> where site.title = "CS505 -Summer 2012" # Find this site (course)
> and area.CONTEXT_ID = site.SITE_ID # forum for this site (course)
> and area.name = "Forums"
> and forum.surrogateKey = area.ID
> and user.Last_Name = " Person " # lookup myself!
> and msg.created_By = user.user_ID # only my messages
> ;
>
>
>
>
>
> -------------------------------------------
>
> _______________________________________________
> 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"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20121126/82d8f2ab/attachment.html
More information about the sakai-dev
mailing list