標籤:nis host 發展 klist cat 分布式 菜鳥 Shell for exp
MongoDB
https://www.mongodb.com/
MongoDB Atlas
Database as a Service
The best way to deploy, operate, and scale MongoDB in the cloud.
Available on AWS, Azure, and Google Cloud Platform
Launch a new app or easily migrate to MongoDB Atlas with zero downtime.
官方指導文檔
https://docs.mongodb.com/manual/tutorial/getting-started/
db.collection(‘inventory‘).insertMany([ // MongoDB adds the _id field with an ObjectId if _id is not present { item: "journal", qty: 25, status: "A", size: { h: 14, w: 21, uom: "cm" }, tags: [ "blank", "red" ] }, { item: "notebook", qty: 50, status: "A", size: { h: 8.5, w: 11, uom: "in" }, tags: [ "red", "blank" ] }, { item: "paper", qty: 100, status: "D", size: { h: 8.5, w: 11, uom: "in" }, tags: [ "red", "blank", "plain" ] }, { item: "planner", qty: 75, status: "D", size: { h: 22.85, w: 30, uom: "cm" }, tags: [ "blank", "red" ] }, { item: "postcard", qty: 45, status: "A", size: { h: 10, w: 15.25, uom: "cm" }, tags: [ "blue" ] }]).then(function(result) { // process result})
http://www.runoob.com/mongodb/mongodb-create-collection.html
MongoDB 是一個基於分布式檔案儲存體的資料庫。由 C++ 語言編寫。旨在為 WEB 應用提供可擴充的高效能資料儲存解決方案。
MongoDB 是一個介於關聯式資料庫和非關聯式資料庫之間的產品,是非關聯式資料庫當中功能最豐富,最像關聯式資料庫的。
NoSQL(NoSQL = Not Only SQL ),意即"不僅僅是SQL"。
在現代的計算系統上每天網路上都會產生龐大的資料量。
這些資料有很大一部分是由關聯式資料庫管理系統(RDBMS)來處理。 1970年 E.F.Codd‘s提出的關聯式模式的論文 "A relational model of data for large shared data banks",這使得資料建模和應用程式編程更加簡單。
通過應用實踐證明,關聯式模式是非常適合於客戶服務器編程,遠遠超出預期的利益,今天它是結構化資料存放區在網路和商務應用的主導技術。
NoSQL 是一項全新的資料庫革命性運動,早期就有人提出,發展至2009年趨勢越發高漲。NoSQL的擁護者們提倡運用非關係型的資料存放區,相對於鋪天蓋地的關係型資料庫運用,這一概念無疑是一種全新的思維的注入。
命令列
http://www.runoob.com/mongodb/mongodb-connections.html
以下執行個體我們建立了資料庫 runoob:
> use runoobswitched to db runoob> dbrunoob>
如果你想查看所有資料庫,可以使用 show dbs 命令:
> show dbsadmin 0.000GBlocal 0.000GBrunoob 0.000GB>
可以看到,我們剛建立的資料庫 runoob 並不在資料庫的列表中, 要顯示它,我們需要向 runoob 資料庫插入一些資料。
> db.runoob.insert({"name":"菜鳥教程"})WriteResult({ "nInserted" : 1 })> show dbslocal 0.078GBrunoob 0.078GBtest 0.078GB>
GUI工具 -- mongo-express
https://www.npmjs.com/package/mongo-express
Web-based MongoDB admin interface written with Node.js, Express and Bootstrap3
Features
- Connect to multiple databases
- View/add/delete databases
- View/add/rename/delete collections
- View/add/update/delete documents
- Preview audio/video/image assets inline in collection view
- Nested and/or large objects are collapsible for easy overview
- Async on-demand loading of big document properties (>100KB default) to keep collection view fast
- GridFS support - add/get/delete incredibly large files
- Use BSON data types in documents
- Mobile / Responsive - Bootstrap 3 works passably on small screens when you‘re in a bind
- Connect and authenticate to individual databases
- Authenticate as admin to view all databases
- Database blacklist/whitelist
- Custom CA and CA validation disabling
- Supports replica sets
配置設定
http://www.cnblogs.com/xiaohuochai/p/8794687.html
...if (process.env.VCAP_SERVICES) { var dbLabel = ‘mongodb-2.4‘; var env = JSON.parse(process.env.VCAP_SERVICES); if (env[dbLabel]) { mongo = env[dbLabel][0].credentials; }} else { mongo = { db:‘blogs‘, host:"118.1.1.1", port:27017, ssl:false, username:‘blogs‘, password:‘123456‘, url:"mongodb://118.1.1.1:27017/blogs", // setting the connection string will only give access to that database // to see more databases you need to set mongodb.admin to true or add databases to the mongodb.auth list connectionString: process.env.ME_CONFIG_MONGODB_SERVER ? ‘‘ : process.env.ME_CONFIG_MONGODB_URL, };}...
訪問網頁:
GUI工具 -- NoSQL Manager
https://www.mongodbmanager.com/
MongoDB GUI tool with intelligent Shell for you.
NoSQL Manager for MongoDB
Desktop GUI tool for Mongo database management, administration and development.
MongoDB and GUI 管理介面