NoSQL API Documents
Learn the advantages and disadvantages of a document database, how to overcome some limitations, and the specific structure in Cosmos DB.
The elephant in the room
Cosmos DB doesn’t use conventional tables to store the data. For the database, everything is a JSON document!
A document representing a game for our store might look like the following:
{"title": "Mario","year": 1983"category": "Platform","price": 20}
But why would anyone prefer JSON over a predefined column-based structure?
No rules
The first thing that comes to mind when thinking about documents is flexibility. Usually, in relational databases, we first need to define a set of columns for our table.
Each column usually has the following:
Name
Type (string, integer, boolean)
A column ...