Implemented the openDB method