Added the IDatabase interface to allow mocking in Unit tests