presist data in database