Update db dependencies
Implement scoping and querying