#315 implements db read/write and OPDataManager