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

Test your knowledge

Let's see whether you can answer the following questions correctly:

  1. On what basis does Azure bill provisioned RUs?
    1. Per-day basis
    2. Per-hour basis
    3. Per-second basis
  2. How many RUs does it cost to read 1 KB of data from Cosmos DB directly referencing the document with its URI or self link?
    1. 1 RU
    2. 10 RUs
    3. 1,000 RUs
  3. Which of the following numbers define the maximum precision for a Cosmos DB index?
    1. -1
    2. 256
    3. 65535
  4. If a collection isn't indexed but you still want to run a query, which of the following properties must be set to true in the FeedOptions instance, which specifies the feed options for the query?
    1. EnableFullScan
    2. EnableNonIndexedCollectionQuery
    3. EnableScanInQuery
  5. If a collection has 10,000 RUs provisioned and you have five physical partitions, how many RUs can be consumed on a single partition?
    1. 50,000 RUs
    2. 10,000 RUs
    3. 2,000 RUs