Write and read data from Db