如果系统在提交期间崩溃,MySQL 和 SQLite 如何表现?
我有一个 Ruby on Rails 应用程序,它不是很大,但有一个棘手的要求。要求是,如果发生大的提交而发生崩溃,则数据会以某种方式保存。
顺便问一下,在数据库语言中,这样的功能叫什么? :)
理想情况下,我会使用 SQLite 数据库,因为它对于 Ruby 来说是最自然的,但我想知道该数据库在数据恢复和崩溃的情况下有多好?或者这真的不是一个现实的问题吗?
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 is 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Sqlite 这里有关于崩溃行为的非常好的文档:
http://www.sqlite.org/testing.html
http://www.sqlite.org/atomiccommit.html
http://www.sqlite.org/lockingv3.html#how_to_corrupt 原子提交页面又长又详细,但您可以跳到“9.0 可能出错的事情”部分来回答您的问题。
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.