added database contract and class to create db
added Unit Tests for Database
simplified look of tests with helper functions