且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在Azure DocumentDB中执行类似于SQL连接的连接操作

更新时间:2023-02-15 10:08:21

DocumentDB不支持文档间的JOIN ...,相反,JOIN关键字用于执行文档内的跨产品(与嵌套数组).

DocumentDB does not support inter-document JOINs... instead, the JOIN keyword is used to perform intra-document cross-products (to be used with nested arrays).

我建议使用以下方法之一:

I would recommend one of the following approaches:

  • 请记住,您不必像使用传统RDBMS一样规范每个实体.可能值得重新审视数据模型,并在适当的地方对部分数据进行规范化处理.还请记住,非规范化有其自身的取舍(散发写与发行跟进读).请查看以下SO答案,以详细了解权衡归一化与非归一化数据之间.

编写一个存储过程,以在单个网络请求中批处理一系列操作.在下面的代码示例中查看以下答案这种方法.

Write a stored procedure to batch a sequence of operations within a single network request. Checkout the following SO answer for a code sample on this approach.