<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wikimd.com/index.php?action=history&amp;feed=atom&amp;title=Database_trigger</id>
	<title>Database trigger - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wikimd.com/index.php?action=history&amp;feed=atom&amp;title=Database_trigger"/>
	<link rel="alternate" type="text/html" href="https://wikimd.com/index.php?title=Database_trigger&amp;action=history"/>
	<updated>2026-04-21T22:55:43Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://wikimd.com/index.php?title=Database_trigger&amp;diff=6503012&amp;oldid=prev</id>
		<title>Prab: CSV import</title>
		<link rel="alternate" type="text/html" href="https://wikimd.com/index.php?title=Database_trigger&amp;diff=6503012&amp;oldid=prev"/>
		<updated>2025-03-17T08:56:11Z</updated>

		<summary type="html">&lt;p&gt;CSV import&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 08:56, 17 March 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l62&quot;&gt;Line 62:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 62:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{No image}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{No image}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{No image}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{No image}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;__NOINDEX__&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Prab</name></author>
	</entry>
	<entry>
		<id>https://wikimd.com/index.php?title=Database_trigger&amp;diff=6223549&amp;oldid=prev</id>
		<title>Prab: CSV import</title>
		<link rel="alternate" type="text/html" href="https://wikimd.com/index.php?title=Database_trigger&amp;diff=6223549&amp;oldid=prev"/>
		<updated>2025-02-10T13:17:36Z</updated>

		<summary type="html">&lt;p&gt;CSV import&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 13:17, 10 February 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l60&quot;&gt;Line 60:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 60:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Database-stub}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Database-stub}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{No image}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{No image}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{No image}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Prab</name></author>
	</entry>
	<entry>
		<id>https://wikimd.com/index.php?title=Database_trigger&amp;diff=6223390&amp;oldid=prev</id>
		<title>Prab: CSV import</title>
		<link rel="alternate" type="text/html" href="https://wikimd.com/index.php?title=Database_trigger&amp;diff=6223390&amp;oldid=prev"/>
		<updated>2025-02-10T13:12:27Z</updated>

		<summary type="html">&lt;p&gt;CSV import&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 13:12, 10 February 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l60&quot;&gt;Line 60:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 60:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Database-stub}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Database-stub}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{No image}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Prab</name></author>
	</entry>
	<entry>
		<id>https://wikimd.com/index.php?title=Database_trigger&amp;diff=5897785&amp;oldid=prev</id>
		<title>Prab: CSV import</title>
		<link rel="alternate" type="text/html" href="https://wikimd.com/index.php?title=Database_trigger&amp;diff=5897785&amp;oldid=prev"/>
		<updated>2024-06-12T19:19:16Z</updated>

		<summary type="html">&lt;p&gt;CSV import&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Database trigger&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
A &amp;#039;&amp;#039;&amp;#039;database trigger&amp;#039;&amp;#039;&amp;#039; is a procedural code that is automatically executed in response to certain events on a particular table or view in a [[database]]. Triggers are used to maintain the integrity of the information on the database, enforce business rules, and automate system tasks.&lt;br /&gt;
&lt;br /&gt;
==Types of Triggers==&lt;br /&gt;
Database triggers can be classified into several types based on the event that initiates them:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;[[INSERT trigger]]&amp;#039;&amp;#039;&amp;#039;: Activated when a new row is inserted into a table.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;[[UPDATE trigger]]&amp;#039;&amp;#039;&amp;#039;: Activated when an existing row is modified.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;[[DELETE trigger]]&amp;#039;&amp;#039;&amp;#039;: Activated when a row is deleted from a table.&lt;br /&gt;
&lt;br /&gt;
Triggers can also be categorized based on their timing:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;[[BEFORE trigger]]&amp;#039;&amp;#039;&amp;#039;: Executed before the triggering event.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;[[AFTER trigger]]&amp;#039;&amp;#039;&amp;#039;: Executed after the triggering event.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;[[INSTEAD OF trigger]]&amp;#039;&amp;#039;&amp;#039;: Used on views to perform the trigger action instead of the triggering event.&lt;br /&gt;
&lt;br /&gt;
==Components of a Trigger==&lt;br /&gt;
A database trigger typically consists of the following components:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Triggering event&amp;#039;&amp;#039;&amp;#039;: The event that causes the trigger to fire (e.g., INSERT, UPDATE, DELETE).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Triggering table or view&amp;#039;&amp;#039;&amp;#039;: The table or view on which the trigger is defined.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Triggering condition&amp;#039;&amp;#039;&amp;#039;: An optional condition that must be met for the trigger to execute.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Trigger action&amp;#039;&amp;#039;&amp;#039;: The procedural code that is executed when the trigger fires.&lt;br /&gt;
&lt;br /&gt;
==Uses of Triggers==&lt;br /&gt;
Triggers are used for various purposes, including:&lt;br /&gt;
&lt;br /&gt;
* Enforcing [[referential integrity]]: Ensuring that relationships between tables remain consistent.&lt;br /&gt;
* Auditing changes: Keeping track of changes made to data in the database.&lt;br /&gt;
* Synchronizing tables: Automatically updating related tables when changes occur.&lt;br /&gt;
* Enforcing business rules: Ensuring that data modifications adhere to specific business rules.&lt;br /&gt;
&lt;br /&gt;
==Advantages and Disadvantages==&lt;br /&gt;
===Advantages===&lt;br /&gt;
* Automation of repetitive tasks.&lt;br /&gt;
* Enforcement of complex business rules.&lt;br /&gt;
* Improved data integrity and consistency.&lt;br /&gt;
&lt;br /&gt;
===Disadvantages===&lt;br /&gt;
* Can introduce complexity and make debugging difficult.&lt;br /&gt;
* May impact performance if not designed properly.&lt;br /&gt;
* Can lead to unintended consequences if not carefully managed.&lt;br /&gt;
&lt;br /&gt;
==Related Pages==&lt;br /&gt;
* [[Stored procedure]]&lt;br /&gt;
* [[Database management system]]&lt;br /&gt;
* [[Referential integrity]]&lt;br /&gt;
* [[View (SQL)]]&lt;br /&gt;
* [[Transaction (database)]]&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
* [[Event-driven programming]]&lt;br /&gt;
* [[Database normalization]]&lt;br /&gt;
* [[Data integrity]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Database management systems]]&lt;br /&gt;
[[Category:Data modeling]]&lt;br /&gt;
[[Category:SQL]]&lt;br /&gt;
&lt;br /&gt;
{{Database-stub}}&lt;/div&gt;</summary>
		<author><name>Prab</name></author>
	</entry>
</feed>