answersLogoWhite

0

A foreign key is a primary key or candidate key in the referenced table, it could consists of one or many columns. The foreign key is added to the referencing table. When the foreign keys between the tables are established, the referential integrity relationship

in database system is hence maintained.

While establishing foreign key in the referencing table, we may impose constraints on the foreign key, the constraint will affect how the referencing table's row behaved when it was updated or deleted in the referenced table or vice versa.

There are several constraints, i.e. CASCADE, RESTRICT, SET DEFAULT, SET NULL, NO ACTION.

Here is the example,

CASCADE - Whenever rows in the master (referenced) table are deleted, the respective rows of the child (referencing) table with a matching foreign key column will get deleted as well. A foreign key with a cascade delete means that if a record in the parent table is deleted, then the corresponding records in the child table will automatically be deleted. This is called a cascade delete.

RESTRICT - A row in the referenced table cannot be updated or deleted if dependent rows still exist. In that case, no data change is even attempted. Should not be allowed.

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

What foregn country did nally live in?

Germany


Is forged iron superior to cast iron?

no cast iron is more superior than foregn iron


How does the Smallville episode jinx start?

it starts with chloe and Migelmixelpidalik ( a foregn student booky ) making a bet on the smallville crows game.


What is navism?

Belief of 'native born' Americans were true. Fear of Immigrants and foregn communists and ancarchys. Ku Klux Klan embraced.


Define foreign exchange?

Foregn Exchange is the terms that use in converting one currency to other currency with in a floor or counter permited by authority of Government Agencies.


What is a colonial algae?

The age in which a bunch of countries in Europe colonized foregn settlements such as the 13 colonies and canada or even all the spanish colonies in cental america and southamerica


What is the importance of toutism in India?

After all tourista are very important to India as a whole. It brings in a lot of foregn exchange and a lot of goods are sold to these tourists . Who also like to travel a great deal.


Do all banks exchange foreign money?

yes all banks do. contact your bank and ask them they will probably tell you that they do exchange foreign money if you are planning on doing that then tell your bank and exchange some foregn money:)


What was the US foregn policy?

US foreign policy varies with the course of the nation and conditions in the world. Sometimes the US has been isolationist- sometimes it tries to police the world. You must give a date if you want a more definitive answer.


I need to know if U of A has English class for foregn student and they can issue I-20 for Visa ?

Getting A in English classes in your school has nothing to do with I-20 issue. What is important is the TOEFL test that you need to pass and admission essay to get into the university.


What key signature has an F sharp?

Key of F#, key of B, key of E, key of A, key of D, and key of G


What is a dichotmous key?

a dichotomous key is a key a dichotomous key is a key