What are Database Triggers?
A database trigger is code that executes server-side logic when a database event occurs, such as when data is added, updated, replaced, or removed.
FAQ
There are three types of triggers in MongoDB Atlas. One is the Database trigger used for updating data based on some action, and another is the Scheduled trigger used to execute a set of code at a specific time. On the Realm applications, there is also an Authentication trigger type used for events related to application user authentication.
Yes, MongoDB Atlas provides extensive functionality through the use of triggers. More about MongoDB triggers can be found in the documentation: https://docs.atlas.mongodb.com/triggers/
Database triggers can be good or bad. They should be used with caution since they can mess with critical logic which can create an illusion of automatic processes.
A database with too many triggers can cause events to slow down and generate excess latency to your operations.
Get started with Atlas today
- 125+ regions worldwide
- Sample data sets
- Always-on authentication
- End-to-end encryption
- Command line tools