GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Oracle  >  SQL Plus
Go To First  |  Previous Question  |  Next Question 
 SQL Plus  |  Question 14 of 132    Print  
What is referential integrity constraint

  
Total Answers and Comments: 4 Last Update: June 23, 2009   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
July 15, 2005 06:42:44   #1  
Nitin Kulkarni        

RE: What is referential integrity constraint
It refers to the integrity between master and detail table. If the information from the master table is deleted then the corresponding record from the detail table should also get deleted as this information has no meaning without master table
 
Is this answer useful? Yes | No
May 11, 2006 12:59:03   #2  
rajani        

RE: What is referential integrity constraint

Referantial integrity deals in parent-child relationship between tables.

The condition is that the child table must have only the column values that are present in the parent table. A new value that is not presant in the parent table cannot be updated into the child table. Likewise an existing value cannot be deletted from the parent table if the child table consists its corresponding row.


 
Is this answer useful? Yes | No
August 31, 2006 06:08:10   #3  
Mangai Varma        

RE: What is referential integrity constraint

Referential Integrity Constraint is used to specify interdependencies between relations. This constraint specifies a column or list of columns as a foreign key of the referencing table.

A foreign key means the values in one table must also appear in another table. The foreign key in the child table will generally reference a primary key in the parent table.The referencing table is called the child table & referenced table is called the parent table.

Syntax: constraint <constraint name> references <primary table><primary key>


 
Is this answer useful? Yes | No
June 23, 2009 11:30:05   #4  
Shivani Goel Member Since: June 2009   Contribution: 5    

RE: What is referential integrity constraint
Referential integrity constraint is that which depend upon the parent and child relationship. In this one of the column have the primary key constraint
and one of the column of another table have the foreign key constraint. So you cannot delete the column value which having the foreign key constraint until you never delete its related primary key column value from parent table. If you tried to do this it will show you error related to referential integrity constraint. But if you still want to delete value from child table but never want to delete parent table column value then that purpose
you can use 'on delete cascade' option.

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape