Lesson 24 - Vidly logic model

Hi there,

In the Vidly Rental assignment, if one wants to update the numberinStock whenever a video is returned/rented, should such function be built during the modeling stage or should it be done in the query? Any thought how to approach this appreciated.