tests: database operations