I’m trying to figure out how one would set up a database and/or model in order to handle various badges. Lets take the Stack Overflow badges as an example. There are different rules for each and some might be just a variable different (like 10 comments vs 100 comments).
My question is how do you set up this type validation/check within an application? Should each badge have its own method?
Being that SO runs off SQL Server, SQL Server Agent Job to run periodically to tabulate statistics. The stored procedure(s) in the job would insert into a badges/etc table when criteria is met.
Triggers would be another option, but their execution can’t be delayed for the scope of multiple users.