lshift/diffa — pull request #283 by anthonyls (2013-01-17 15:33:57+00:00)
Title: Diffa SQL Driver

We should take the abstract JOOQ based Merkle tree implementation that currently is used to verify the version store and turn it into a re-useable DB API for interview purposes. The broad goal is to make the current version more generically accessible for different databases and to configure the target table and columns as dynamic attributes (rather than schema crawling the DDL to produce compile time artifacts).

This driver should be a Maven module that can be included in any app as a library dependency.

Scope (must)

* Create separate Maven module so that this can be used for testing the versioning module
* HSQL support
* Ability to configure target table and columns
* Oracle support
* Constraint by extent (set category)
* Support for string prefix constraint (1st 3 chars of MD5)
* Add function based index to the DIFFS table

Should

* Ability to produce version on the fly (for tables that don't have a version column).
* Optimize bucketing for Oracle using partition by clause
* MYSQL support

Acceptance Criteria

G. 0 differences
W. scan
T. 0 records

G. diffs in extent A
W. scan extent B
T. 0 records

G. n diffs, all with different first 3 characters, in extent A
W. scan extent A
T. n records for extent A

G. n differences, with same 1st 3 characters, in extent A
W. scan extent A at aggregation granularity of 3 (characters)
T. 1 record having version = md5(concat(ordered versions of n differences))

G. n differences in extent A, each with same 1st 3 characters (version), m in extent B (same 1st 3)
W. scan extent A at granularity of 3
T. 1 record having version = md5(concat(ordered versions of n differences in extent A))