Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><a href="http://www.mongodb.org/display/DOCS/GridFS" rel="nofollow">GridFS</a> is a specification for storing large files in MongoDB. MongoDB supports storing binary data directly within BSON documents, however the size is limited by the database's <a href="http://www.mongodb.org/display/DOCS/Documents" rel="nofollow">maximum document size</a> (16MB as of the 1.8 production version of MongoDB; 4MB in older versions).</p> <p>GridFS works by splitting large files into small "chunks", usually 256k in size.</p> <p>GridFS uses two collections to store data:</p> <ul> <li><code>chunks</code> contains the binary segments of files</li> <li><code>files</code> contains metadata including the filename, content type, md5 checksum, and any optional information added by the developer</li> </ul> <p>Each file saved in GridFS will have one document in the <code>files</code> collection and one or more documents in the <code>chunks</code> collection.</p> <p>The GridFS collections also use a prefix (aka namespace). The default prefix is <code>fs</code>, so the default collection names are <code>fs.chunks</code> and <code>fs.files</code>.</p> <p>GridFS collections are stored in normal MongoDB databases, and can be scaled with standard features such as <a href="http://docs.mongodb.org/manual/replication/" rel="nofollow">replication</a> and <a href="http://docs.mongodb.org/manual/sharding/" rel="nofollow">sharding</a>.</p> <h3>Working with GridFS</h3> <p>All of the mongodb.org <a href="http://www.mongodb.org/display/DOCS/Drivers" rel="nofollow">supported drivers</a> implement the <a href="http://www.mongodb.org/display/DOCS/GridFS+Specification" rel="nofollow">GridFS spec</a>.</p> <p>The command-line utility <a href="http://docs.mongodb.org/manual/reference/mongofiles/" rel="nofollow"><code>mongofiles</code></a> can also be used to save, retrieve, list, search, and remove files in GridFS.</p> <h3>Related Links</h3> <ul> <li><a href="http://www.mongodb.org/display/DOCS/GridFS" rel="nofollow">GridFS Overview</a></li> <li><a href="http://www.mongodb.org/display/DOCS/GridFS+Specification" rel="nofollow">GridFS Specification</a></li> <li><a href="http://docs.mongodb.org/manual/reference/mongofiles/" rel="nofollow"><code>mongofiles</code> command line utility</a></li> <li><a href="http://www.mongodb.org/display/DOCS/Drivers" rel="nofollow">mongodb.org supported drivers</a></li> </ul>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload