dataBase + db tests

Kostya's pull request