0

I'm working on an application in which I'm in need of a database. I chose NoSQL (DynamoDB) for the app. My Unique ID is set to a user sub but its payload is a list of objects. There are 191 of these objects in the list.

COL1,   COL2
user1, list[191]
user2, list[191]
user3, list[191]

The list obtains object details like:

{
  "district": "Haven Coast",
  "name": "Old Head of Kinsale",
  "position": {
    "lat": 51.619701,
    "lng": -8.542146
  },
  "seen": true,
  "stampAchieved": true
}

I'm thinking that the user can pull their list of objects from the DB (around 30KB - limit 400KB). The user would scan a QR code which would edit the fields in the object of the scanned QR. This new list data would then overwrite the user's list data.

When looking at the database, it looks like I'm reusing the same list for multiple users. I'm wondering if I'm following the best patterns for this use case. Should I columnize the list data?

COL1,    COL2,            COL2,               COL191
user1, district1{...}, district2{...},....district191{...}
user2, district1{...}, district2{...},....district191{...}
user3, district1{...}, district2{...},....district191{...}

If anyone has done something similar or has any input to help me it would be really appreciated.

Did a bit more research and saw subdocument storage, like the below image:

subdocumentimage

Which would be best for the type of use case?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.