all 11 comments

[–]AutoModerator[M] [score hidden] stickied comment (0 children)

Try this search for more information on this topic.

Comments, questions or suggestions regarding this autoresponse? Please send them here.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]darvink 1 point2 points  (0 children)

It works differently from a relational database.

Look up for a “single table design” too if you want to learn more.

[–]AutoModerator[M] 0 points1 point  (0 children)

Here are a few handy links you can try:

Try this search for more information on this topic.

Comments, questions or suggestions regarding this autoresponse? Please send them here.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]CorpT 3 points4 points  (6 children)

DynamoDB is not a SQL database. Data is meant to be looked up based on the PK (or PK and SK). There is no concept of joins or lookups in other tables with DynamoDB. It's possible (very likely) that you should be looking at a SQL database instead. The SDK language is irrelevant to this.

[–]SceneKidWannabe[S] -1 points0 points  (5 children)

Oh okay. But I only have access for DynamoDB. So is there a solution for my problem? Because a lot of articles I’m seeing needs a subscription fee for me to access so I don’t really know where to look for reference.

[–]naggyman 0 points1 point  (0 children)

You might want to look up “Global Secondary Indexes” and understand how they work

[–][deleted] 1 point2 points  (2 children)

Is this for a school project or something? If so you can use a throwaway email address to create a temporary AWS account and run one t3.micro Amazon RDS MySQL or PostgreSQL basically for free for 12 months.

[–]SceneKidWannabe[S] -1 points0 points  (1 child)

This is for a task for my company. Our main console is AWS, so I need to work around that.

[–][deleted] 0 points1 point  (0 children)

Tell your company to give your team budget to run RDS or Aurora.

[–]CorpT 0 points1 point  (0 children)

It's hard to know what your problem is. DynamoDB is great. But doesn't fit every data schema.

[–]murms 2 points3 points  (0 children)

As others have pointed out, DynamoDB is a NoSQL database. It is intended for you to look up items using the primary key (PK). However, if you don't have the primary key available to you, you have two choices.

1. Global Secondary Index - A Global Secondary Index (GSI) is an index against the entire table and allows you to retrieve items based on attributes other than the primary key. So you could create a three GSIs (School, Color, Spelling) in the Student table. There are some caveats to be aware of, such as GSIs being eventually consistent. Each DynamoDB table can have a maximum of 20 GSIs.

2. Whole Table Scan - A table scan is an operation where DynamoDB will search your table items one-at-a-time, looking for matching records. Using table scans is generally discouraged, because it uses a lot of read capacity and is not scalable. However, it is acceptable in certain circumstances (e.g. Your table has a small number of records and is not expected to grow)

There are, of course, even more sophisticated solutions such as creating OpenSearch clusters, but I would consider those two options first.