top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is a Namespace in MongoDB?

+2 votes
2,150 views

Does mongodb uses namespace concept same as what we have learnt in c++?

posted Mar 13, 2016 by Shivam Kumar Pandey

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Namespaces

Namespace Length

The maximum length of the collection namespace, which includes the database name, the dot (.) separator, and the collection name (i.e. .), is 120 bytes.

Number of Namespaces

Changed in version 3.0.

For the MMAPv1 the number of namespaces is limited to the size of the namespace file divided by 628.

A 16 megabyte namespace file can support approximately 24,000 namespaces. Each collection and index is a namespace.

The WiredTiger storage engine is not subject to this limitation.

Size of Namespace File

Changed in version 3.0.

For the MMAPv1 storage engine, namespace files can be no larger than 2047 megabytes.

By default namespace files are 16 megabytes. You can configure the size using the nsSize option.

The WiredTiger storage engine is not subject to this limitation.

answer Mar 29, 2016 by Manikandan J
Similar Questions
+1 vote

Query description: I have a collection name student_db and added a document in a collection with entries (name: "alok, age : 31 and profession: "xyz"). After inserting the document into student_db database, I want to add another (key:value ) pair i.e. salary: 50000.

Can someone help me out to resolve this problem ?

...