Initialize database and associations