1

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.

3
  • I think we need more information - size of database, frequency of update etc. Commented Jan 8, 2023 at 12:56
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
    – Community Bot
    Commented Jan 8, 2023 at 12:56
  • The post is updated with extra info about the table.
    – L777
    Commented Jan 8, 2023 at 13:43

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.