Data modeling in Azure CosmosDb - Part 1

Starting today, we are commencing a series of articles on modeling data in document-oriented databases with a progressive approach and a particular focus on Azure CosmosDB. Our goal is to blend theoretical concepts with practical implementation, offering clear illustrations of the associated challenges.

Document-oriented databases are a type of NoSQL database that store and retrieve data in a format similar to JSON. In these databases, data is organized as documents, which are collections of key-value pairs or field-value pairs. Each document can contain nested structures, arrays, and other complex data types.

  • Unlike relational databases, document-oriented databases don't require a predefined schema, allowing for more flexibility in the data structure. This flexibility is particularly advantageous when dealing with dynamic or semi-structured data. Document-oriented databases are often used in scenarios where data can vary between different records.

  • Popular document-oriented databases include MongoDB, CouchDB, and Azure Cosmos DB. These databases are widely used in modern web applications, content management systems, and other scenarios where flexible and scalable data storage is essential.

In this series of articles, we will delve into the core principles and demonstrate the shift between the relational paradigm and the document-oriented one. To illustrate the underlying concepts, we will model an ecommerce application, initially in a manner reminiscent of relational databases, and progressively migrate it towards a document-oriented approach.

We referred to the following book to elucidate certain concepts.

NoSQL Distilled (Sadalage, Fowler)

Without further ado and as usual, let's begin with a few prerequisites to correctly understand the underlying concepts. Continue here.