Coder Social home page Coder Social logo

garyhopems / cosmicworks Goto Github PK

View Code? Open in Web Editor NEW

This project forked from azurecosmosdb/cosmicworks

0.0 0.0 0.0 59.6 MB

How to model and partition data for Cosmos DB starting with the Adventure Works database.

License: MIT License

C# 98.16% Shell 1.84%

cosmicworks's Introduction

CosmicWorks

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.

Steps to setup

Deploy To Azure

  1. Clone this repository to your local machine.
  2. Click the Deploy to Azure button above. This will provision a new Cosmos DB account in a single region.
  3. When the deployment is complete, click on the Outputs tab in the custom deployment blade. Copy the uri and key values and save locally.
  4. Open the Cosmic Works solution file.
  5. Add the 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.
  6. Right click the 'modeling-demos' project and set as start up. Then press F5 to start it.
  7. On the main menu, press 'k' to create the database and container resources (Note, these are billable resources).
  8. On the main menu, press 'l' to load data. (Note, this can take quite some time and may time out when run locally over low bandwidth connections. Best performance is running on a VM in the same region the Cosmos account was provisioned in.)
  9. Right click the 'change-feed-categories' project and select, Debug, Start new instance.
  10. Finally, put breakpoints for any of the functions you want to run then press the corresponding menu item key to execute.

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.

Source data

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.

cosmicworks's People

Contributors

markjbrown avatar garyhopems avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.