Better Documentation and Examples for CosmosDB #2355
Replies: 2 comments
-
Hi @Baker-Denn Thanks for providing the feedback. Do you have a sample scenario that you are talking about? The data modeling concept is already available in the Azure Cosmos DB documentation. However, let us work on the documentation and end to end sample that would address this scenario. |
Beta Was this translation helpful? Give feedback.
-
Sorry for my delay in responding to this. The day after I asked the question, I got pulled off to another project. The real crux of my question isn't how to model my data for CosmosDB, but how do I map my modeling decisions into DAB? The CosmosDB documentation uses a blog comment metaphor, so I'll use that as my example. The documentation discusses how/when you would nest an object in a document versus referencing a document as one-to-few and one-to-many. That's simple enough but with DAB and the GraphQL schema how do I model that? Using blogs as an example, if a blog has multiple authors (one-to-few) and I opt to nest the Authors[] inside the blog document, should the Author object be specified as a separate entity in the DAB configuration JSON and schema.graphql? If so what, does that look like in the DAB configuration and how is that resolved by the server? If I store my comments in separate documents (one-to-many) and specify them as an entity in the configurations, how does DAB discriminate between a blog and a comment? Is this handled in a manner similar to how EF handles it by automagically specifying a discriminator unless I specifically define one or do I have to declare that field in my schema.graphql and handle the filtering accordingly or is there another way altogether that is more specific to DAB? Thank you for taking the time to look at this. I love CosmosDB and can see enormous value in coupling DAB with it, I just need a little more DAB specific guidance. |
Beta Was this translation helpful? Give feedback.
-
I love that DAB supports CosmosDB, but the documentation is lacking compared to the RDBMS side. I would love to know how to handle documents in the same collection with different schemas and how you can query/join them together. In addition, how do I build a more complicated schema.gql file?
If there were a more complex example, it would answer some of those questions. The example apps are too simplistic to be useful to me as a learning tool.
Beta Was this translation helpful? Give feedback.
All reactions