(F) MongoDB Flashcards

1
Q

What is MongoDB

A
  • MongoDB is a document-oriented NoSQL database, ideal for handling large volumes of data with a flexible schema.
  • Mongo’s flexiblity supports polymorphic data structures making it ideal for dynamic environments based on changing requirements.
  • Its scalability suits cloud based systems and high-demand applications.

Sidenote:
MongoDB is not a relational database. It’s a document-oriented NoSQL database, meaning it stores data in flexible, schema-less documents, rather than in tables with fixed schemas like relational databases.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is MongoDB architecture and its 4 components.

A
  • MongoDB’s querying process involves analyzing queries for optimal indexing, translating them into document requests
  • The database server manages data storage and retrieval efficiently using the storage engine.
  • Replica sets ensure high availability and data redundancy by distributing data across primary and secondary nodes.
  • Sharding enables MongoDB to horizontally scale by partitioning data across multiple machines.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Advantages and Disadvantages of MongoDB

A

Advantages
- Scalability: easy to scale out using sharding and replication
- Flexible schema: allows dynamic modification of the schema without downtime
- Performance: Optimized for both read and write operations, supports in-memory processing

Disadvantages
- Memory Usage: Higher memory usage due to its data storage format (BSON) compared to a traditional relational databases.
- Management Complexity: Sharding and replication can introduce complexity in management and maintenance
- Eventual Consistency: MongoDB offers eventual consistency, which might not be adequate for applications requiring immediate consistency across all nodes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is MongoDB query language?

A

-MongoDB uses MQL (MongoDB Query Language), which is a language designed for easy data manipulation and retrieval from single collections.
- Secondly is Aggregation Framework: A powerful framework that allows performing complex data processing and transformation operations through a multi-stage pipeline.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is MongoDB data model?

A

MongoDB organizes data in documents, which are grouped into collections. Documents can contain many levels of nested structures, and a collection can store a variety of documents. This flexibility allows the data model to closely match the needs of application.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is MongoDB Data Storage?

A

MongoDB uses the WiredTiger storage engine by default, which supports data compression and is optimized for high concurrency and low latency. Data is stored in collections of BSON documents that supports both replication and sharding to enhance performance and ensure data integrity.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly