How do MySQL and SQLite behave in case a system crashes during a commit?
I have a Ruby on Rails application which is not very big, but has one sticky requirement. The requirement is that in the event of a big commit there is a crash, that data is saved somehow.
By the way, in database language, what is such a feature called? :)
Ideally I would use the SQLite database since it 开发者_如何学JAVAis most natural to Ruby, but I want to know how good that database is in cases of data recovery and crashing? Or is this really not a realistic concern?
Sqlite has pretty good documentation on crash behavior here:
http://www.sqlite.org/testing.html
http://www.sqlite.org/atomiccommit.html
http://www.sqlite.org/lockingv3.html#how_to_corrupt
The Atomic Commit page is long and detailed but you can skip to the section "9.0 Things That Can Go Wrong" to answer your question.
精彩评论