Last modified 11/20/2009.
CourseForum and ProjectForum rely on the open source database storage library Metakit to manage most of their storage needs. All the ".db" files you'll find in the "Course Data" or "Group Data" directory are Metakit datafiles.
Not only does the software use Metakit internally, but you can use it as well to examine (or perhaps, very carefully) modify the datafiles. There are simple command line and graphical tools availiable for browsing the databases, as well as programming API's in C++, Tcl and Python.
Starting with version 6.5, the command line versions of ProjectForum and CourseForum (including the server binary that is part of the Mac version) include a number of database utilities that can help you look at or change the ".db" files.
WARNING: Obviously, be very careful and know what you're doing when using these utilities. These can render your datafiles unusable. Never use these tools while CourseForum and ProjectForum are running. And of course, make a backup copy of any datafile before you attempt to modify it.
To invoke the database utilities, use the following from an operating system command line:
projectforum -dbutil command
For example, the following command will display information about all the utilities that are available and how to use them:
projectforum -dbutil help
This will generate something like the following:
Usage: projectforum -dbutil command ?options? This program must be run from within the 'Group Data' directory. WARNING: Do not run while ProjectForum is running!!! Available commands and their options are: help - displays this information info course##.db - display size and structure of each data table in the file show course##.db table ?field ...? - display contents of one table in the file getrow course##.db table row - display one row of one table in the file check course##.db - check database for any corruption listforums - list id numbers and names of all forums drop course##.db table - remove a table entirely from the database compact course##.db - compact a database file saveactivity course##.db - saves a copy of activity logs to activity##YYYYmmdd.db eraseactivity course##.db - erases all activity data from the database reportactivity course##.db or activity##YYYYmmdd.db - writes report to activity##YYYYmmdb.txt
As an example, you can use the "info" command to look at the structure of a database file.
projectforum -dbutil info course1.db
That may produce something like the following; the first number on each line indicates the number of rows in each table, identified by the second word on each line. The rest of each line details the fields stored for each row in the table.
1134x current {pageid:I forumid:I created:I modified:I versionnum:I name username body lockpassword postwhenlocked:I posting feedid} 1x currentctl nextid:I 657x recent {forumid:I pageid:I name modified:I username} 1665x links {from:I to:I} 75x options {id:I name value} 10085x versions {forumid:I pageid:I modified:I versionnum:I username body} 22x accounts {username password passwordcookie} 1x accountsctl nextid:I 60717x activity {forumid:I pageid:I versionnum:I timestamp:I operation username} 1229x attachments {attachid:I forumid:I pageid:I filename originalfilename contenttype timestamp:I category} 1x attachmentsctl nextid:I 1x notify {email forumid:I pageid:I frequency:I lastnotified:I} 0x pendingnotifications {forumid:I pageid:I notifytime:I email} 1x globalctl formatversion:I
Using the "show" command, e.g. "projectforum -dbutil show course2.db attachments", might display something like this (in this case using a different database file that only contains two rows in the attachments table):
1435 1 9 attachments1/file1435 hostingterms.html text/html 1084044043 2608 1 9 attachments1/file2608 bsdlogo.gif image/gif 1084044057 image