title: How to decrease the value of a database entry
body: <p>I have a nodeJS system where a student enrolls for a batch, and so i have a field in the mongodb as <code>batchSize</code> which holds maximum number of students in one batch, student can enroll on a batch and <code>batchSize</code> should reduce its value</p>
  
  <p>how to write a query to do the same?</p>