Data modelling - Concept
Stored Procedure
A named block of database code saved on the server and run when called
What's it for?
Keeps repeated database work in one saved routine so applications can run it consistently.
For example…
An application calls a stored procedure called `CloseMonth` that runs several database checks and updates in one controlled operation
A reporting SP joins several tables and returns a prepared monthly summary whenever the reporting job calls it