~/talk

Data Modeling and Partitioning in Azure Cosmos DB

Talkat NDC Oslo 2021 · 2021-11-29..12-03· [databases]
slides:none on file

Migrates an AdventureWorks subset into Azure Cosmos DB, showing embedding customer address/password cuts a three-query cost (~17 RU) to a single 2.83 RU request and using a point read 1 RU when id+partition key are known. Chooses partition keys by access patterns (categoryId for products, customerId for customers+orders), uses change feed to propagate renames (category/tag → product documents), and uses transactional batch to atomically create orders and increment salesOrderCount so a top‑10 customers query can run efficiently. Limits: 2 MB doc, 20 GB logical partition.

AI-written summary · about

  1. 0:00Start
  2. 3:39Is Cosmos Even Suitable for Relational Workload
  3. 4:41Product Tables
  4. 5:47Access Patterns
  5. 8:18Reading Data
  6. 10:19Customer Password
  7. 16:07Logical Partition
  8. 16:36Partition Key
  9. 17:17Constraints
  10. 21:23Cross-Partition Query
  11. 24:18Demo
  12. 27:31Point Read
  13. 32:33Product Tags
  14. 37:45Query Product by Category Id
  15. 40:13Create Products for Category
  16. 40:36Update the Product Category
  17. 41:13Change Feed
  18. 42:44Update Product Category Name
  19. 49:27Query Top 10 Customers Based upon the Number of Sales Orders
  20. 50:52Transactional Batch
  21. 54:39Create a New Order
  22. 55:13Transaction Batch
  23. 57:52Final Design
  24. 58:18Key Takeaways
  25. 1:00:22Podcast
  26. 1:01:34What's the Difference between Cosmos and Dynamodb
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.