Databases

Azure Cosmos DB is a a globally distributed multi-model databases that supports the document, graph, and key-value data models. The content in this section is for creating, querying, and managing database resources using the DocumentDB API via REST.

Each Azure Cosmos DB account supports multiple independently named databases. A database is a logical namespace for collections, users, and permissions. The database resource is represented by dbs in the Azure Cosmos DB resource model. Here’s an example of the URI: https://mydbaccount.documents.azure.com/dbs.

Here is a sample representation of a database in Azure Cosmos DB:

{  
  "id":"ContosoDB",  
  "_rid":"rnYYAA==",  
  "_ts":1408056022,  
  "_self":"dbs\/rnYYAA==\/",  
  "_etag":"00004800-0000-0000-0000-53ed3ad60000",  
  "_colls":"colls\/",  
  "_users":"users\/"
}  
Property Description
id Required. This is the only user settable property. It is a unique name that identifies the database, i.e. no two databases will share the same name in an account. The name must not exceed 255 characters.
_rid This is a system generated property. The resource ID (_rid) is a system-generated identifier.
_ts This is a system generated property. It specifies the last updated timestamp of the resource. The value is a timestamp.
_self This is a system generated property. It is the unique addressable URI for the resource.
_etag This is a system generated property that specifies the resource etag required for optimistic concurrency control.
_colls This is a system generated property that specifies the addressable path of the collections resource.
_users This is a system generated property that specifies the addressable path of the users resource.

Tasks

You can do the following with databases:

See Also