Explore tens of thousands of sets crafted by our community.
Database Design Patterns
10
Flashcards
0/10
Data Mapper Pattern
The Data Mapper Pattern is a layer of software that separates the in-memory objects from the database. Its responsibility is to transfer data between the two while keeping them independent of each other and the mapper itself.
CQRS (Command Query Responsibility Segregation) Pattern
CQRS Pattern separates the responsibility of commands (actions that change data) from queries (actions that retrieve data) to optimize performance, scalability, and maintainability.
Flyweight Pattern
The Flyweight Pattern is used to minimize memory usage or computational expenses by sharing as much as possible with similar objects. In databases, it can help with sharing common data between objects to reduce redundancy.
Multitenancy Pattern
The Multitenancy Pattern allows multiple clients (tenants) to share a single instance of a software application, where the configuration, data storage and data processing resources are logically separated.
Decorator Pattern
The Decorator Pattern allows behavior to be added to individual objects, either statically or dynamically, without affecting the behavior of other objects from the same class. This design is particularly useful when maintaining data integrity or applying specific business rules.
Singleton Pattern
The Singleton Pattern ensures a class has only one instance and provides a global point of access to it. It's often used for managing connections to a database to avoid overhead from multiple connection instances.
Repository Pattern
The Repository Pattern abstracts the data layer, providing a collection-like interface for accessing domain entities. This allows for decoupling the business logic and the data access code.
Unit of Work Pattern
The Unit of Work Pattern keeps track of everything you do during a business transaction that can affect the database. When you're done, it figures out everything that needs to be done to alter the database as a result of your work.
Database Sharding
Database Sharding involves dividing a database into smaller, faster, more manageable pieces called shards. The data is distributed across the shards, each of which is a separate database instance to spread load.
Active Record Pattern
The Active Record Pattern has an object that wraps a row in a database table or view, encapsulates the database access, and adds domain logic on that data. It's a way to access data more intuitively.
© Hypatia.Tech. 2024 All rights reserved.