Dynamic database setup