Build SaveToDB Functionality