Fixed case where no geo record datums exist

In the case where all geo record datums must be
created, broke out the sql into a separate method
to allow overriding for different database layouts.