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...


does PHP support foreign key and Rollback?yes or not.if not
then why. how will you done these concept in php?



does PHP support foreign key and Rollback?yes or not.if not then why. how will you done these conce..

Answer / praveen

PHP supports Foreign Keys in InnoDB Storage Engine in
version and above 4.0. It checks the foreign key referential
integrities on Delete and Select statements. If you strictly
needed the foreign keys and speed is not a concern then you
can create table structures using InnoDB Storage Engine.


Where as MyISAM Storage Engines does not allow foreign key
concept. But it will parse the table that contains foreign
keys but wont check the referential integreties. So it is
the job of the designer/programmer to check the desired key
and its dependency in multiple tables.

Let us suppose you have a field F1(primary)in Table1 and
this field is referenced in another tables denoted as (F2,
F3) in tables Table2, Table3......(as a foreign key)

and when you want to perform a DELETE operation/query based
on field F1, then
First you need to write a query to Delete the specified row
in Table1
and you also need to write a query to Delete all
dependent/referenced rows in other tables Table2, Table3...

Is This Answer Correct ?    6 Yes 0 No

Post New Answer

More PHP Interview Questions

Tell me what is the definition of a session?

0 Answers  


How to write the form tag correctly for uploading files?

0 Answers  


Is it easy to learn php?

0 Answers  


Which is better wamp or xampp?

0 Answers  


How to convert one date format into another in php?

0 Answers  


How to get the value of current session id?

0 Answers  


Which function will suitably replace 'x' if the size of a file needs to be checked? $Size=x(filename);

0 Answers  


What are the __construct() and __destruct() methods in a php class?

0 Answers  


Write a program in php to reverse a number?

0 Answers  


What is a composer?

0 Answers  


what is the importence of session.save_path in Php.ini file and wht changes u've to made before using sesssions in ur php program first time?

4 Answers  


How php statement is different from php script?

0 Answers  


Categories