The Kladde stores everything in Azure SQL, and at the end of this lesson it will keep doing so. Still, it is worth a look at two other databases that Azure offers: Azure Cosmos DB, a document database that grows practically without an upper limit, and Azure Database for PostgreSQL, which stores and searches vectors with the extension pgvector. You will meet both again in the AI track, and Cosmos DB is a topic of the AI-200 exam.
The core of the lesson is a field report: a state that grows with the data until the database no longer accepts it. The mistake exists in every database. In Cosmos DB it has a hard limit, and at that limit you learn how to split data properly.
Relational or document
| relational (Azure SQL, PostgreSQL) | documents (Cosmos DB for NoSQL) | |
|---|---|---|
| Shape | tables with fixed columns, relationships through keys | JSON documents, each may look different |
| Queries | arbitrary joins across many tables | cheapest within one partition key; joins only within a document |
| Rules in the database | foreign keys, unique indexes, CHECK, transactions across many tables |
unique keys per partition, transactions only within one partition key |
| Growth | one database that you make bigger | spreads itself over many partitions |
| Cost | by compute and storage | by request units (throughput) and storage |
For the Kladde, that means: Contacts belong to companies, bookings to appointments, and that an appointment is not booked twice has been ensured since lesson 2.4.10 by a unique index in the database. That is relational work. Cosmos DB plays to its strengths with other data: many writes from many devices, data in several regions at once, documents whose shape changes constantly.