Wednesday, 14 August 2013

What is Triggers?

Triggers are procedures written in PL/SQL, Java, or C that run (fire) implicitly whenever a table or view is modified or when some user actions or database system actions occur. Triggers supplement the standard capabilities of Oracle to provide a highly customized database management system. For example, a trigger can restrict DML operations against a table to those issued during regular business hours. Triggers are similar to stored procedures. A trigger stored in the database can include SQL and PL/SQL or Java statements to run as a unit and can invoke stored procedures. However, procedures and triggers differ in the way that they are
invoked. A procedure is explicitly run by a user, application, or trigger. Triggers are implicitly fired by Oracle when a triggering event occurs, no matter which user is connected or which application is being used.
You can write triggers that fire whenever one of the following operations occurs:
1. DML statements (INSERT, UPDATE, DELETE) on a particular table or view,
issued by any user
2. DDL statements (CREATE or ALTER primarily) issued either by a particular
schema/user or by any schema/user in the database
3. Database events, such as logon/logoff, errors, or startup/shutdown, also issued
either by a particular schema/user or by any schema/user in the database

What is Data Dictionary

The central set of tables and views that are used as a read-only reference about a
particular database. A data dictionary stores such information as:
- The logical and physical structure of the database
- Valid users of the database
- Information about integrity constraints
- How much space is allocated for a schema object and how much of it is in use
A data dictionary is created when a database is created and is automatically
updated when the structure of the database is updated.

What is Data Definition Language(DDL)

DDL stands for Data definition language. Includes statements like CREATE/ALTER TABLE/INDEX,
which define or change data structure.

What is Data Manipulation Language(DML)

DML stands for Data manipulation language. Includes statements like INSERT, UPDATE, and
DELETE, which change data in tables.

What is Inconsistent Backup

A backup in which some of the files in the backup contain changes that were made after the files were checkpointed. This type of backup needs recovery before it can be made consistent. Inconsistent backups are usually created by taking online database backups; that is, the database is open while the files are being backed up. You can also make an inconsistent backup by backing up datafiles while a database is closed, either:
Immediately after an Oracle instance failed (or all instances in an Oracle Real
Application Clusters configuration)
After shutting down the database using SHUTDOWN ABORT
Note that inconsistent backups are only useful if the database is in ARCHIVELOG
mode.