iOS 小白,今天到手一本书 objc 出的《Core Data》,查看译序,有些地方不明白。
书中说 Core Data 不是传统意义上的数据库,而是一套对象图管理系统。这套系统默认使用 SQLite 作为底层存储,通过由低向高地将相关的管理组件构建为一个栈,来提供缓存和对象管理机制。
我的问题:
1、对象图管理系统是什么? Object graph
2、能否举个例子说说 Core Data 这部分的好处?
3、由低向高地将相关的管理组件构建为一个栈又是什么意思?
Orz我还是自学吧..
参考:
Core Data 概述
【译】IOS 数据存储:Core Data vs SQLite
[Cocoa]深入浅出 Cocoa 之 Core Data(1)- 框架详解
SQLite is a lightweight database
It means that the traditional ORM does not use sql to operate the table object. ORM can associate objects and tables.
SQLite itself is a lightweight embedded database written in C and can be used on any system. It can also be used on Android and Windows
Core Data is a system data component only available on OS X and iOS. It can store various types of data. Its underlying layer is based on SQLite. But the upper layer is encapsulated and so on, forming a software stack. You access data and call the Core Data API instead of directly accessing SQLite.
coreData uses sqilite internally
coreData api and the difficulty of using the code have been criticized many times
If you have to use it, I recommend you to use magicrecord, a framework that encapsulates coredata
As for sqplite, it is a very mature framework, and many old apps use it This