Newbie curious about DB mapping for Aggregate RDBMS options

I'm new to ODK but curious to explore the source code, especially for
the RDBMS options in Aggregate (?) e.g. for PostgreSQL, perhaps with a
view to trying to figure out how to port it to Oracle (if my Java is
up to the task). Can somebody point me towards the relevant area of
the code/documentation for this functionality?

Many thanks.
Chris

You will want to make a clone of the mercurial repository, then update to
the "v1_0" or "uiexperiment" (less stable) branch. I recommend the
uiexperiment branch at the moment since it has a few fixes to the
MySQL/PostgreSQL server implementation and I just tweaked the formatting of
those classes to make diffs more alike. In general, uiexperiment may have
code checked into it that is experimental or lightly tested. The v1_0
branch has the more stable check-ins and the tagged releases of the project
(Beta 4, RC1, RC2, etc).

Follow the CONFIGURE.txt in the top-level directory for how to configure an
Eclipse environment to build the server.

The relevant code is under:

org.opendatakit.common.persistence

There are 3 engine implementations, PostgreSQL, MySQL and GAE (BigTable).
You would want to start with a renamed copy of the MySQL variant, placing
the copy of the mysql packages under a new package:

org.opendatakit.common.persistence.engine.oracle

Be sure to update the import declarations so your oracle code has no imports
from the mysql or postgres engine packages.

The PostgreSQL and MySQL implementations of DatastoreImpl, QueryImpl and
RelationRowMapper are all nearly identical. You should be able to copy and
make very minor changes to the MySQL implementation to get those working for
Oracle. The tricky code to implement would be the TaskLockImpl. Looking at
the code, I think starting with the PostgreSQL version of this file will be
an easier port to Oracle. The TaskLockImpl is intended to operate as an
application-wide mutex such that if any one thread in any running image of
the web server holds a task lock, no other thread can obtain it. It will be
database specific.

We have a small set of unit tests for the persistence layer. Unfortunately,
the Eclipse environment and the unit tests aren't fitted together well. I
use the Maven command line to exercise the unit tests via the
mysql-unit-tests, postgres-unit-tests and gae-unit-tests Maven projects.
The CONFIGURE.txt gives instructions for setting up for Maven command-line
builds. I'm experimenting with Eclipse Maven integration with m2e, but
don't have anything I'm happy enough with to check into the code tree.

Mitch

··· On Tue, Oct 11, 2011 at 4:01 AM, Chris Webster wrote:

I'm new to ODK but curious to explore the source code, especially for
the RDBMS options in Aggregate (?) e.g. for PostgreSQL, perhaps with a
view to trying to figure out how to port it to Oracle (if my Java is
up to the task). Can somebody point me towards the relevant area of
the code/documentation for this functionality?

Many thanks.
Chris

--
Mitch Sundt
Software Engineer

University of Washington
mitchellsundt@gmail.com

Thanks for the detailed reply, Mitch. I'll start there.