I read that MongoDB has a limit of 4Mb per document. I'm not mistaken?

0 like 0 dislike
3 views
Especially it is not clear if it is recommended to de-normalize the data — for example, to store the comments to the review...

comment:{Id:..., Text: ..., comments: []}


This is because you hit the limit and pipe...
by | 3 views

7 Answers

0 like 0 dislike
In version 2.2, the size of one document is increased to 16M. Although, as said a above, GridFS allows you to store any file of any size. Even those that exceed the size of one physical computer in the cluster.
by
0 like 0 dislike
To bypass limitations of GridFS, it seems :)
by
0 like 0 dislike
have Mongo there is another more interesting limitation www.mongodb.org/display/DOCS/Using+a+Large+Number+of+Collections
\r
it bothers me more than the 4MB write
by
0 like 0 dislike
This is configured.
by
0 like 0 dislike
I think the problem is somewhat far-fetched, because review the review can be stored flat with foreign key. For data more than 4MB is GridFS.
by
0 like 0 dislike
That's how many reviews to write for 4 MB. Even on 32 bit machines, the total database size is 2 GB, just started.
GridFS for binaries, I don't think this is the best solution.
In an extreme case it is possible to specify the maximum number of comments stored in a single document and when you reach to open with new DBRef (foreign key) to the primary.
by
0 like 0 dislike
1) For text data — 4MB is a lot, all binary data will go into GridFS
2) In version 1.7 it will be possible to tune
3) If you go beyond 4MB, it is solved by changing the database structure — for example make a collection of reviews of "flat" with links. More options for working with tree data in Mongo cm www.mongodb.org/display/DOCS/Trees+in+MongoDB vansickle, Today at 23:07
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
0 comments
1,107 users