Sample Header Ad - 728x90

Best practice to store subitems

1 vote
0 answers
36 views
I am going to create my first Dynamodb database table. I have 3 options in my mind: **1. Create a long table where every subitem is a new row.** Example: user John | item 1 | 2021 user John | item 2 | 2022 user John | item 3 | 2023 user Mark | item 1 | 2021 user Mark | item 2 | 2022 **2. Create a short table where subitems are organized inside arrays.** Example: user John | [item 1, item 2, item 3] | ['2021', '2022', '2023'] user Mark | [item 1 ,item 2] | ['2021', '2022'] **3. Create multiple tables.** Example: table John item 1 | 2021 item 2 | 2022 item 3 | 2023 ----------------- table Mark item 1 | 2021 item 2 | 2022 **I would like to know which one is the best practice to get lower bills in AWS host.** EDIT: As requested in the comments for more details about the table, it would be like "save notes on cloud" where users could store comments and links to request later. For example The user Mark discovered a cool website so he creates a note for himself like: "www.coolwebsite.com very interesting... I must check later". I don't know how many users I will have or how many notes will they save in a day... However I think the number of users will be low in the start and the number of notes will not be bigger than 10 in a day.
Asked by L777 (111 rep)
Jan 8, 2023, 12:29 PM
Last activity: Jan 8, 2023, 02:48 PM