[Building Sakai] Sakai databases..
Gregory Guthrie
guthrie at mum.edu
Sun Nov 25 21:29:23 PST 2012
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
;
-------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20121125/342b0779/attachment.html
More information about the sakai-dev
mailing list