IndexedDB is a real database built into every modern browser. This playground gives you your own IndexedDB database so you can add records, read them back and query them with simple commands.
It is the best way to understand what IndexedDB stores, how records are found by key, and how an index makes searching by another field possible.
Each playground opens its own real IndexedDB database with one object store called "items" (records are keyed by their id field) and one index on the "category" field.
Your commands use the real IndexedDB API and real transactions. The database belongs only to this playground, so it never mixes with any other data on the site.
Websites use IndexedDB to store larger amounts of structured data in the browser, for example offline data, cached records or drafts.
localStorage stores simple text values. IndexedDB stores whole objects, supports indexes for searching, and can hold much more data.
The index on category lets QUERY find every record with a given category directly, without reading each record one by one.