Skip to main content

CASCADE Vs RESTRICT Vs NO ACTION Vs SET NULL in MYSQL

The table containing the foreign key is called the referencing or child table, and the table containing the candidate key is called the referenced or parent table. 

  • SET NULL : Sets the column value to NULL when you delete the parent table row.
  • CASCADE : CASCADE will propagate the change when the parent changes. If you delete a row, rows in constrained tables that reference that row will also be deleted, etc. 
  • RESTRICT : RESTRICT causes you can not delete a given parent row if a child row exists that references the value for that parent row. 
     
  • NO ACTION : NO ACTION and RESTRICT are very much alike. when an UPDATE or DELETE statement is executed on the referenced table, the DBMS verifies at the end of the statement execution that none of the referential relationships are violated. in short child row no concern if parent row delete or update.

Comments

Popular posts from this blog

WebSphere MQ Interview Questions

What is MQ and what does it do? Ans. MQ stands for MESSAGE QUEUEING. WebSphere MQ allows application programs to use message queuing to participate in message-driven processing. Application programs can communicate across different platforms by using the appropriate message queuing software products. What is Message driven process? Ans . When messages arrive on a queue, they can automatically start an application using triggering. If necessary, the applications can be stopped when the message (or messages) have been processed. What are advantages of the MQ? Ans. 1. Integration. 2. Asynchrony 3. Assured Delivery 4. Scalability. How does it support the Integration? Ans. Because the MQ is independent of the Operating System you use i.e. it may be Windows, Solaris,AIX.It is independent of the protocol (i.e. TCP/IP, LU6.2, SNA, NetBIOS, UDP).It is not required that both the sender and receiver should be running on the same platform What is Asynchrony? Ans. With messag...

Java Health Center - Overview and Features

This video highlights the features available in Health Center. Health Center is a low-processor and memory usage diagnostic tool for monitoring the status of a running IBM Java Virtual Machine (JVM). Health Center provides live information and recommendations in each of the following areas: - Classes: information about classes being loaded - Environment: details of the configuration and system of the monitored application - Garbage Collection: information about the Java heap and pause times - Locking: information about contention on inflated locks - Profiling: sampling profile of Java methods including call paths

Solution for the Error : An internal error occured during: "reload maven project"

You might have faced this issue after changing the project name or may be changing project name in pom.xml. When you restart your eclipse it may not launch due to project metadata file is corrupted due to your .project name changes and Maven can not laod your project properly and will displays this error shown above and eclipse console will not be opened. To get rid off this issue follow the solution given below