AWS Builder Center
A Missing Attribute Isn't a Null, It's Just Not There

A Missing Attribute Isn't a Null, It's Just Not There

Why a thin explanation for recommending DynamoDB still worked, and what the sparse, per-item schema in the SimuLearn diagram actually reveals about the difference between "flexible schema" and a relational table full of unused nulls.

Series: AWS SimuLearn: Cloud Practitioner (4 articles)

  1. …
  2. 4
    A Missing Attribute Isn't a Null, It's Just Not There This article
Architect of invisible things that keep visible things alive.
Fourth AWS SimuLearn course, First NoSQL Database. The scenario is a streaming company drowning in viewer behavior data, watch history, pause and rewind patterns, device types, language preferences, and the actual problem underneath it: not every user generates the same kind of data. Someone streaming continuously on one device produces a completely different shape of record than someone jumping between four devices and interacting constantly with the interface.
I recommended Amazon DynamoDB, and I'll be honest about how I explained it in the moment: badly. My actual line was something close to "it's used widely across the world and is useful in handling data and everything," which is barely a justification at all. The AI customer accepted it anyway, and then, in the same breath, supplied the real technical reasoning I hadn't actually given, flexible schema, automatic scaling, serverless, millisecond response times. I got credit for an answer I hadn't fully earned in the moment.
That's worth sitting with rather than just moving past, because the interesting question isn't "did I get the right answer," it's "what was actually true about DynamoDB that made a thin explanation still land."


What "flexible schema" is actually doing in the diagram

The table design in this scenario,  UserVideoHistory , has a partition key ( userId ) and sort key ( lastDateWatched ) that every item shares, and then a set of attributes that don't all show up on every item. Looking at the sample data, one row has a  lastStopTime  value, the next row simply doesn't have that attribute at all, no blank placeholder, no null, it's just absent from that item.
That's the actual mechanism behind "flexible schema," and it's easy to gloss over if you've spent time with relational databases first. In a relational table, every row has every column, and a column a particular row doesn't use gets a NULL sitting there anyway, reserved, accounted for, still part of that row's structure. In DynamoDB, an item's attributes are just whatever that item happens to have. Two items in the same table can have almost entirely different sets of attributes, and neither one is "wrong" or "incomplete" relative to the other.
That maps directly onto the customer's actual complaint: users who stream on one device versus users who jump across four don't produce comparable records, and forcing them into a schema built for the more complex case means every simple case carries a bunch of unused, meaningless nulls. DynamoDB just doesn't ask every item to look the same in the first place.

Why the thin explanation still worked

The honest answer is that the fit here was obvious enough that almost any gesture toward "flexible" was going to land, the customer had already described their exact problem as "each user's data can have completely different attributes," practically handing over the vocabulary themselves. That's a useful thing to notice about myself: getting the right answer with a weak explanation isn't the same as having actually understood why it was right. It just means the problem was well-suited enough to the tool that even a vague gesture in the right direction counted as close enough.

What the lab actually covered

Creating the DynamoDB table itself, adding records with genuinely different attributes to prove the schema-per-item point rather than just being told about it, and querying the table back. The DIY step, adding a new item with a unique  userId  and a  rating  attribute nothing else in the table has, is the same lesson from a different angle: adding a brand new attribute to one item doesn't require touching the schema, or any other item, at all.

Series: AWS SimuLearn: Cloud Practitioner (4 articles)

  1. …
  2. 4
    A Missing Attribute Isn't a Null, It's Just Not There This article
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article