I've been using this outside of the repo. to extract the data from the
database (DB not in repository). I'm adding it now because it's getting to point
which is no longer 'throw-away' code (it's got comments now and everything). So,
I'm adding it here so I don't lose it.