2013-11-25 - Jonathan Morgan - changes to support using either mysql or postgresql (which appears to deal much better with manipulating large databases).