Jump to content

transactions


jimfog

Recommended Posts

DO you think that the placement of an order from a customer(a book for example) is critical enough so as to "register" the specific query as a transaction? I know that money transfers are vital, so making them as transactions is necessary. Do you think that the same applies for orders in a e-shop? Are InnoDB tables the only way to use transactions or is there a way to do it also with MyISAM tables? Thanks.

Link to comment
Share on other sites

myISAM does not support transaction its limited to innoDB. Is their any dependency of any other query or something other must be done simultanously when you order a book? If yes then you can use transaction.

Link to comment
Share on other sites

Is their any dependency of any other query or something other must be done simultanously when you order a book? If yes then you can use transaction.
well,I am not sure, but let us assume that sth other is going to happen in the same time the order will take place.why the above is a reason to use transaction?
Link to comment
Share on other sites

You use a transaction when you have multiple required steps, and if any of them fail you want to undo the entire transaction instead of leaving it half-completed. Like with a bank transaction, you may have one query to remove funds from one account, and another query to add them to another account. If the query to add the funds fails then the query that removed the funds should be rolled back.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...