How to model and partition data for Cosmos DB starting with the Adventure Works database.
How to migrate a relational data model to Azure Cosmos DB, a distributed, horizontally scalable, NoSQL database.
This repo is used to support a presentation on how to migrate a relational database schema to a NoSQL database like Azure Cosmos DB. This repo contains a Powerpoint presentation and a Visual Studio solution that represents the demos for this presentation with three projects in it:
modeling-demos: This contains the main app that shows the evolution of the data models from v1 to v4
change-feed-categories: This project uses change feed processor to monitor the product categories container for changes and then propagates those to the products container.
models: This project contains all of the POCO classes used in both projects.
uri
and key
values and save locally.uri
and key
information to the appSettings.json file for both the 'change-feed-categories' and 'modeling-demos' VS Project files or right click each project, select 'Manage User Secrets' and enter the same key and values as key-value pairs there.[!IMPORTANT] To minimize cost related to this sample it is recommended to run the 'Delete databases and containers' item from the main menu. This will delete the databases and containers and just leave an empty Cosmos account which has no cost. You can then start the sample again and run 'k' and 'l' menu items to rehydrate the account.
You can download all of the data for each of the 4 versions of the Cosmos DB databases as it progresses through its evolution from the data folder in this repository. You can see the contents of these storage containers below.
You can also download a bak file for the original Adventure Works 2017 database this session and app is built upon.