reorganized sql: split up into 3 files for db/tables/config creation