Explain it simpler
DynamoDB is a database that stores items like rows in a giant, very fast filing system. Every item has a key, like a label on a folder. The first part of the key, the partition key, decides which drawer it goes in; an optional second part, the sort key, decides its order inside that drawer. Asking for one drawer and a range of folders is a Query, which is fast. Opening every drawer and checking every folder is a Scan, which is slow and costly. Indexes are extra filing systems sorted a different way. Capacity units are how you pay for reading and writing, and reads can be instantly up to date or a moment behind.
Halcyon Games launched its new mobile puzzle app on Friday, and by Saturday the DynamoDB bill had jumped and players were complaining that the leaderboard took seconds to load. Sana, the developer on call, opens the code and finds the leaderboard runs a Scan across every score ever recorded and then filters for one game. A product manager asks for a new feature, finding all players by country, on a table that already exists. Finance asks why reads cost what they cost. And a tester reports that a score she just saved did not appear when she refreshed. Sana has one weekend to fix the design, do the math and explain consistency. Where should she start?
Amazon DynamoDB is a serverless key-value and document database. It delivers consistent single-digit-millisecond performance at almost any scale, but only if you design around its keys. It is heavily tested on the AWS Certified Developer – Associate (DVA-C02) exam, including capacity arithmetic, so work through the numbers in this lesson rather than just reading them.
Keep reading for free
Create a free StudyToCert account to read the rest of this lesson: 8 more sections, 7 key terms, a real-world example, an exam tip and self-check questions. Every lesson, lab and practice test is free with an account.