Home / Interview / mongoDB :: General Questions

Interview :: mongoDB

11) Explain the structure of ObjectID in MongoDB.

ObjectID is a 12-byte BSON type. These are:

  • 4 bytes value representing seconds
  • 3 byte machine identifier
  • 2 byte process id
  • 3 byte counter
12) Is it true that MongoDB uses BSON to represent document structure?

Yes.

13) What are Indexes in MongoDB?

In MondoDB, Indexes are used to execute query efficiently. Without indexes, MongoDB must perform a collection scan, i.e. scan every document in a collection, to select those documents that match the query statement. If an appropriate index exists for a query, MongoDB can use the index to limit the number of documents it must inspect.

14) By default, which index is created by MongoDB for every collection?

By default, the_id collection is created for every collection by MongoDB.

15)

What is a Namespace in MongoDB?

Namespace is a concatenation of the database name and the collection name. Collection, in which MongoDB stores BSON objecs.

16) Can journaling features be used to perform safe hot backups?

Yes.

17) Why does Profiler use in MongoDB?

MongoDB uses a database profiler to perform characteristics of each operation against the database. You can use a profiler to find queries and write operations

18) If you remove an object attribute, is it deleted from the database?

Yes, it be. Remove the attribute and then re-save() the object.

19)

In which language MongoDB is written?

MongoDB is written and implemented in C++.

20) Does MongoDB need a lot space of Random Access Memory (RAM)?

No. MongoDB can be run on small free space of RAM.