user3139545
user3139545

Reputation: 7394

Design Pattern in DynamoDB to query based on dozens of boolean attributes

Given a table with 100 columns containing true-false like properties how do I design the table to enable me to query the table for only the subset of data for which a single column is true.

I know about using sparse indexes, however, this does not scale very well since you are limited by how many indexes you can create. The next thing is to write multiple lines with the same partition key but using different sort keys representing each column.

Upvotes: 0

Views: 84

Answers (1)

Maurice
Maurice

Reputation: 13197

You don't - this is not a use case DynamoDB is good for. It's calling for a relational database.

To do something like this you'd need dozens of secondary indexes, which is not advisable. Use the right tool for the job.

Upvotes: 1

Related Questions