Using Database Triggers for Caching Counts

1 · Alex Dunae · June 19, 2021, 7 a.m.
This is a story all about how my counts got flippedturned rightside down Today’s post looks at ways to improve an application by leaning more heavily on the database to manage data. Specifically we look at using database triggers for derived inventory counts, simplifying the application code and solving a deadlock along the way. Moving Data Integrity into the Database Some of the most satisfying code cleanups I’ve done recently have involved reinforcing data integrity checks from the applicat...