chapter nine

9 Using NoSQL and cloud storage integrations

 

This chapter covers

  • Integrating .NET Aspire with MongoDB
  • Using Azure Cosmos DB inside .NET Aspire
  • Integrating Azure Table Storage with .NET Aspire
  • Connecting Azure Blob Storage to .NET Aspire

NoSQL refers to any data storage technologies that don’t adhere to the traditional relational structure. Contrary to the term, some of these database technologies use the SQL language (or, at least, a language based on SQL). However, other than this, they don’t consist of standard tables and relationships between them.

There are several types of NoSQL databases, which include the following:

  • Document store: Store data as documents, often in formats like JSON or BSON (e.g., MongoDB, Couchbase, etc.).
  • Key-value store: Store data as key-value pairs, similar to a dictionary (e.g., Redis, DynamoDB).
  • Graph databases: Focus on relationships between data points, representing data as nodes and edges (e.g., Neo4j, ArangoDB).
  • Column-family store: Organize data into columns and rows, but unlike relational databases, columns can vary between rows (e.g., Cassandra, HBase).

There isn’t any single technology that unifies them and even different databases of the same category work differently from each other.

9.1 Hosting a MongoDB component

9.1.1 Introduction to MongoDB

9.1.2 Hosting a MongoDB component

9.1.3 Working with a MongoDB client

9.2 Working with Azure Cosmos DB

9.2.1 Cosmos DB overview

9.2.2 Hosting a Cosmos DB component

9.2.3 Connecting to Cosmos DB

9.2.4 Registering CosmosDB and the background service

9.2.5 Returning data from an API endpoint

9.3 Azure Table Storage integration

9.3.1 Hosting Azure Storage component

9.3.2 Interacting with Azure Table Storage

9.4 Integrating with Azure Blob Storage

9.4.1 Interacting with Azure Blob Storage

9.5 Summary