Questions tagged [amazon-dynamodb-data-modeling]

Use this tag when your post is about Amazon DynamoDB data modeling.

30 questions
9
votes
3 answers

DynamoDB - Event Store on AWS

I'm designing an Event Store on AWS and I chose DynamoDB because it seemed the best option. My design seems to be quite good, but I'm facing some issues that I can't solve. **The design Events are uniquely identified by the pair (StreamId,…
7
votes
1 answer

DynamoDB time to live per Item

I have a requirement to expire items with different time to live configuration. There are cases where items in table won't expire of certain cases as well. In Cassandra we can set time-to-live while writing at the record level. In DynamoDB I could…
Srini
  • 3,334
  • 6
  • 29
  • 64
4
votes
1 answer

Streams with initial state

I would like to expose something like a subscription or a "sticky query": the goal is to query DynamoDB and return the results via the WebSockets API in API Gateway. Well, whenever DynamoDB changes in a way the query would be affected (I guess I…
3
votes
1 answer

Finding the best way to put a tiered document into DynamoDB

I've been working with regular SQL databases and now wanted to start a new project using AWS services. I want the back end data storage to be DynamoDB and what I want to store is a tiered document, like an instruction booklet of all the programming…
3
votes
2 answers

Modeling Relational Data in DynamoDB (nested relationship)

Entity Model: I've read AWS Guide about create a Modeling Relational Data in DynamoDB. It's so confusing in my access pattern. Access Pattern +-------------------------------------------+------------+------------+ | Access Pattern …
1
vote
1 answer

Single table design of a chat app on DynamoDB, checking if on the right direction

I am all new to NoSQL and specifically DynamoDB single table design. Have been going through a lot of videos and articles on the internet regarding the single-table design and finally I have put together a small design for a chat application which I…
1
vote
2 answers

DynamoDB one-to-one

Hello stackoverflow community, This question is about modeling one-to-one relationships with multiple entities involved. Say we have an application about students. Each Student has: Profile (name, birth date...) Grades (math score,…
1
vote
1 answer

DynamoDB Many to many relation for IAM like service

So, I was trying to build IAM service like Amazon IAM, but simpler. Company has users, groups, and policies. As you can imagine users, groups, and policies has many-to-many relation between each other. Actions: Policies can be added to groups User…
1
vote
2 answers

Query children of One-To-Many Relationship based on date along with parent

I have two entities in my dynamo table: User and Order. Each user has 0..* orders and each order has exactly one associated user. Every order also has a orderDate attribute, that describes when the order was placed. My current table is structured as…
1
vote
1 answer

Is there a better way to model this access pattern than to use two global secondary indexes (GSI)?

I'm trying to figure out the data model and access patterns for an app keeping track of animal movements between different fields (pastures). There are movement records that look like this: PK FROM TO …
1
vote
1 answer

Query all data in DynamoDB without using primary partition key

I am very new to DynamoDB. I want to query all data within certain time range. column = "timerange" is primary sort key column = "name" is primary partition key. I want to get all data within 2 timerange. This is my query. from decimal…
haneulkim
  • 4,406
  • 9
  • 38
  • 80
1
vote
2 answers

Lambda with DynamoDB Trigger on a table Partition Key with more than 500000 distinct values

We are currently designing a dynamodb table to store certain file attributes. There are 2 main columns Date:- This contains the date in YYMMDD format for ex:-20190618 FileName:- xxxxxxxxxxx.json Currently the partition key is Date and sort key is…
0
votes
0 answers

How do I perform a transaction to increment one count and decrement another when an item is being overwritten in DynamoDB?

Currently, I am experimenting with a DynamoDB-based voting system with this single-table design: A vote item Primary Key is composed of a partition key "election_id", the sort key is a "voter_id", and an attribute "candidate" has a value of…
0
votes
1 answer

DynamoDB query and filter based on if a set attribute contains any of the element

I have a table that looks something like the below, which contains some entity and it's ACL. Source - PartitionKey Neighbour - SortKey ACL - Set of Strings Now, say I'm given a list of permissions a user have, is there a way for me to query by…
0
votes
1 answer

DynamoDB database structure for maintenance log

I currently have a maintenance log, tracking jobs performed across various machines (date/running time/new parts etc). Currently, this is backed by a relational database, which automatically increments an id number for each job. I would like to move…
LC1983
  • 240
  • 4
  • 12
1
2