Difference between revisions of "MongoDB"

From wikieduonline
Jump to navigation Jump to search
 
(90 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[wikipedia:MongoDB|MongoDB]] is an open-source [[document-oriented database]] using a [[JavaScript Programming/AJAX and JSON|JSON]]-like documents with [[database schema|schema]].
+
[[wikipedia:MongoDB]] (Feb [[2009]], [https://trends.google.com/trends/explore?date=all&q=MongoDB&hl=en trends]) is an open-source [[document-oriented database]] using a [[JSON]]-like documents with [[schema]]. Listen by default on [[port]] TCP 27017.
 +
 
 +
* Installation: <code>[[brew tap]] mongodb/brew && [[brew install mongodb-community]]</code>
 +
* Runnig manually: <code>mongod --config /usr/local/etc/[[mongod.conf]] --fork</code>
 +
* [[MongoDB Compass]]: <code>[[brew install mongodb-compass]]</code>
 +
* <code>[[/var/log/mongodb/mongodb.log]]</code>
 +
* <code>[[/var/lib/mongodb/]]</code>
 +
 
 +
== Features ==
 +
* Ad-hoc queries
 +
* Indexing
 +
* [[Sharding]]
 +
* [[MongoDB replication|Replication]]
 +
* Load balancing
 +
* File storage
 +
* Aggregation
 +
* Server-side JavaScript execution
 +
* Capped [[collections]]
 +
* [[ACID]] transactions
 +
 
 +
== Binaries ==
 +
* <code>[[mongo]]</code> MongoDB shell
 +
* <code>[[mongodb]]</code>
 +
* <code>[[mongos]]</code> MongoDB Sharded Cluster Query Router
 +
* <code>[[mongotop]]</code>
 +
* <code>[[mongodump]]</code>
 +
* <code>[[mongorestore]]</code>
 +
* <code>[[mongoexport]]</code>
 +
* <code>[[mongoimport]]</code>
 +
* [[mongoreplay]]
 +
* [[mongostat]]
 +
* [[mongoperf]]
 +
 
 +
== Editions ==
 +
* MongoDB Community Server
 +
 
 +
== Releases ==
 +
* 4.2
 +
 
 +
== Configuration ==
 +
* <code>/etc/[[mongod.conf]]</code>
  
 
== Commands ==
 
== Commands ==
* Connect to mongoDB: <code>mongo</code>
+
* Connect to mongoDB: <code>[[mongo]]</code> or <code>mongo --host IP_TO_CONNECT</code>
* List database: <code>show databases</code>
+
* [[List databases]]: <code>[[show dbs]]</code> or <code>[[show databases]]</code>
* Connect to a database: <code>use <your_db_name></code>
+
* [[Connect to a database]]: <code>[[use]] <your_db_name></code>
* Backup your_db_name database to a file (<code>--archive</code>): <code>mongodump --archive=test.20150715.archive --db your_db_name</code>
+
* Backup your_db_name database to a file (<code>--archive</code>): <code>[[mongodump]] --archive=test.20150715.archive --db your_db_name</code>
 
* Backup database to binary JSON ([[BSON]]) files (<code>--out</code>): <code>mongodump --host mongodb1.example.net --port 37017 --username user --password "pass" --out /opt/backup/mongodump-2011-10-24</code>
 
* Backup database to binary JSON ([[BSON]]) files (<code>--out</code>): <code>mongodump --host mongodb1.example.net --port 37017 --username user --password "pass" --out /opt/backup/mongodump-2011-10-24</code>
 +
* <code>[[mongod]] --smallfiles --oplogSize 128 --replSet rs0 --storageEngine=[[mmapv1]]</code>
 +
* <code>mongod --smallfiles --oplogSize 128 --replSet rs0 --storageEngine=mmapv1 --bind_ip_all</code>
 +
* <code>[[db.myCollection.find]]()</code> or <code>db.myCollection.find().pretty()</code>
 +
* <code>[[show tables]]</code>,  <code>[[show collections]]</code>
 +
* <code>db.users.find({"name": /.*m.*/})</code> or <code>db.users.find({"name": /m/})</code>
 +
* db.YOUR_COLLETION.find().sort({_id:1}).[[limit]](50);
 +
* <code>[[mongo --eval]] "printjson(db.serverStatus())"</code>
 +
 +
== Docker ==
 +
* [[docker logs mongodb]]
 +
 +
== Customers ==
 +
* [[Amadeus]]
  
 +
== Related terms ==
 +
* [[MongoDB Atlas]] cloud service
 +
* [[Eliot Horowitz]] CTO and founder
 +
* [[Ops Manager]]
 +
* <code>[[prometheus]]-[[mongodb]]-[[exporter]]</code>
 +
* [[Rocket.Chat]]
 +
* [[GridFS]]
 +
* [[MongoDB logs]]
 +
* [[MERN]] stack
 +
* [[Amazon DynamoDB]] and [[AWS DMS]]
 +
* [[Collections]]
  
== MongoDB Releases ==
+
== Activities ==
* 4.2 Aug 2019, https://docs.mongodb.com/manual/release-notes/4.2/
+
* Read about [[MongoDB replication]] capabilities https://docs.mongodb.com/manual/faq/replica-sets/
* 4.0 Jun 2018, https://www.mongodb.com/press/mongodb-expands-its-leadership-with-a-number-of-new-product-announcements
+
* Read about MongoDB authentication: https://docs.mongodb.com/manual/core/authentication/ https://stackoverflow.com/questions/4881208/how-to-secure-mongodb-with-username-and-password
* 3.6 Nov 2017, https://www.mongodb.com/blog/post/announcing-mongodb-36
 
* 3.4
 
* 3.2
 
* 3.0
 
* 2.6
 
* 2.4
 
* 2.2
 
* 2.0
 
* 1.8
 
* 1.6
 
* 1.4
 
* 1.2
 
  
 
== See also ==
 
== See also ==
* [[Cassandra]]
+
* {{Cassandra}}
* [[MongoDB changelog]]
+
* {{MongoDB}}
* [[MongoDB Enterprise Kubernetes Operator]]
+
* {{NoSQL}}
 
 
  
 
[[Category:Databases]]
 
[[Category:Databases]]
 +
[[Category:NoSQL]]

Latest revision as of 10:29, 27 March 2024

wikipedia:MongoDB (Feb 2009, trends) is an open-source document-oriented database using a JSON-like documents with schema. Listen by default on port TCP 27017.

Features[edit]

Binaries[edit]

Editions[edit]

  • MongoDB Community Server

Releases[edit]

  • 4.2

Configuration[edit]

Commands[edit]

  • Connect to mongoDB: mongo or mongo --host IP_TO_CONNECT
  • List databases: show dbs or show databases
  • Connect to a database: use <your_db_name>
  • Backup your_db_name database to a file (--archive): mongodump --archive=test.20150715.archive --db your_db_name
  • Backup database to binary JSON (BSON) files (--out): mongodump --host mongodb1.example.net --port 37017 --username user --password "pass" --out /opt/backup/mongodump-2011-10-24
  • mongod --smallfiles --oplogSize 128 --replSet rs0 --storageEngine=mmapv1
  • mongod --smallfiles --oplogSize 128 --replSet rs0 --storageEngine=mmapv1 --bind_ip_all
  • db.myCollection.find() or db.myCollection.find().pretty()
  • show tables, show collections
  • db.users.find({"name": /.*m.*/}) or db.users.find({"name": /m/})
  • db.YOUR_COLLETION.find().sort({_id:1}).limit(50);
  • mongo --eval "printjson(db.serverStatus())"

Docker[edit]

Customers[edit]

Related terms[edit]

Activities[edit]

See also[edit]

Advertising: