EZ

Eduzan

Learning Hub

Eduzan
Eduzan / NoSQL

Basic NoSQL Operations

1.1 Basic retrieve Operation

Description: Retrieval in NoSQL databases often involves fetching documents or other data structures from collections or stores.

  • Example (using MongoDB):
db.customers.find({});

Explanation: This MongoDB command retrieves all documents from the customers collection.

1.2 Retrieve Distinct Values

Description: This operation is used to return unique values from a dataset.

  • Example (using MongoDB):
db.customers.distinct("country");

Explanation: Retrieves a list of unique country values from the customers collection.

1.3 Retrieve Limited Set of Data

Description: Similar to SQL’s SELECT TOP, this operation limits the number of records returned.

  • Example (using MongoDB):
db.customers.find({}).limit(10);

Explanation: Retrieves the first 10 documents from the customers collection.

End of lesson.