Save data to db