0

I noticed MongoDB has a 16 mb limitation. I'm quite new with it and I didn't understand what exactly is this limit.

Is this a limit about the Model I write?

or:

Is this a limit of the data I can store on it?

I wish to start a new project based on MEAN Stack and it require user registration with editable profiles, pictures uploads and more...

Is MongoDB good to handle a project like that even if in future I will have many registered users?

Thanks.

Ayeye Brazo
  • 3,316
  • 7
  • 34
  • 67
  • 1
    It is a limit on a single document (the equivalent to a row in an RDBMS). If a document encompassing a single user could grow larger than 16MB you would hit this limit. – James Wahlin Jul 01 '14 at 18:07
  • If you have a particular field within the document that will fill with large chunk of bits (e.g. picture files) or field that holds a growing array (e.g. page visit history), then instead of embed everything on the same document, you should consider store them in another collection and 'referencing' them. A document should never grow as large as 16MB, as it will take too much system resource to handle them. Manage index will be a nightmare as well – Howard Lee Jul 01 '14 at 22:08

1 Answers1

0

The 16MB limit in MongoDB applies to a single document, which is the equivalent to a row in an RDBMS. So if you had an individual document per user, each user document could grow to 16MB before you hit this limit.

James Wahlin
  • 2,811
  • 21
  • 22