我的应用程序的分布式数据库

Distributable database with my application

我正在使用 node-webkit 创建一个 NodeJs 桌面应用程序,现在使用 MongoDB 作为数据库。 我想将其作为可执行文件分发,用户无需安装数据库即可使用他们自己的本地数据库副本来使用该应用程序。 有没有一种方法可以在安装过程中为他们的数据库制作本地副本。 如果在 MongoDB 中不可能,我应该使用什么其他数据库?

它基于您的数据需求,如果您有大量数据,您应该使用 mongoDB 否则您的 NWJS 应用程序有很多数据库。查看此 link https://github.com/nwjs/nw.js/wiki/Save-persistent-data-in-app some of them are good enough to hold big data. but personally i prefer sqlite3 with NWJS(there is a lot of hustle to install it for NWJS) sqlite can work with large data check this 页面了解更多信息。

如果您要使用 mongoDB,那么您应该下载 zip 而不是安装程序并将其与您的安装程序打包在一起,这样您就可以开始了。 默认情况下 mongoDB 将其数据存储在 /data/db 中,但您可以将其更改为您喜欢的位置