Cloud / data
A first table in DynamoDB
Creating a table, adding records with different fields, and deleting the experiment before it becomes a bill.
The fastest way to understand a database service is to make a small table and use it. DynamoDB rewards that approach because its model is different from a relational database. There is no fixed schema for every item, and the primary key is part of the design rather than an afterthought.
Create the table
Open the DynamoDB console and create a table. Give it a name that makes the experiment obvious, then choose a partition key. A simple identifier is enough for a first pass. The key is the one attribute every item must have, so it should reflect the access pattern you expect. A table designed around the wrong key will work in a demo and struggle later.
Once the table exists, open the items view and create a record. Add the key and a few ordinary fields. Then create a second record with the same key structure but a different set of fields. This is the part that makes the model click. DynamoDB does not require every item to share one shape. Sparse attributes are normal, and the application decides what is present.
Read the result as a design lesson
The small experiment shows both the freedom and the responsibility of a flexible item model. Freedom because the data can evolve without a migration for every new field. Responsibility because the application must know which fields are optional and how missing values should behave. A relational database pushes more of that definition into the schema. DynamoDB pushes it into the access layer and the product rules.
Notebook note: the partition key is not a detail to choose after the table is full. It is the first decision because it controls how the workload is distributed.
Clean up the table
Delete the table when the exercise is finished. This is especially important for services that charge by provisioned capacity or stored data. A learning table left running is not a monument to progress. It is an unattended cost. Confirm the table is gone and check the region so that a second table is not hiding in another console view.
The next step is to move beyond the console and think about access patterns. A table is easy to create. A data model that supports the queries the product actually needs takes more care.
Reference shelf
Selected external references for going deeper.