如何在 DynamoDB 中分配外键?

How to assign foreignkey in DynamoDB?

我正在尝试使用 Dynamo 数据库。我正在尝试测试 Dynamo DB 表,但我无法在其中获取外键。

DynamoDB 没有外键。它是一个不支持那种关系数据的 NoSQL 数据库。表之间没有维护数据完整性,所以这种行为不是内置的。如果你想要这种行为,你将不得不以不同的方式在 DynamoDB 中为你的数据存储建模。

来自 FAQ 的解释,它 不是 关系数据库:

While Amazon DynamoDB tackles the core problems of database scalability, management, performance, and reliability, it does not have all the functionality of a relational database. It does not support complex relational queries (e.g. joins) or complex transactions. If your workload requires this functionality, or you are looking for compatibility with an existing relational engine, you may wish to run a relational engine on Amazon RDS or Amazon EC2. While relational database engines provide robust features and functionality, scaling a workload beyond a single relational database instance is highly complex and requires significant time and expertise.

Dynamodb 没有外键。 Dynamodb 是非关系数据库,但它包含表。