Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Amazon DynamoDB - The Definitive Guide

You're reading from   Amazon DynamoDB - The Definitive Guide Explore enterprise-ready, serverless NoSQL with predictable, scalable performance

Arrow left icon
Product type Paperback
Published in Aug 2024
Publisher Packt
ISBN-13 9781803246895
Length 414 pages
Edition 1st Edition
Languages
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Aman Dhingra Aman Dhingra
Author Profile Icon Aman Dhingra
Aman Dhingra
Arrow right icon
View More author details
Toc

Table of Contents (24) Chapters Close

Preface 1. Part 1:Introduction and Setup
2. Chapter 1: Amazon DynamoDB in Action FREE CHAPTER 3. Chapter 2: The AWS Management Console and SDKs 4. Chapter 3: NoSQL Workbench for DynamoDB 5. Part 2: Core Data Modeling
6. Chapter 4: Simple Key-Value 7. Chapter 5: Moving from a Relational Mindset 8. Chapter 6: Read Consistency, Operations, and Transactions 9. Chapter 7: Vertical Partitioning 10. Chapter 8: Secondary Indexes 11. Part 3: Table Management and Internal Architecture
12. Chapter 9: Capacity Modes and Table Classes 13. Chapter 10: Request Routers, Storage Nodes, and Other Core Components 14. Part 4: Advanced Data Management and Caching
15. Chapter 11: Backup, Restore, and More 16. Chapter 12: Streams and TTL 17. Chapter 13: Global Tables 18. Chapter 14: DynamoDB Accelerator (DAX) and Caching with DynamoDB 19. Part 5: Analytical Use Cases and Migrations
20. Chapter 15: Enhanced Analytical Patterns 21. Chapter 16: Migrations 22. Index 23. Other Books You May Enjoy

Workloads not suited for DynamoDB

Let’s quickly cover a couple of areas that aren’t as well supported with DynamoDB, such as search and analytics. While not technically impossible to implement, often, the requirements are strong enough to warrant a dedicated technology to which to offload these tasks. Just because we are using a NoSQL database, it doesn’t mean that we should shoehorn every workload into it. As I called out in the opening paragraph, it’s better to know when not to use a technology than forcing it to work and ending up with an overly and unnecessarily complex data model because of it.

While DynamoDB does have a very basic ASCII search operator available, this is only available on a sort key attribute or by using filtering on additional attributes. It can only perform left-to-right or exact string matching and does not offer any level of fuzzy matching or in-depth or regular expression matching. Unless your string matching operates at this level, you will need to utilize a dedicated technology for this. An approach often seen, and well documented, is to support search queries with Amazon OpenSearch Service (16, 17A, 17B), or similar.

Unlike some other NoSQL technologies, such as MongoDB (18), DynamoDB does not have any kind of aggregation framework built into it. This means you cannot easily perform analytical queries across results or datasets within your table. If you need to generate sums of data (for dashboarding, for example), this must be done within your application and the results written back into DynamoDB for later retrieval. Although an advanced design pattern using DynamoDB Streams and AWS Lambda could be leveraged to perform some kinds of aggregations, on a holistic level, the database engine itself does not support native operators for aggregation queries.

There is a misconception with NoSQL that once you have created your model, you cannot change it or work with newer and evolving access patterns – that’s untrue. It’s always worth pointing out that with many production applications, it is common for these access patterns to change organically over time. There could be several reasons for this: a change in business model, or a new team or service is introduced to the company that has an alternative access pattern that needs fulfilling. With DynamoDB, you are not strictly “stuck” with your original data model design. The DynamoDB team has got you covered with support for additional indices on your table by using what’s called a Global Secondary Index (GSI) (19).

We will cover data modeling and design in a lot more depth over the coming chapters, giving plenty of opportunity to explore how we build data models and accommodate changes with GSIs – don’t worry if this does not make sense right now, just know that you can support additional access patterns on the same table, without necessarily having to rebuild and restructure the entire table itself.

You have been reading a chapter from
Amazon DynamoDB - The Definitive Guide
Published in: Aug 2024
Publisher: Packt
ISBN-13: 9781803246895
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime