E-Book, Englisch, 266 Seiten
Guay Paz Microsoft Azure Cosmos DB Revealed
1. ed
ISBN: 978-1-4842-3351-1
Verlag: Apress
Format: PDF
Kopierschutz: 1 - PDF Watermark
A Multi-Model Database Designed for the Cloud
E-Book, Englisch, 266 Seiten
ISBN: 978-1-4842-3351-1
Verlag: Apress
Format: PDF
Kopierschutz: 1 - PDF Watermark
Learn the main features of Azure Cosmos DB and how to use Microsoft's multi-modal database service as a data store for mission-critical applications. The clear examples help in writing your own applications to take advantage of Cosmos DB's multi-modal, globally distributed, elastic database. Simple step-by-step instructions show how to resolve common and uncommon scenarios involving Azure Cosmos DB, and scenarios such as delivering extremely low response times (in the order of milliseconds), and scaling rapidly and globally.
Microsoft Azure Cosmos DB Revealed demonstrates a multitude of possible implementations to get you started. This book guides you toward best practices to get the most out of Microsoft's Cosmos DB service. Later chapters in the book cover advanced implementation features, helping you master important elements such as securing the database, querying, and using various APIs.
What You'll LearnSet up a development environment to work with Azure Cosmos DB
Configure Azure Cosmos DB in a production environment with multi-region distribution
Query using all APIs, including SQL, JavaScript, MongoDB, and Graph
Work with the Azure Cosmos DB.NET SDK in an application you builtAccess Cosmos DB from web applications created in .NETWho This Book Is For
Developers who build applications to be hosted in Microsoft Azure, whether they use PaaS or IaaS. No previous knowledge of Azure Cosmos DB is assumed, but readers must be familiar with developing applications in Microsoft Visual Studio.
José Rolando Guay Paz is a professional developer with more than 20 years of experience in implementing database-backed applications. He was among the first in Central America to build commercial applications using Microsoft .NET. He has deep experience in Oracle Database and SQL Server, and he is an MCPD in ASP.NET 3.5/4.0, an MCSD in web applications, and an MCTS in SQL Server 2012/2014. José's native language is Spanish; he is fluent in English; and has learned some French. He holds a bachelor's degree in Computer Science, and a master's degree in Finance.
Autoren/Hrsg.
Weitere Infos & Material
1;Table of Contents;5
2;About the Author;10
3;About the Technical Reviewer;11
4;Acknowledgments;12
5;Chapter 1: Introduction to Azure Cosmos DB;13
5.1;What Is Azure Cosmos DB?;14
5.2;Major Features;14
5.2.1;Turnkey Global Distribution;14
5.2.2;Multiple Data Models and APIs;15
5.2.3;Elastically Scale Throughput and Storage on Demand;15
5.2.4;High Availability and Response Time;16
5.2.5;Five Consistency Models;16
5.3;Setting Up the Development Environment;16
5.3.1;Installing Microsoft Visual Studio;16
5.3.2;Installing the Azure Cosmos DB Emulator;24
5.4;Creating a Microsoft Azure Account and Subscription;27
5.5;Provisioning an Azure Cosmos DB Database;33
5.6;Summary;35
6;Chapter 2: Learning Azure Cosmos DB Concepts;36
6.1;Understanding Global Distribution;36
6.1.1;Introducing Write and Read Regions;38
6.2;Understanding the Consistency Models;39
6.2.1;Scope of Consistency;40
6.2.2;Strong Consistency Model;41
6.2.3;Eventual Consistency Model;42
6.2.4;Bounded Staleness Consistency Model;43
6.2.5;Session Consistency Model;44
6.2.6;Consistent Prefix Consistency Model;44
6.2.7;Consistency for Queries;45
6.3;Understanding Partitioning;45
6.3.1;What Are Containers?;45
6.3.2;How Does Partitioning Work?;47
6.3.3;Designing for Partitioning;48
6.3.3.1;Boundary for Query and Transactions;48
6.3.3.2;No Storage and Performance Bottlenecks;48
6.4;Understanding Throughput;49
6.4.1;Specifying Request Unit Capacity;49
6.4.2;Estimating Throughput;50
6.5;Implementing Security;52
6.5.1;Encryption at Rest;52
6.5.2;Firewall Support;53
6.5.3;Securing Access to Data;55
6.5.3.1;Master Keys;55
6.5.3.2;Resource Tokens;56
6.6;Supported APIs;57
6.6.1;Azure Cosmos DB REST API;57
6.6.2;DocumentDB API;60
6.6.3;MongoDB API;62
6.6.4;Graph API;64
6.6.5;Table API;68
6.7;Summary;70
7;Chapter 3: Working with an Azure Cosmos DB Database;71
7.1;Creating Your Database;72
7.2;Defining the Document;79
7.3;Managing Documents;80
7.4;Using the Azure Cosmos DB Emulator to Manage Documents;81
7.5;Managing Documents with an Application;87
7.5.1;Creating the ASP.NET Web Application;87
7.5.2;Creating a Class for the Document;95
7.5.3;Creating the Data Layer;99
7.5.3.1;Querying the Database;107
7.5.3.2;Creating a Document;111
7.5.3.3;Replacing a Document;112
7.5.3.4;Deleting a Document;112
7.5.4;Using the Data Layer in the Controller and Completing the Application;113
7.6;Summary;132
8;Chapter 4: Importing Data into an Azure Cosmos DB Database;134
8.1;Introducing the DocumentDB Data Migration Tool;134
8.1.1;Software Requirements;135
8.1.2;Features of the DocumentDB Data Migration Tool;136
8.1.3;Installing the DocumentDB Data Migration Tool;137
8.1.4;Installing the DocumentDB Data Migration Tool from the Source Code;141
8.2;Importing Data with the DocumentDB Data Migration Tool GUI;149
8.2.1;Importing JSON Files;149
8.2.2;Importing from SQL Server;160
8.2.3;Importing from MongoDB;163
8.3;Importing Data with the DocumentDB Data Migration Tool Command Line Interface;165
8.4;Summary;166
9;Chapter 5: Querying an Azure Cosmos DB Database;168
9.1;Understanding Indexing;168
9.1.1;Understanding the Indexing Mode;171
9.1.2;Understanding Index Paths;172
9.1.3;Adjusting the Indexing Policy;174
9.2;Querying an Azure Cosmos DB Database;176
9.2.1;Learning the SELECT Statement;176
9.2.1.1;Understanding the SELECT Clause;178
9.2.1.2;Understanding the FROM Clause;180
9.2.1.3;Understanding the WHERE Clause;183
9.2.1.4;Understanding the ORDER BY Clause;185
9.2.2;Working with Iterations;186
9.2.3;Understanding Joins;188
9.2.4;Working with Parameterized SQL Queries;189
9.2.5;Using Built-In Functions;190
9.3;Extending the Sample Application;191
9.3.1;Implementing SQL Queries;202
9.3.2;Implementing Parameterized Queries;204
9.3.3;Implementing LINQ Queries;206
9.4;Summary;209
10;Chapter 6: Working with a Globally Distributed Database;211
10.1;Configuring Global Distribution;211
10.2;Configuring Failover;216
10.2.1;Working with Manual Failover;216
10.2.2;Configuring Automatic Failover;217
10.3;Connecting to a Preferred Region;219
10.4;Implementing a Multi-Master Database;221
10.4.1;Application Scenario;221
10.4.2;Implementing the Solution;222
10.5;Summary;226
11;Chapter 7: Advanced Concepts;227
11.1;Working with Transactions;227
11.2;Implementing Stored Procedures;228
11.2.1;Creating a Stored Procedure;233
11.2.1.1;Creating a Stored Procedure in the Azure Portal;233
11.2.1.2;Creating a Stored Procedure Programmatically;234
11.2.2;Executing a Stored Procedure;237
11.3;Implementing Triggers;239
11.3.1;Creating a Trigger;242
11.3.1.1;Creating a Trigger in the Azure Portal;242
11.3.1.2;Creating a Trigger Programmatically;243
11.4;Implementing User-Defined Functions;245
11.4.1;Creating a UDF;246
11.4.1.1;Creating a UDF in the Azure Portal;246
11.4.1.2;Creating a UDF Programmatically;248
11.4.2;Using a UDF;249
11.5;Working with Dates;258
11.6;Backing Up and Restoring Azure Cosmos DB Databases;260
11.6.1;Backup Retention Policy;261
11.6.2;Restoring Databases;261
11.7;Summary;262
12;Index;263




