What’s the Best AWS Database for Flexible Queries with Multi-Segment Keys?

0
6
Asked By CuriousCat42 On

I'm looking for advice on choosing a database that can handle ordered multi-segment keys, like `country#state#city#area`. I need the ability to perform flexible queries where each segment can either be a fixed value, a wildcard (`*`), or completely unrestricted. For instance, queries like `IN#KA#*#*` should bring back all areas in Bangalore, while `IN#*#BLR#*` would give me every entry for the city of BLR, regardless of state. I want to support wildcards in any segment of the key. I'm specifically seeking an AWS-managed database that can efficiently return all the matching entries without requiring me to know all segment values in advance. Which AWS database (like DynamoDB, DocumentDB, Neptune, or OpenSearch) is the best for these types of wildcard queries?

3 Answers

Answered By DataExplorer92 On

Aurora RDS is a great option too, especially if you're fine with SQL. It could suit your needs, but NoSQL might give you more versatility if you aren't certain about your data access patterns.

Answered By TechWhiz88 On

You might want to consider using DocumentDB since it’s NoSQL, which fits your preference. It handles regex queries well in MQL, so you can achieve flexible query matching just like you’re looking for!

Answered By PragmaticDev On

If you're not entirely sure of your access patterns, I'd recommend sticking with RDS Postgres. It's a solid choice for your needs, and using jsonb can help maintain flexibility as your attributes evolve.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.