DynamoDB Articles

dynamodb

 
 
 
A collection of DynamoDB articles in one place.

Data Modeling for DynamoDB

keys

Data Modeling for DynamoDB Single Table Designs with OneTable

DynamoDB best practices have evolved around single-table design patterns where one database table serves the entire application and holds multiple different application entities.

This design pattern offers greater performance by reducing the number of requests required to retrieve information and lowers operational overhead. It also greatly simplifies the changing and evolving of your DynamoDB designs by uncoupling the entity key fields and attributes from the physical table structure.  
 

DynamoDB Checklist

checklist-cropped

DynamoDB Checklist

This DynamoDB checklist is a collection of the some of the more important items I’ve learned with our SenseDeep serverless developer studio that uses single-table design patterns, NodeJS and the DynamoDB OneTable library in production over the past year.

I hope you will consider them in your DynamoDB projects and use it as a checklist to prompt your adoption of best practices.  
 

DynamoDB OneTable

ring

DynamoDB OneTable

DynamoDB OneTable (OneTable) is an access library for DynamoDB applications that use one-table design patterns with NodeJS.

OneTable makes dealing with DynamoDB and one-table design patterns dramatically easier while still providing easy access to the full DynamoDB API.  
 

DynamoDB OneTable Overview Tour

on-top-of-the-world

DynamoDB OneTable Overview Tour

This overview tour describes the OneTable overview working sample. Step along in VS code with a working sample.

We’ve worked very hard to make the OneTable API expressive, terse and elegant to use. I hope you will find that it makes your DynamoDB developments proceed faster and more easily than every before.  
 

Using DynamoDB with OneTable Schemas

erd

Using DynamoDB with OneTable Schemas

DynamoDB is a key-value and document database that does not enforce a schema for your data. You can store data items where each item may have different attributes and attribute types. Item values may be primitive values, scalars or compound documents.

The DynamoDB OneTable Library enables you to define your single-table entity definitions via a OneTable schema. This makes understanding and working with single-table designs dramatically easier and allows another layer of capabilities over the raw DynamoDB engine.  
 

DynamoDB Studio

dynamodb-studio

SenseDeep has a complete DynamoDB developer studio to support your DynamoDB designs and single-table development.

It includes a table manager, data item browser, single-table designer, provisioning planner, database migration manager and in-depth table metrics.

SenseDeep DynamoDB studio is a comprehensive set of DynamoDB tools that are single-table “aware”. This means SenseDeep can understand your single-table designs and application entity data and can guide your design, queries and monitoring based on this deeper understanding.

DynamoDB with Typescript

typescript

DynamoDB with TypeScript

TypeScript is a scripting language built on JavaScript that provides strong typing support to describe the types and object shapes used in your applications.

DynamoDB is increasingly being used with TypeScript where it provides strong API checks and guarantees. However, is natural to want TypeScript type support for both the API and the data entities that are passed to and from the database.

This post discusses how the DynamoDB OneTable library uses dynamic TypeScript support fully type check DynamoDB data and achieve an elegant solution.

 
 

Understanding DynamoDB Performance

table-single

Managing single-table data and performance can often feel like you are peering at Assembly Language. Composite keys with prefixed and mapped attribute names are single-table design techniques but they can make just reading a single-table item quite difficult.

This post looks at our libraries DynamoDB Metrics, OneTable and the SenseDeep platform that understand your single-table design schema and can create and present detailed metrics to graphically show how your single-table designs are performing.

DynamoDB GSI Attribute Packing

blocks

DynamoDB GSI Attribute Packing

[DynamoDB single-table] designs store multiple entities with different named attributes in a single table. It can be difficult to decide which attribute names should be projected to GSIs as the set of names across the different entities may be large. Furthermore, you cannot change the names of projected attributes after you create the GSI. These issues makes efficient use GSIs more difficult and complicates evolving and changing your design.

OneTable solves this problem by supporting the mapping of different entity attribute into a single GSI projected attribute. It also permits packing multiple attributes into a single GSI attribute.

 
 

DynamoDB Sparse Indexes

fields

DynamoDB Sparse Indexes

DynamoDB provides secondary indexes for fast access via alternate partition and sort keys. By using sparse secondary indexes, you can minimize your DynamoDB storage costs and not compromise on having fast, efficient queries. You can also improve your ability to evolve your data designs in the future.

Using DynamoDB OneTable makes retrieving data from sparse, key-only secondary indexes easy and cost effective. It provides a transparent follow option to retrieve complete data items via sparse, keys-only indexes.

 
 

Evolving DynamoDB Designs

face-palm

Evolving DynamoDB Designs

Conventional wisdom seems to be that changing a DynamoDB design is extremely difficult and you want to avoid it at all costs.

However, with single table designs, this thinking is out of date and today, is just plain wrong.

With single table DynamoDB designs, your keys and attributes are uncoupled from the physical implementation, so you can evolve your DynamoDB design much more easily.  
 

OneTable CLI for Migrations

onetable-cli

OneTable CLI for DynamoDB Migrations

The DynamoDB OneTable CLI is a command line tool for orchestrating DynamoDB migrations when using DynamoDB OneTable and OneTable Migrate.

The CLI is ideal for development teams to initialize and reset database contents and for production use to control and sequence step-wise database upgrades.  
 

Instagram Sample App with DynamoDB and OneTable

instagram

As a fun exercise, I wanted to see how this sample app would be changed, simplified and potentially made easier to maintain by using the OneTable DynamoDB library.

More posts related to DynamoDB

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