Tests: Updated SQL and fixed tests
Tests: Added new database caching test (fail)