What is referential integrity?

Answer Posted / renu gupta

Referential integrity refers to the consistency that must
be maintained between primary and foreign keys.

1.An insert into primary key table cannot violate
referential integrity and no checking is required
2.A deletion of foreign key value can not violate
referential integrity and no checking is required
3.Changes in primary key is allowed only when those values
are not in foreign key.
4.Insert and updates in foreign key is allowed only when it
has a matching value in primary key
5. If RESTRICT is specified on foreign key definition,
deletion of primary key is not allowed
6. If CASCADE is specified, both primary and foerign keys
values can be deleted together only
7. If SET NULL is specified, then the foreign key value is
set null , provided nulls are allowed in the foreign key
column

Is This Answer Correct ?    12 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you classify the locks in db2?

628


What does runstats do in db2?

607


What does db2 plan contain?

571


What is the difference between "db2ilist" and "db2 get instance" commands in DB2 Database Server?

704


How would the varchar column remarks defined?

631






Is db2 a programming language?

600


How can record locking be achieved in those DB2 versions which do not support it?

621


Give a brief description of db2 isolation levels?

599


What is cursor with hold option in db2?

608


For a db2 column that is being defined as decimal (11, 2), discuss the cobol picture clause.

655


What is the syntax for FETCH in DB2 ?

671


What are the prerogatives?

612


How to check last update on table in db2?

624


What is cascading rollback?

619


What is catalog database in db2?

640