

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is the maximum size of a document in MongoDB?
The document is a record in a collection. Each document has the limitation of 16 MB size. The document is wrapped inside the curly bracket ({}).
Let us create a collection with documents −
> db.demo748.insertOne({_id:101,Name:"Chris",Age:21}); { "acknowledged" : true, "insertedId" : 101 } > db.demo748.insertOne({_id:102,Name:"Bob",Age:20}); { "acknowledged" : true, "insertedId" : 102 } > db.demo748.insertOne({_id:103,Name:"David",Age:23}); { "acknowledged" : true, "insertedId" : 103 } > db.demo748.insertOne({_id:104,Name:"Sam",Age:19}); { "acknowledged" : true, "insertedId" : 104 }
Display all documents from a collection with the help of find() method −
> db.demo748.find();
This will produce the following output −
{ "_id" : 101, "Name" : "Chris", "Age" : 21 } { "_id" : 102, "Name" : "Bob", "Age" : 20 } { "_id" : 103, "Name" : "David", "Age" : 23 } { "_id" : 104, "Name" : "Sam", "Age" : 19 }
- Related Questions & Answers
- What is the MongoDB Capped Collection maximum allowable size?
- Find largest document size in MongoDB?
- Get the real document BSON size in MongoDB?
- What is the maximum size of list in Python?
- What is the maximum size of HTTP header values?
- Find MongoDB document with array containing the maximum occurrence of a specific value
- What is the maximum size of a web browser's cookies value?
- How to update the _id of a MongoDB Document?
- What is the maximum file size we can open using Python?
- Get the storage size of a database in MongoDB?
- Increment a field in MongoDB document which is embedded?
- What is the size of a desert rain frog?
- What is the size of a pointer in C/C++?
- What is the fastest way to update the whole document (all fields) in MongoDB?
- Retrieving the first document in a MongoDB collection?
Advertisements