0% found this document useful (0 votes)
72 views2 pages

Interview Questions About MongoDB

Mongodb question
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
72 views2 pages

Interview Questions About MongoDB

Mongodb question
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

5 Interview Questions about MongoDB

1.What is MongoDB? What is a namespace?


Ans: MongoDB is a document-oriented database that is used for high accessibility,
high performance, and easy scalability. It supports the dynamic schema design. A
namespace is the concatenation of the database name and collection name.
2.What is CRUD in MongoDB?
Ans:

• C – Create: db.collection.insert();
• R – Read: db.collection.find();
• U – Update: db.collection.update();
• D – Delete: db.collection.remove({“fieldname” : ”value”});

3.What is objectId ?

Ans: ObjectId is a class that is the default primary key for the document in
MongoDB. It is found in the _id field of the inserted document. ObjectID is a 12-
byte BSON type. These are:

i.4 bytes value representing seconds


ii.3 byte machine identifier
iii.2 byte process id
iv.3 byte counter

4.What’s a NoSQL Database, What Types Are There, and What Type Is
MongoDB?

Ans: A NoSQL database offers a mechanism for storage and retrieval of data
meant to respond to the unique demands and challenges of today’s modern
applications. NoSQL, which stands for “Not Only SQL” is a departure from the
tabular relations used in relational databases such as SQL and Oracle. Types of
NoSQL databases: a)Document-oriented b)Key-Value Stores c)Graph Stores
d)Wide-Column Stores. MongoDB is the first type, a document-oriented database,
storing data in Binary JSON (BSON) structure-based documents, which in turn are
stored in a collection.
5. What is the difference between MongoDB and MySQL?

Ans: Although MongoDB and MySQL both are free and open source databases,
there is a lot of difference between them in the term of data representation,
relationship, transaction, querying data, schema design and definition,
performance speed, normalization and many more. To compare MySQL with
MongoDB is like a comparison between Relational and Non-relational databases

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy