Data
15 items tagged with "data"
Patterns15
Repository
Mediates between the domain and data mapping layers via a collection-like interface for accessing domain objects, hiding persistence details.
Unit of Work
Tracks objects affected by a business transaction and coordinates writing out changes and resolving concurrency as a single commit.
Data Mapper
Moves data between objects and a database while keeping them independent, so domain objects carry no persistence knowledge.
Active Record
Wraps a database row in an object that carries both the data and the methods to load, save, and delete itself.
Value Object
Models a concept defined by its attributes rather than identity, making it immutable and compared by value to keep the domain expressive and safe.
Domain Event
Captures something significant that happened in the domain as an explicit object, decoupling the trigger from the reactions to it.
API Composition
Implements a query that spans multiple services by invoking each owner service and joining the results in memory.
CQRS (Command Query Responsibility Segregation)
Separates the model that writes data (commands) from the model that reads it (queries) so each can be optimized independently.
Transactional Outbox
Reliably publishes messages by writing them to an outbox table in the same local transaction as the business data change.
Change Data Capture (CDC)
Captures row-level changes from a database's transaction log and streams them as events to downstream consumers.
Consistent Hashing
Distributes keys across nodes so that adding or removing a node remaps only a small fraction of keys.
Sharding
Horizontally partitions a data store into independent shards so capacity and load scale beyond a single node.
Compensating Transaction
Undo the completed steps of a multi-step operation when one step fails, restoring consistency without distributed ACID transactions.
Index Table
Create secondary index tables over data stores queried by non-key fields to speed up lookups that would otherwise scan.
Materialized View
Precompute and store read-optimized views of data so expensive queries become fast lookups against ready-made results.