This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes JDBC and the fly likes Is MySQL transactional? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Is MySQL transactional?" Watch "Is MySQL transactional?" New topic
Author

Is MySQL transactional?

Tejas Jain
Ranch Hand

Joined: Mar 04, 2008
Posts: 119
I thought it is, but my DBA said I need to use InnoDB to get transactional support. Is InnoDB part of MySQL?


"Knowing is not enough, you must apply... Willing is not enough, you must do."
--Bruce Lee
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Yes.
Richard Broersma
Ranch Hand

Joined: Apr 28, 2009
Posts: 63

Take a look at all of the Storage Engines that are part of MySQL. Each offers a different set of features (e.g. advantages and disadvantages.)
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Paul Clapham wrote:Yes.


Well, partly. The MyISAM database engine is not.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Tejas Jain
Ranch Hand

Joined: Mar 04, 2008
Posts: 119
I found InnoDB Engine is transactional, but my DBA told me that InnoDB has no crash recovery support. If it is true, it makes
InnoDB has no real value in production...
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38519
    
  23
Is this of any help?
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14117
    
  16

There are many companies who use MySQL for serious projects. It's not just some toy database that isn't suited for real production use.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Tejas Jain
Ranch Hand

Joined: Mar 04, 2008
Posts: 119
Campbell Ritchie wrote:Is this of any help?


Do you have an URL that shows the official document on crash recovery for InnoDB from MySQL?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Paul Sturrock wrote:
Paul Clapham wrote:Yes.


Well, partly. The MyISAM database engine is not.


I was answering the question in the thread, namely "Is InnoDB part of MySQL?" and not the question in the title of the thread.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Tejas Jain wrote:
Campbell Ritchie wrote:Is this of any help?


Do you have an URL that shows the official document on crash recovery for InnoDB from MySQL?


You know, MySQL does have a website. And it's extremely comprehensive. When I used "crash recovery for InnoDB from MySQL" for my Google keywords it led me directly to this page in the MySQL Reference Manual. I answered your original question tersely because it was a question which was also easily researched.
Martin Vajsar
Sheriff

Joined: Aug 22, 2010
Posts: 3610
    
  60

I'd say it pretty much depends on what does everybody understand under "crash recovery". The database I currently work with can be configured in such a way that data from every single committed transaction can be recovered from backups and redo logs, even in case of media failure. It seems to be a different concept from the one described by the link provided by Paul, though with proper backup strategy maybe similar level of protection could be achieved in MySQL - I don't know MySQL at all.

On the other hand, it also depends on how much value you put on the data in the database. For a social networking site, losing one day worth of data might be not that dramatic problem. For a bank, the same might be a disaster that could put the bank out of business. Both of these enterprises might clearly be labelled "serious business".
Tejas Jain
Ranch Hand

Joined: Mar 04, 2008
Posts: 119
Martin Vajsar wrote: ... The database I currently work with can be configured in such a way that data from every single committed transaction can be recovered from backups and redo logs, even in case of media failure. ...


This is the crash recovery I am looking for. I know Oracle can do it and has tools to help you, but not so sure about MySQL.
Martin Vajsar
Sheriff

Joined: Aug 22, 2010
Posts: 3610
    
  60

Tejas Jain wrote:This is the crash recovery I am looking for. I know Oracle can do it and has tools to help you, but not so sure about MySQL.

It also depends on the infrastructure in your organization.

If there is a DBA that will take care of your database, and he is not willing to support MySQL, there is probably not much more to talk about. If there is not a database that would meet your needs at all, then you'll probably have to hire a new DBA or train somebody to become a DBA of a new database, and at this time additional factors might pop up, but this would probably be a rare situation.

And yes, you do need a DBA to take care of the database. If you're concerned about recovery in case of media failure, you definitely need somebody skilled enough to be absolutely sure of what he is doing to the database.
Arun Kumarr
Ranch Hand

Joined: May 16, 2005
Posts: 513

Dispelling the Myths


If you are not laughing at yourself, then you just didn't get the joke.
 
Consider Paul's rocket mass heater.
 
subject: Is MySQL transactional?