I am currently working with a team of developers that is implementing CosmosDB as a backend store, and I have some questions about how it is really supposed to be used.
I get that the documents are supposed to be flat structured, but what exactly does that mean.?
When the data is really relational, and very dependant on one another, is this design correct, or would a SQL database be more suited?
RetailProduct
{
"RetailProductId": "123",
"FriendlyName": "TestRetailProduct",
"WholeSaleProductId": "100"
}
WholeSaleProduct
{
"WholeSaleProductId": "100",
"ProviderID": "112233445566",
"PhysicalItemsIds": ["1000", "2000", "3000"]
}
Provider
{
"ProviderId": "112233445566",
"Description": "ProviderA"
}
There are many more documents linked from either RetailProduct or the WholeSaleProduct, but this is just to give an overview.
Is storing data like this, considered to be good practice for a database like CosmosDB