Connect the database at "compile time"

Connect the database at "compile time" to allow setting constants based on database column types (which have to be dynamically inspected).
Simplify download action