First version of database implemented with tests