首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >是否有一个类似于MySql的示例MongoDB数据库?

是否有一个类似于MySql的示例MongoDB数据库?
EN

Stack Overflow用户
提问于 2011-04-20 07:23:11
回答 7查看 59.8K关注 0票数 71

作为一个新接触Mongo的人,我正在寻找一个可以导入和使用的示例MongoDB数据库。类似于mysql的world或MSSQL的Northwind

有吗?(我在http://www.mongodb.org上找不到任何参考资料,我的谷歌搜索也没有帮助)

EN

回答 7

Stack Overflow用户

发布于 2011-05-19 17:54:55

我找到了this,您可以使用以下命令导入json数据:

mongoimport --db scratch --collection zips --file zips.json

我猜你可以导入你找到的任何json数据,它也支持csv和tsv。希望这能有所帮助。

票数 57
EN

Stack Overflow用户

发布于 2013-10-25 04:04:26

这并不是万能的,但这是让Northwind在MongoDB上迈出的一大步:

https://github.com/tmcnab/northwind-mongo

票数 20
EN

Stack Overflow用户

发布于 2015-09-22 16:38:24

https://github.com/tmcnab/northwind-mongo/archive/master.zip下载Northwind csv文件集合

执行以下命令,将csv导入mongodb

mongoimport -d Northwind -c categories --type csv --file categories.csv --headerline
mongoimport -d Northwind -c customers --type csv --file customers.csv --headerline
mongoimport -d Northwind -c employee-territories --type csv --file employee-territories.csv --headerline
mongoimport -d Northwind -c employees --type csv --file employees.csv --headerline
mongoimport -d Northwind -c northwind --type csv --file northwind.csv --headerline
mongoimport -d Northwind -c order-details --type csv --file order-details.csv --headerline
mongoimport -d Northwind -c orders --type csv --file orders.csv --headerline
mongoimport -d Northwind -c products --type csv --file products.csv --headerline
mongoimport -d Northwind -c regions --type csv --file regions.csv --headerline
mongoimport -d Northwind -c shippers --type csv --file shippers.csv --headerline
mongoimport -d Northwind -c suppliers --type csv --file suppliers.csv --headerline
mongoimport -d Northwind -c territories --type csv --file territories.csv --headerline

这可用于Windows和Liinux操作系统

票数 13
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/5723896

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档