From the course: Microsoft Azure Cosmos DB Developer Specialty (DP-420) Cert Prep: 1 Design and Implement Data Models by Microsoft Press

Unlock this course with a free trial

Join today to access over 23,200 courses taught by industry experts.

Identify primary and unique keys

Identify primary and unique keys

Next exam objective on our journey here is identify primary and unique keys. Now, wait a minute. You might think, "Tim, I'm confused. You said that Cosmos DB has no schema, no constraints. You can kind of simulate those in ways. Is that what you're talking about?" Well, not exactly. The issue of keys, at least how I'm reading the DP-420 exam objective deals with access to the account, and what you're seeing here is a screenshot from the Azure portal that gives you your endpoint address right up here. And notice that the format for that URI is your globally unique account name that you do at creation time, documents.azure.com and you address through Port 443. Now, there's some creativity. There's actually two modes that you can use to connect to your Cosmos endpoint, but most commonly 443, which is HTTPS. And then you can choose either your primary or your secondary key as an API key to authenticate and authorize your requests. Cosmos is a bit different from most other Azure data…

Contents