Connect the database in "compile time"

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