Use 4.4.3 GridFS Reference The chunks Collection Chapter 4. Data Models 174 $^{19}$https://api.mongodb.org/java/current/com/mongodb/DBRef.html $^{20}$http://mongodb.github.io/node-mongodb-native/api-bson-generated/db_ref.html $^{21}$http://mongodb.github.io/node-mongodb-native/api-generated/db.html#dereference $^{22}$http://search.cpan.org/dist/MongoDBx-AutoDeref/ $^{23}$http://www.php.net/manual/en/class.mongodbref.php/ $^{24}$https://api.mongodb.org/python/current/api/bson/dbref.html $^{25}$https://api.mongodb.org/python/current/api/pymongo/database.html#pymongo.database.Database.dereference $^{26}$https://api.mongodb.org/ruby/current/BSON/DBRef.html $^{27}$https://api.mongodb.org/ruby/current/Mongo/DB.html#dereference-instance_method Each document in the chunks collection represents a distinct chunk of a file as represented in the GridFS store. The following is a prototype document from the chunks collection.: GridFS (page 150) for more information about GridFS. You can choose a different bucket name than fs , and create multiple buckets in a single database. GridFS places the collections in a common bucket by prefixing each with the bucket name. By default, GridFS uses two collections with names prefixed by fs bucket: GridFS stores files in two collections: In most cases you should use the manual reference (page 172) method for connecting two or more related documents. However, if you need to reference documents from multiple collections, consider using DBRefs. MongoDB Documentation, Release 3.0.4 Haskell The Haskell driver contains no support for DBRefs. You can traverse references manually. Java The DBRef 19 class provides support for DBRefs from Java. JavaScript The mongo shell’s JavaScript interface provides a DBRef. Node.js The Node.js driver supports DBRefs using the DBRef 20 class and the dereference 21 method. Perl The Perl driver contains no support for DBRefs. You can traverse references manually or use the Mon- goDBx::AutoDeref 22 CPAN module. PHP The PHP driver supports DBRefs, including the optional $db reference, using the MongoDBRef 23 class. Python The Python driver supports DBRefs using the DBRef 24 class and the dereference 25 method. Ruby The Ruby driver supports DBRefs using the DBRef 26 class and the dereference 27 method. Scala The Scala driver contains no support for DBRefs. You can traverse references manually. • chunks stores the binary chunks. For details, see The chunks Collection (page 174). • files stores the file’s metadata. For details, see The files Collection (page 175). • fs.files • fs.chunks See also: