difference between and constraints and triggers

Constraints are used to maintain the integrity and atomicity of database.
In other words it can be said they are used to prevent invalid data entry.
The main 5 constraints:

  1. NOT NULL

  2. PRIMARY KEY

  3. FOREIGN KEY

  4. UNIQUE KEY

  5. CHECK

Triggers are basically stored procedures, which automatically fired when any insert, update
or delete is issued on table.

Trigger effected only those row after which trigger applied but constraint effected all row of table.

5 comments:

  1. Infycle Technologies, the No.1 software training institute in Chennai offers the No.1 Selenium course in Chennai for tech professionals, freshers, and students at the best offers. In addition to the Selenium, other in-demand courses such as Python, Big Data, Oracle, Java, Python, Power BI, Digital Marketing, Cyber Security also will be trained with hands-on practical classes. After the completion of training, the trainees will be sent for placement interviews in the top companies. Call 7504633633 to get more info and a free demo.

    ReplyDelete
  2. This post contains excellent information. Continue as you are. Regards for sharing I enjoy reading it,  I'm waiting for more updates, and I have already read your most recent post, which was excellent.
    Best Power Bi Training institute in Hyderabad

    ReplyDelete