NoSQL Workbench

Single-Table Design is hard to visualize in your head. Because you are mixing different entities (Users, Orders, Products) in one table, it can look like chaos.

AWS NoSQL Workbench is a free, cross-platform tool that helps you design, visualize, and query DynamoDB tables.

1. Why use Workbench?

  • Visualizer: See your data as it would look in the table.
  • Facets: Define different “Access Patterns” to see only relevant data.
  • Code Generation: Automatically generate Python, Java, or Node.js code for your table creation.

2. The Workflow

  1. Data Modeler: Define your Table, Partition Key (PK), Sort Key (SK), and GSI.
  2. Visualizer: Add sample data manually to test your design.
  3. Operation Builder: Run queries against your local or remote DynamoDB.

3. Interactive: The “Mini-Modeler”

This simulator mimics the core value of NoSQL Workbench: Visualizing Aggregate Views. Add different entities and see how they form an Item Collection.

Add Data

Visualizer (Item Collection)

          <table style="width: 100%; font-size: 0.7rem; border-collapse: collapse;">
              <thead>
                  <tr style="border-bottom: 1px solid var(--border-light);">
                      <th style="text-align: left; padding: 5px; color: var(--accent-main);">PK</th>
                      <th style="text-align: left; padding: 5px; color: var(--green-500);">SK</th>
                      <th style="text-align: left; padding: 5px;">Attributes</th>
                  </tr>
              </thead>
              <tbody id="model-tbody">
                  <!-- Rows go here -->
              </tbody>
          </table>
          </div>
      </div>
      <div style="font-size: 0.7rem; color: var(--text-muted); margin-top: 10px;">
          All items share the same Partition Key (PK), forming one collection.
      </div>
  </div>
--- ## 4. Best Practices 1. **Iterate Often**: Don't try to get the design perfect on the first try. Use the visualizer to "break" your design. 2. **Mock Access Patterns**: Before writing code, use the workbench to manually run your "Get User" and "Get Orders" queries to ensure they work as expected. 3. **Export JSON**: You can export your model to JSON and commit it to your Git repository so your team can collaborate.