Book Image

Guide to NoSQL with Azure Cosmos DB

By : Gaston C. Hillar, Daron Yöndem
Book Image

Guide to NoSQL with Azure Cosmos DB

By: Gaston C. Hillar, Daron Yöndem

Overview of this book

Cosmos DB is a NoSQL database service included in Azure that is continuously adding new features and has quickly become one of the most innovative services found in Azure, targeting mission-critical applications at a global scale. This book starts off by showing you the main features of Cosmos DB, their supported NoSQL data models and the foundations of its scalable and distributed architecture. You will learn to work with the latest available tools that simplify your tasks with Cosmos DB and reduce development costs, such as the Data Explorer in the Azure portal, Microsoft Azure Storage Explorer, and the Cosmos DB Emulator. Next, move on to working with databases and document collections. We will use the tools to run schema agnostic queries against collections with the Cosmos DB SQL dialect and understand their results. Then, we will create a first version of an application that uses the latest .NET Core SDK to interact with Cosmos DB. Next, we will create a second version of the application that will take advantage of important features that the combination of C# and the .NET Core SDK provides, such as POCOs and LINQ queries. By the end of the book, you will be able to build an application that works with a Cosmos DB NoSQL document database with C#, the .NET Core SDK, LINQ, and JSON.
Table of Contents (13 chapters)
Title Page
Packt Upsell
Contributors
Preface
Index

Summary


In this chapter, we learned the necessary steps for composing and executing queries against a Cosmos DB collection that uses the SQL API. Now we are able to select the most appropriate tool based on our specific needs.

We understood query results for the Cosmos DB SQL dialect. We learned that the results are JSON arrays. We used the different tools to check the resource units that Cosmos DB charges for each query and we understood its impact on the available resource units after a query is executed.

We worked with schema-agnostic queries and we used many built-in functions, including type-checking and array functions. We worked with joins, array iterations, projections, and aggregate functions. We understood how to take advantage of the Cosmos DB SQL dialect to work with a schema-agnostic document database.

Now that we have a very clear understanding of the document database and its SQL dialect, we will use the .NET Core SDK and C# to code and tune our first Cosmos DB application, which...