Added class that implements database writer