accesspatterns.dev

Items, not rows

Two items in one table can have completely different attributes.

Why

A DynamoDB item is a bag of typed attributes, not a row in a fixed set of columns. The only attribute every item must have is the primary key.

Read the book, then the lamp. They live in the same table and share nothing but their id. Each attribute carries its type with it: S for a string, N for a number, BOOL for a boolean, SS for a string set.

Only the key is fixed. Every other attribute is decided item by item.

Inventory

These rows are real and already here. Running an operation against them downloads a DynamoDB-compatible engine, about 850 KB, and executes it in this tab.

Try an example

A book: it has a title, pages, and a set of tags.

id(pk)
kind
title
pages
tags
name
watts
inStock
lengthCm
when
soldOut
admin
species
waterDays
material
subject
priority
country
population
serves
vegetarian
body
done
percentOff
active
BOOK#dune
bookS
DuneS
412N
sci-fi, classicSS
BOOK#1984
bookS
1984S
328N
dystopiaSS
LAMP#9w
gadgetS
Desk lampS
9N
trueBOOL
CABLE#usbc
gadgetS
USB-C cableS
trueBOOL
100N
EVENT#launch
eventS
2026-06-03S
falseBOOL
EVENT#party
eventS
2026-07-01S
trueBOOL
USER#ada
userS
AdaS
trueBOOL
USER#linus
userS
LinusS
falseBOOL
PLANT#fern
plantS
Boston fernS
3N
GEAR#v60
gearS
V60 dripperS
ceramicS
TICKET#1042
ticketS
Login failsS
highS
PLACE#paris
placeS
FRS
2140000N
RECIPE#ragu
recipeS
4N
falseBOOL
NOTE#todo
noteS
buy milkS
falseBOOL
COUPON#welcome
couponS
20N
trueBOOL

Run an operation to see the raw engine response.

table Inventorykeys iditems 15