如何加入 AWS DynamoDB 中的表? [英] How to join tables in AWS DynamoDB?

查看:38
本文介绍了如何加入 AWS DynamoDB 中的表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道整个设计应该基于自然聚合(文档),但是我正在考虑为本地化(语言、键、文本)实现一个单独的表,然后在其他表中使用键.但是,我找不到任何关于这样做的例子.

I know the whole design should be based on natural aggregates (documents), however I'm thinking to implement a separate table for localisations (lang, key, text) and then use keys in other tables. However, I was unable to find any example on doing this.

任何提示都可能有帮助!

Any pointers might be helpful!

推荐答案

你说得对,DynamoDB 不是作为关系数据库设计的,也不支持连接操作.您可以将 DynamoDB 视为一组键值对.

You are correct, DynamoDB is not designed as a relational database and does not support join operations. You can think about DynamoDB as just being a set of key-value pairs.

您可以在多个表中使用相同的键(例如 document_ID),但 DynamoDB 不会自动同步它们或具有任何外键功能.一个表中的 document_ID 虽然名称相同,但在技术上与不同表中的文档 ID 是不同的集合.由您的应用软件来确保同步这些密钥.

You can have the same keys across multiple tables (e.g. document_IDs), but DynamoDB doesn't automatically sync them or have any foreign-key features. The document_IDs in one table, while named the same, are technically a different set than the ones in a different table. It's up to your application software to make sure that those keys are synced.

DynamoDB 是一种不同的数据库思考方式,您可能需要考虑使用托管关系数据库,例如 Amazon Aurora:https://aws.amazon.com/rds/aurora/

DynamoDB is a different way of thinking about databases and you might want to consider using a managed relational database such as Amazon Aurora: https://aws.amazon.com/rds/aurora/

需要注意的一点是,Amazon EMR 确实允许加入 DynamoDB 表,但我不确定这就是您要查找的内容:http://docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide/EMRforDynamoDB.html

One thing to note, Amazon EMR does allow DynamoDB tables to be joined, but I'm not sure that's what you're looking for: http://docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide/EMRforDynamoDB.html

这篇关于如何加入 AWS DynamoDB 中的表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆