The Entity Manager package implements rational indexing & cross-shard querying at scale in your NoSQL database so you can focus on your application logic.

Traditional relational database systems like MySQL implement indexing & scaling strategies at a platform level based on schemas defined at design time.

This documentation is under construction! There is a lot to unpack here, so it will be a few weeks before I can call it done. Meanwhile, please feel free to reach out with any questions or feedback!

NoSQL platforms like DynamoDB offer far better performance at scale, but structured index & shard keys must be defined as data elements and exploited by application logic in data retrieval & cross-shard queries.

NoSQL shifts the burden of complexity from the database platform to the developer. Entity Manager sweeps it under the rug.

What is Entity Manager?

Entity Manager encapsulates a provider-agnostic, highly opinionated approach to the single-table design pattern.

With Entity Manager, you can:

  • Define related data entities & structured keys wth a simple, declarative configuration format.

  • Specify a partition sharding strategy that maximizes query performance while permitting planned, staged scaling over time.

  • Add or remove structured index keys from entity data objects with a single method call.

  • Perform paged, cross-shard, multi-index queries with a single method call.

About This Guide

Entity Manager relies heavily on TypeScript’s type system to enforce the structure of your configuration. You can use Entity Manager with Javascript, but Typescript will offer a much better developer experience.

Consequently, this documentation takes a Typescript-first approach! All discussions & code examples will assume you are using Typescript, and we will call out Javascript-specific considerations where appropriate.

The following sections present a breakdown of this guide.

Introduction

  • SQL vs NoSQL – A comparison of the two database paradigms and how Entity Manager bridges the gap.

  • Evolving a NoSQL Database Schema – A deep dive into what a NoSQL database schema actually looks like and how Entity Manager simplifies the problem.

Usage

Packages

The packages in the Entity Manager ecosystem work together to provide a comprehensive solution for NoSQL data management.

entity-manager

Provides core functionality & types for defining entities, manipulating items, and querying data.

entity-manager-demo

A working demonstration of Entity Manager in action. See the companion article for a detailed walkthrough!

entity-client-dynamodb

Convenience wrapper for DynamoDB SDK with enhanced batch processing & Entity Manager support.

entity-tools

Types & low-level functions for entity operations.

mock-db

Mock DynamoDB-style query & scan behavior with local JSON data. Part of the Entity Manager test suite.