0

:) I recently started working with aws platform, and i'm having a hard time developing one thing. Basically i want to link two different dynamodb tables( like company table and orders table), and one company can have different orders connected to it. The first thing i have done was store in company's table a list of orders id, but the problem is that i cannot index an array, so it is kinda problematic to know the orders in that company, because it cant be done pagination.

I cannot figure out a better solution, so if any of u more experience developers can indicate me a way to store this association, i would be very grateful. Thanks

hiun
  • 21
  • 5
  • How about a table with `CompanyId` as the **Primary Key** and `OrderId` in the **Sort Key**? This should let you query orders for the company, or for a specific Company+Order. – John Rotenstein May 08 '20 at 00:17
  • John Rotenstein thank you for your response! I actually came to the same conclusion as you, and i've done in that way! Thank you sir! – hiun May 09 '20 at 11:20

0 Answers0