SenseDeep DynamoDB Single Table Designer

dynamodb-studio

The SenseDeep Single Table Designer is a DynamoDB design tool that can be used to create effective schema-driven, single-table design patterns.

Creating single-table designs has to date been an iterative voyage of exploration. There has been a paucity of design tools and the existing tools prototype data models via an item-by-item incremental fashion. While this demos well, it can result in inconsistent, brittle data models that are not rigorous in defining all application entities, attributes and relationships exactly.

The SenseDeep Designer uses a schema-first design methodology where you define your entities first and then test incrementally with data and queries.

The Designer is both single-table and schema "aware" which means it can validate your data model, data items and queries against your schema.

Going forward, armed with a well designed schema, you DynamoDB design is well equiped to evolve and manage your data in a safe, reliable and predictable manner.

Single Table Designer

The SenseDeep Single Table Designer provides an easy, intuitive interface to create, manage and modify your single-table schemas.

Single-table schemas control how your application data are stored in DynamoDB tables. Schemas define your application entities, table indexes and key parameters. Via schemas, complex mapped table items can be more clearly and reliably accessed, modified and presented.

Once created, your schema can be used with the SenseDeep data browser and the OneTable access library. It can also be imported into other tools such as the AWS WorkBench.

table-design

The Designer stores your single-table schemas in your DynamoDB table. In this manner, your table is self-describing as to how table data should be interpreted. You can export schemas and generate JSON, JavaScript or TypeScript data/code to import into your apps.

The SenseDeep single-table designer works best with the OneTable library, but should work with any consistent single-table design.

Naming and Versioning

Schemas are named and versioned. The default schema is called the Current schema. Other schemas can have any name of your choosing. For example "Prototype".

Schemas have version numbers so that data migrations can utilize the correct versioned schema when upgrading or downgrading data items in your table. The migration manager will select and apply the correct versioned schema when data migrations are run.

Version numbers use Semantic Versioning to indicate and control data compatibility.

The SenseDeep / OneTable schema is documented and specified at Schema Specification.

Entity Models

An entity model defines the valid set of attributes for an application entity. Each attribute has a defined name, type and a set of properties that may be utilized by your DynamoDB access library such as OneTable or an ORM of your choosing.

table-fields

From the list of entity models, you can click on an entity to modify, click Add Model to add a new entity model.

Via the Edit Schema button you can modify the schema name or version. If the schema is a non-current schema, you can also click Apply to Current to apply the contents of the displayed schema to the saved Current schema in the table. This overwrites the previous Current schema.

Entity Fields

Clicking on an entity attribute will display a slide out panel to edit the properties of that attribute.

You can modify the type and any other properties of the type. These properties are defined in the schema and may (or may not) be implemented by your DynamoDB access library. All these are implemented by OneTable.

table-field-edit

The properties include:

  • Name — the name of the attribute.
  • Default Value — a default value to set if not defined when created.
  • Enumerated values — a list of possible values for the attribute.
  • Encrypt — hint the attribute should have an extra layer of encryption.
  • Filter — indicates the attribute can be used in filter expressions.
  • Hidden — the attribute should be hidden in query results by default.
  • Mapped Name — a shorter real attribute name when storing in the table.
  • Nulls — indicates that nulls should be stored in the table vs being removed.
  • Required — the attribute is required to be present when created.
  • Data Type — the attribute data type.
  • Validation Expression — a regular expression to validate all writes to the table.
  • Value template — a JavaScript value template to compose the attribute based on other attribute values.
  • Unique — indicates the attribute must always hold a unique value over all such items.

Export

You can also export your schema in JavaScript, TypeScript or JSON formats via the Export Schema button from the Models list. You can utilize the exported file directly in your OneTable apps to control your database interactions.

Summary

Gaining insight into single-table design patterns is the new frontier for DynamoDB and the SenseDeep DynamoDB Studio is the start of a new wave of tools to elevate and transform DynamoDB development.

Previously, single-table design with DynamoDB was a black box and it was difficult to peer inside and see how the components of your apps are operating and interacting. Now, SenseDeep can understand your data schema and can transform raw DynamoDB data to highlight your application entities and relationships and transform your effectiveness with DynamoDB.

SenseDeep includes a table manager, data item browser, single-table designer, provisioning planner, database migration manager and in-depth table metrics — all of which are single-table aware.

More?

Try the SenseDeep DynamoDB studio with a free developer license at SenseDeep App.

You may also like to read:

Comments Closed

{{comment.name || 'Anon'}} said ...

{{comment.message}}
{{comment.date}}

Try SenseDeep

Start your free 14 day trial of the SenseDeep Developer Studio.

© SenseDeep® LLC. All rights reserved. Privacy Policy and Terms of Use.

Consent

This web site uses cookies to provide you with a better viewing experience. Without cookies, you will not be able to view videos, contact chat or use other site features. By continuing, you are giving your consent to cookies being used.

OK