Android的SQLite的替代品 [英] Android SQLite alternatives

查看:316
本文介绍了Android的SQLite的替代品的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我建立了一个简单的Andr​​oid RPG。每个玩家可以访问的最大的约50士兵。每个士兵有一些统计数据(类,HP,攻击等),以及三个盘点插槽。将有在游戏中只有约100个​​项目,以填补这些库存插槽。我希望能成立,将有士兵台,拥有的项目表,和一些其他各种表的关系数据库。

I'm building a simple android RPG. Each player has access to a maximum of about 50 soldiers. Each soldier has some stats (class, hp, attack, etc), and three inventory slots. There will be only about 100 items in the game to fill these inventory slots. I was hoping to set up a relational database that would have a table for soldiers, a table for items owned, and a few other various tables.

速度是我最关心的。 SQLite是显而易见的首选。然而,这似乎是很笨重,与对行1000的数据库为目标。是否有适用于小型数据库更好的选择?我不需要复杂的查询或什么,只是一种方法来存储数据并将其备份到服务器上。

Speed is my main concern. SQLite is the obvious first choice. However, it seems to be very bulky and geared towards databases with 1000's of rows. Is there a better option for small databases? I don't need complex queries or anything, just a way to store data and back it up to a server.

推荐答案

有两个漂亮的库,使数据持久性Android中更快和更简单的实现(由sqlite的都支持)如下:

There are two nice libs that make data persistance in Android much quicker and simpler to implement (both backed by sqlite) as follows;

橱柜> https://bitbucket.org/qbusict/cupboard

服务器> http://realm.io/news/realm-for-android/

境界是较新的一个,似乎稍好一些,但两者似乎有类似的实现。

Realm is the newer one and seems slightly better but both seem to have similar implementations.

希望这有助于。

这篇关于Android的SQLite的替代品的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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