by Claudia J
The article that I read was about the good and bad things about MySQL triggers features. The article first explains the reader that triggers is a named database object that is associated with a table that becomes active when an event occurs for the table. Programmers use triggers as a way to perform checks on the values that are being inserted into a table. It ensures that the data complies with the standards that the fields have set such as calculations on values that involve an update on the data being added to the database. The triggers can be set to activate before or after an inset, deletion, or update has been done in a table. All the information of the database triggers are stores in a triggers table called INFORMATION_SCHEMA database.
This article gives a good insight on the advantages of implementing triggers in the database. Trigger helps to check that all the changes perform on the database are properly implemented. It also helps to enforce database integrity, it also helps guarantee that specific operations are perform, and also centralizes operations. However, adding triggers to the database also brings more workload to the database and could cause the system to run slow since it is executing the triggers checks on every action that is done to the system. SQL triggers are activated by SQL statements only and are not activated by changes in tables made by APIs.
I think that this article provides a good overview on the things we could take into consideration when designing a database. It provides ideas on how to make sure that the database is consistent and how we can protect the database data integrity. Triggers places the DBMS activity under control and without triggers data rules wouldn’t be enforced.
Rob, Gravelle. (September 27, 2012) The Wonderful (and not so Wonderful) Things about MySQL Triggers. Retrieved October 7, 2012 from http://www.databasejournal.com/features/mysql/the-wonderful-and-not-so-wonderful-things-about-mysql-triggers.html