Update the implementation of data access layer.

Update the implementation of data access layer.