除了 MongoDB 等之外,还有什么好的面向 Windows 桌面的面向文档的数据库吗?
我一直在寻找适用于 Windows 桌面程序的面向文档的数据库。 MongoDB 似乎是迄今为止最好的,因为与 CoachDB(这是另一种选择,但它似乎更复杂,下载大小几乎 50MB)相比,它更小(11MB)并且更简单,但不幸的是,在 32 位上Windows 中 MongoDB 的数据库大小限制为 2GB,并且他们不打算随时修复此限制。
你有什么推荐吗?要求:
- 开源;
- 无模式,BSON/JSON 格式;
- 易于部署到 Windows 机器。
非常感谢!
I've been searching for a document-oriented DB that for a Windows desktop program. MongoDB seems to be the best one so far, because it's smaller (11MB) and simpler when compared to CoachDB (which is another option but it seems to be more complex and the download size is almost 50MB), but unfortunately, on 32-bit Windows the database size limit in MongoDB is 2GB, and they don't intend to fix this limit anytime.
Do you have any recommendation? Requirements:
- Open source;
- schema-less, in BSON/JSON format;
- Easy to deploy to a windows machine.
Many thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我只是好奇......为什么桌面应用程序需要非关系数据库。我的意思是,这些东西是为高可用性集群和大量数据而设计的,这两者都与桌面应用程序无关,因为桌面应用程序通常一次只有一个用户,并且数据集不是那么大。
如果我是你,我会使用像 HSQLDB 或 SQLite 这样的嵌入式数据库。
现在,如果为了简单起见,您想让它成为无模式的,那么我们只需使用列
id long
和data varchar
创建表,然后序列化/反序列化您的对象访问数据时自己使用 JSON。
您可以在这里看到一种非常简单的方法来执行 JSON 操作:
Voldemort 中任意 HashMap 的 JSON 序列化器
注意:上面链接上的问题是 Voldemort 特定的,但我收到的答案不是,也可以在这里应用(假设您使用的是 Java,如果不是,则必须用您的语言也是一种简单的方法)。
I'm just curious.. Why would you need a non-relational database for a desktop application. I mean, these things are designed for high-availability clusters and a really large amount of data, both of which are irrelevant for desktop apps where you would usually have just one user at a time and not so large dataset.
What I would use if I were you is an embedded database like HSQLDB or SQLite.
Now, if you want make it schema-less for simplicity, well just create your tables only with columns
id long
anddata varchar
And then serialize/deserialize your objects to and from JSON yourself when accessing the data.
You can see a really easy way to do the JSON stuff here:
JSON Serializer for arbitrary HashMaps in Voldemort
Note: The question on link above is Voldemort-specific, but the answer I received isn't and could be applied here as well (assuming you are using Java, if not there has to be an easy way to do so in your language, too).