简体   繁体   English

适用于iPhone的CoreData与FMDB

[英]CoreData Vs FMDB for iPhone

I heard using sqlite for long data transition from database is not efficient so I am planning to use FMDB for iphone but want to know if core data is better or not? 我听说使用sqlite从数据库进行长时间数据转换效率不高,所以我打算将FMDB用于iPhone,但想知道核心数据是否更好?

What will be an efficient way to do it. 什么将是一种有效的方法。 tnx in advance. 提前发送。

FMDB is just an Objective-C wrapper around sqlite. FMDB只是sqlite的Objective-C包装。 As such, it does a good job. 因此,它做得很好。 However, Core Data, when using sqlite as a back-end, may be even more efficient than using sqlite directly, and the framework also provides additional advantages. 但是,当使用sqlite作为后端时,Core Data可能比直接使用sqlite更为有效,并且该框架还提供了其他优势。

Core Data Pro: faster in almost all of the cases, less work to do (Core Data may automatically enforces referential integrity, when setting an entity on one side of a relationships Core Data automatically sets the entity on the other side of the relationships etc). Core Data Pro:在几乎所有情况下都更快,要做的工作更少(当在关系的一侧设置实体时,Core Data可能会自动强制执行参照完整性,Core Data会在关系的另一侧自动设置实体,等等) 。

Core Data Cons: very steep learning curve, especially for advanced features. 核心数据缺点:学习曲线非常陡峭,特别是对于高级功能。

Definitely, I recommend switching to Core Data, especially if you did not start your implementation. 绝对,我建议您切换到核心数据,尤其是在您尚未开始实施的情况下。 The time required to learn how to use it will be more than repaid later. 学习如何使用它所花费的时间将比以后多得多。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM