Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is Referential Integrity?

Answer Posted / iain hambleton

Expanding on the two previous explanations, imagine any
parent/child relationship, for example a manufacturer and
product relationship that a retailer would have in it's
inventory system. Obviously any product must have been
manufactured by someone (i.e. a product cannot exist
without a manufacturer). Imagine then if in the inventory
system above, some muppet deleted records from the
manufacturer table. This would lead to products existing
in the system without a corresponding manufacturer record -
this is logically inconsistent data (as it does not fit
with the real world situation that the data is trying to
model).

If a foreign key constraint were to have been placed
between the two tables, then the muppet from above would
either have been unable to delete the manufacturer records
without first visiting the products table and deleting all
products that particular manufactures made or when the
manufacturers were deleted, all products linked to them
would have been automatically deleted also (this latter
situation is called a cascade delete – powerful and
dangerous stuff).

Either way, the remaining data would have been left
consistent with the real world manufacturer/product
relationship (though of course large swathes of data may
still have been deleted).

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is sql procedures and functions?

954


What are the advantages of sql?

1005


What is t-sql? : Transact sql

925


What are the datatypes available in pl/sql ?

1042


Why does sql need a server?

988


What are different methods to trace the pl/sql code?

1047


What has stored procedures in sql and how we can use it?

1014


How do I count rows in sql query?

937


What is the difference between rename and alias?

1267


What is parameter substitution in sql?

976


how to use 'mysql' to run sql statements? : Sql dba

983


Explain spool.

1111


how to get a list of indexes of an existing table? : Sql dba

914


How to Execute a Package in PL/SQL.?

1108


what is datawarehouse? : Sql dba

952