iPhone 上的 Tokyo Cabinet 与 SQLite3

发布于 2024-07-30 06:19:33 字数 149 浏览 5 评论 0原文

有人用过 iPhone 上的 Tokyo Cabinet 吗? 我很想知道它和 SQLite3 之间是否存在实际性能差异。

另外,SQLite 3具有SQL的表达能力,Tokyo Cabinet有什么查询语言吗?

任何意见将不胜感激,谢谢。

Has anyone used Tokyo Cabinet on the iPhone? I'm interested to see if there are any real world performance differences between it and SQLite3.

Also, SQLite 3 has the expressive power of SQL, does Tokyo Cabinet have any kind of query language?

Any input would be greatly appreciated, thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

翻了热茶 2024-08-06 06:19:33

我没有专门在 iPhone 上使用过它们,但我在各种项目中都使用过它们。 正如您所指出的,SQLite 确实提供了 SQL 查询语言,这意味着您在搜索和查找数据的方式上拥有更大的灵活性。 假设您熟悉 SQL,您将能够轻松过滤、关联和聚合结果。

Tokyo Cabinet 提供了一种不同类型的数据存储系统,它是键值存储。 顾名思义,这些系统用于存储(键,值)对。 存储到TC中的数据必须有一个唯一的可以被引用的key,并且只能由该key来引用。 访问TC的接口基本上就是value=get(key)和set(key,value)。

从查询的角度来看,访问 TC 大致相当于使用 SQLite,并且只允许主键字段和一个其他数据字段。

TC 的主要优点是性能。 是否会好以及好多少在很大程度上取决于工作量。 一般来说,如果您需要的只是键值存储,那么您应该使用 TC,但如果您需要 SQL 查询语言,那么 SQLite 就是。

I have not used either on the iPhone specifically, but I have used both for various projects. Like you pointed out, SQLite does provide SQL query language which means you have much more flexibility in how you can search for and find data. Assuming you are comfortable with SQL you will be able to easily filter, relate, and aggregate results.

Tokyo Cabinet provides a different type of data storage system in that it is a key-value store. As the name implies, these systems are for storing (key,value) pairs. Data stored into TC must to have a unique key which it can be referenced, and it can only be referenced by that key. The interface for accessing TC is basically value=get(key) and set(key,value).

From a query perspective accessing TC is roughly equivalent to using SQLite and only allowing primary key fields and one other data field.

The major benefit of TC is performance. If and how much better it would be depends heavily on the workload. In general, if all you need is a key-value store then you should go with TC, but if you need a SQL query language then SQLite it is.

层林尽染 2024-08-06 06:19:33

BNRPersistence 是一个基于 Tokyo Cabinet 构建的持久对象库,我认为它是一个非常好的解决方案。 网上有 Core Data 和 Tokyo Cabinet 之间的比较。

BNRPersistence is a persistence objects library build over Tokyo Cabinet, I think its a really nice solution. In the web there's a comparison between Core Data and Tokyo Cabinet.

云醉月微眠 2024-08-06 06:19:33

Tokyo Cabinet 许可证不允许您进行静态链接,因此它不能用于 iPhone 开发。

The Tokyo Cabinet license doesn't let you do static linking so it cannot be used for iPhone development.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文