cautionary vs serving as a deterrent

cautionary

adj
  • Serving to caution or warn; admonitory 

  • Serving to ward off; preventive 

serving as a deterrent

How often have the words cautionary and serving as a deterrent occurred in a corpus of books? (source: Google Ngram Viewer )