Contribution to MongoDB topic (#343)
* Responding to questions in Puppet section * responding to some MongoDB questions. * responding to some MongoDB questions * fixing the empty space * fixing a typing error * Update README.md Co-authored-by: andrzejsydor <andrzejsydor@users.noreply.github.com>
This commit is contained in:
parent
6811a827de
commit
47c39f6e9a
14
README.md
14
README.md
@ -1259,18 +1259,27 @@ as key-value pair, document-oriented, etc.
|
|||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>What is a document? What is a collection?</summary><br><b>
|
<summary>What is a document? What is a collection?</summary><br><b>
|
||||||
|
|
||||||
|
* A document is a record in MongoDB, which is stored in BSON (Binary JSON) format and is the basic unit of data in MongoDB.
|
||||||
|
* A collection is a group of related documents stored in a single database in MongoDB.
|
||||||
</b></details>
|
</b></details>
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>What is an aggregator?</summary><br><b>
|
<summary>What is an aggregator?</summary><br><b>
|
||||||
|
|
||||||
|
* An aggregator is a framework in MongoDB that performs operations on a set of data to return a single computed result.
|
||||||
</b></details>
|
</b></details>
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>What is better? Embedded documents or referenced?</summary><br><b>
|
<summary>What is better? Embedded documents or referenced?</summary><br><b>
|
||||||
|
|
||||||
|
* There is no definitive answer to which is better, it depends on the specific use case and requirements. Some explainations : Embedded documents provide atomic updates, while referenced documents allow for better normalization.
|
||||||
</b></details>
|
</b></details>
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>Have you performed data retrieval optimizations in Mongo? If not, can you think about ways to optimize a slow data retrieval?</summary><br><b>
|
<summary>Have you performed data retrieval optimizations in Mongo? If not, can you think about ways to optimize a slow data retrieval?</summary><br><b>
|
||||||
|
|
||||||
|
* Some ways to optimize data retrieval in MongoDB are: indexing, proper schema design, query optimization and database load balancing.
|
||||||
</b></details>
|
</b></details>
|
||||||
|
|
||||||
##### Queries
|
##### Queries
|
||||||
@ -1285,6 +1294,9 @@ as key-value pair, document-oriented, etc.
|
|||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>What is the difference between find() and find_one()?</code></summary><br><b>
|
<summary>What is the difference between find() and find_one()?</code></summary><br><b>
|
||||||
|
|
||||||
|
* `find()` returns all documents that match the query conditions.
|
||||||
|
* find_one() returns only one document that matches the query conditions (or null if no match is found).
|
||||||
</b></details>
|
</b></details>
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
@ -2029,7 +2041,7 @@ This is where data is stored and also where different processing takes place (e.
|
|||||||
<details>
|
<details>
|
||||||
<summary>What is a master node?</summary><br><b>
|
<summary>What is a master node?</summary><br><b>
|
||||||
|
|
||||||
Par of a master node responsibilites:
|
Part of a master node responsibilites:
|
||||||
* Track the status of all the nodes in the cluster
|
* Track the status of all the nodes in the cluster
|
||||||
* Verify replicas are working and the data is available from every data node.
|
* Verify replicas are working and the data is available from every data node.
|
||||||
* No hot nodes (no data node that works much harder than other nodes)
|
* No hot nodes (no data node that works much harder than other nodes)
|
||||||
|
Loading…
Reference in New Issue
Block a user