Changed 'app' to 'db', as their names may differ