A database trigger is procedural code that is automatically executed in response to certain events on a particular table or view in a database. The trigger is mostly used for maintaining the integrity of the information on the database.
CREATE OR REPLACE TRIGGER [Trigger Name] [Before / After / Instead Of]
Types of PL/SQL triggers :
> Row trigger - The trigger fires for each ROW affected.
> Statement trigger - The trigger is fired once when the condition is matched
> Before and After trigger - The BEFORE trigger run the trigger action before the insert, update or delete statement. The AFTER trigger runs the trigger action after the insert, update or delete statement is executes.
- Clustering means one than one database server configured for the same user connection. When users connect, one of the server’s responds and connects based on availability. The user is completely ignorant of the fact that there are more than one database servers. It demands high cost due to infrastructure needs. Clustering is hence done on server level.
- Mirroring means, one has many configured databases on the same server. Mirrors are basically copies of the original database. Mirroring is hence done on database level.
WATER MARK is a divided segment of used and free blocks. Blocks which are below high WATER MARK i.e. used blocks, have at least once contained some data. This data might have been deleted later. Oracle knows that blocks beyond high WATER MARK don’t have data; it only reads blocks up to the high WATER MARK during a full table scan.