Writing TvData objects in DB functionality added