Wiring up database.