Documentdb 简明教程
DocumentDB - Introduction
在本章中,我们将简要讨论有关 NoSQL 和文档数据库的主要概念。我们还将对 DocumentDB 进行快速概述。
In this chapter, we will briefly discuss the major concepts around NoSQL and document databases. We will also have a quick overview of DocumentDB.
NoSQL Document Database
DocumentDB 是 Microsoft 最新型的 NoSQL 文档数据库,因此当你谈论 NoSQL 文档数据库时,我们确切地指的是什么,是 NoSQL 还是文档数据库?
DocumentDB is Microsoft’s newest NoSQL document database, so when you say NoSQL document database then, what precisely do we mean by NoSQL, and document database?
-
SQL means Structured Query Language which is traditional query language of relational databases. SQL is often equated with relational databases.
-
It’s really more helpful to think of a NoSQL database as a non-relational database, so NoSQL really means non-relational.
有不同类型的 NoSQL 数据库,包括键值存储,例如:
There are different types of NoSQL databases which include key value stores such as −
-
Azure Table Storage.
-
Column-based stores like Cassandra.
-
Graph databases like NEO4.
-
Document databases like MongoDB and Azure DocumentDB.
Azure DocumentDB
Microsoft 于 2015 年 4 月 8 日正式推出了 Azure DocumentDB,它肯定可以被描述为一个典型的 NoSQL 文档数据库。它具有大规模可扩展性,并且适用于无模式的 JSON 文档。
Microsoft officially launched Azure DocumentDB on April 8th, 2015, and it certainly can be characterized as a typical NoSQL document database. It’s massively scalable, and it works with schema-free JSON documents.
-
DocumentDB is a true schema-free NoSQL document database service designed for modern mobile and web applications.
-
It also delivers consistently fast reads and writes, schema flexibility, and the ability to easily scale a database up and down on demand.
-
It does not assume or require any schema for the JSON documents it indexes.
-
DocumentDB automatically indexes every property in a document as soon as the document is added to the database.
-
DocumentDB enables complex ad-hoc queries using a SQL language, and every document is instantly queryable the moment it’s created, and you can search on any property anywhere within the document hierarchy.
DocumentDB – Pricing
DocumentDB 是基于一个数据库账户中所包含的集合数计费的。每个账户可以有一个或多个数据库,并且每个数据库可以有几乎不受限制的集合数,尽管最初的默认配额为 100。可以通过联系 Azure 支持来取消此配额。
DocumentDB is billed based on the number of collections contained in a database account. Each account can have one or more databases and each database can have a virtually unlimited number of collections, although there is an initial default quota of 100. This quota can be lifted by contacting Azure support.
-
A collection is not only a unit of scale, but also a unit of cost, so in DocumentDB you pay per collection, which has a storage capacity of up to 10 GB.
-
At a minimum, you’ll need one S1 collection to store documents in a database that will cost roughly $25 per month, which gets billed against your Azure subscription.
-
As your database grows in size and exceeds 10 GB, you’ll need to purchase another collection to contain the additional data.
-
Each S1 collection will give you 250 request units per second, and if that’s not enough, then you can scale the collection up to an S2 and get a 1000 request units per second for about $50 a month.
-
You can also turn it all the way up to an S3 and pay around $100 a month.