The Definitive Guide to MongoDB: The NoSQL Database for Cloud and Desktop Computing
by Eelco Plugge, Peter Membrey, Tim Hawkins
Chapter 5. GridFS
We live in a world of high definition video, 12MP cameras, and storage media that can hold 50GB of data on a disc the size of a CDROM. In that context, the 4MB limit for the maximum size of a MongoDB document might seem laughably inadequate. Indeed, you might wonder why MongoDB, which has been designed as a database for today's high-tech age, has such a strange limitation. The short answer: performance.
If the data were stored in the document itself, it would obviously get very large, which in turn would make the data hard to work with. For example, pulling back the whole document would require loading the files in the document, as well. You could work around this issue, but you would still need to pull back the entire file whenever ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access