MongoDB分布式數(shù)據(jù)庫,可視化管理工具使用:NoSQLBooster
NoSQLBooster配置指南:https://www.cnblogs.com/xuliuzai/p/9651800.html
MongoDB學(xué)習(xí)指南:https://www.runoob.com/mongodb/mongodb-tutorial.html
個人感覺MongoDB相對于SQL的優(yōu)勢(?)在于每個數(shù)據(jù)都是有索引的,這樣可以實現(xiàn)快速的查找與排序。
19.5PyQt項目由于需要大量的數(shù)據(jù)計算,所以使用MongoDB進行批處理和聚合操作。
之前在廖雪峰的python3教程中看到過Map和Reduce的概念,待學(xué)習(xí)...
MongoDB基本概念理解:

主要要注意的差別是SQL里的table變?yōu)閏ollection表/集合,行數(shù)據(jù)由row變?yōu)閐ocument
MongoDB不支持表連接查詢,那真的是太棒了嘻嘻嘻。

基本數(shù)據(jù)處理語句:
#建立一個名為runoob的數(shù)據(jù)庫
>use runoob
#查看所有的數(shù)據(jù)庫(沒有新建庫集合會存入test中)
>show dbs
#刪除數(shù)據(jù)庫
>use runoob
>db.dropDatabase()
#新建集合
>use test
>db.createCollection("runoob")
#創(chuàng)建固定集合 mycol,整個集合空間大小 6142800 KB, 文檔最大個數(shù)為 10000 個
>db.createCollection("mycol", { capped : true, autoIndexId : true, size : 6142800, max : 10000 } )
>show collections
#在 MongoDB 中,當(dāng)你插入一些文檔時,MongoDB 會自動創(chuàng)建集合
> db.mycol.insert({"name" : "菜鳥教程"})
#刪除集合
>db.mycol.drop()
#將文檔插入數(shù)據(jù)庫
>db.col.insert({title:'MongoDB教程'
? description:'MongoDB是一個Nosql數(shù)據(jù)庫'
? tags:['mongo','database','Nosql']
? })
#查詢集合中的所有數(shù)據(jù)
>db.col.find()
#更新文檔
>db.col.update({'title':'MongoDB 教程'},{$set:{'title':'MongoDB'}})

#刪除文檔

#以易讀(?)的方式查詢數(shù)據(jù),findOne()只返回一個文檔
>?db.col.find({"by":"菜鳥教程", "title":"MongoDB 教程"}).pretty()
>db.col.find({$or:[{"by":"菜鳥教程"},{"title": "MongoDB 教程"}]}).pretty()

>db.col.find({likes : {$gt : 100}})
#讀取指定數(shù)量的文檔
> db.col.find({},{"title":1,_id:0}).limit(2)
#跳過指定數(shù)量的文檔
>db.col.find({},{"title":1,_id:0}).limit(1).skip(1)