database interface to frontent finished along with tests and thin database.