Add db task write functionality.

Change-Id: I67c4d587b990cd52f9eabffddfbdc34593876f74
Fixes: OI-8