Adding and refactoring db tests.

- Adding tests for the Challenge schema.
- Splitting db tests into separate files for each schema that are then
  included in the main db test.