使用核心数据? [英] Use Core Data or not?

查看:104
本文介绍了使用核心数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个应用程序,向用户显示某些设备的状态。状态可以随时更改,用户将能够刷新数据。我想使用一种存储数据的方式,这样用户总是能够看到最新的状态,而不需要互联网连接,并减少加载时间。

I am creating an app that will show users what the statuses of some devices are. The status can change at any time and the users will be able to refresh the data. I want to use a way of storing the data so users are always able to see the latest state without needing an internet connection and to reduce the loading time.

我目前决定核心数据 SQLite 之间。

推荐答案

首先,核心数据不是数据库。因此,如果你今后感觉到数据库的使用,而不是移动到 SQLite

First of all Core data is not a database. So if you have feeling of database usage in future than move to SQLite.

核心数据是一个管理对象图的框架。核心数据通过将对象图写入磁盘来保持对象图。

Core data is a framework that manages object graph. Core data persist that object graph by writing it to disk.

其中SQLite是一个较轻的SQL版本,因此它限制了SQL语言的一些复杂功能,是一个纯数据库。

Where as SQLite is a lighter version of SQL, So it limits some complex functionality of SQL language, And yes it is a pure database.

核心数据不是一个数据库,你可以像数据库表和属性一样作为列来管理对象和实体。

Core data is not a database how ever you can manage object and entities as like database tables and attributes as a columns.

结论

转到核心数据,数据库连接打开和查询。正如我所说的,它不是一个数据库,所以所有数据库的限制都不在一个图片。

Go for Core data, it will reduce the time of database connection opening and querying. As I said it is not a database so all database limitations are not in a picture.

这篇关于使用核心数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆