entity
A thing in an application's domain with its own identity, such as a user, account or product, usually stored in a database.
In more detail
Two entities with identical fields are still different things if their identities differ. In a database an entity is usually a row identified by its primary key, and object-relational mappers map entity classes to tables. Entities often hold keys and internal fields that should not be exposed, so request and response shapes are kept separate and mapped at the boundary.
Related terms
- Entity Framework Core — Microsoft's object-relational mapper for .NET, which lets code query and save database data as C# objects and translates LINQ into SQL.
- DTO — A plain object whose only job is to carry data across a boundary, such as the body of an API request or response.
- object mapping — Copying data from one type to another across a boundary, such as from a database entity to an API response record.
- primary key — The column, or columns, whose value uniquely identifies each row of a table and can never be NULL.
- data model — The description of what data a system stores, how it is grouped into records, and how those records relate.
- workload table — A table listing each entity with its hottest read, write rate, size and the invariant it must keep, used to choose storage.
- aggregate — A cluster of related data that is always loaded, changed and saved together as one unit, such as an order with its line items.
- repository pattern — Putting all the code that reads and writes one kind of data behind a single object, so the rest of the app never talks to the database directly.
- utility types — Generic types built into TypeScript, such as Partial, Pick and ReturnType, that compute a new type from an existing one.
Taught in
- Entity Framework Core: Code First and Migrations — Modern .NET Core, C# & Enterprise Microservices
- The Repository Pattern — Modern .NET Core, C# & Enterprise Microservices
- Manual Object Mapping — Modern .NET Core, C# & Enterprise Microservices
- The Storage Decision: Relational Versus Document — Scalable System Design & Distributed Architecture
- Consistency, And The Truth About CAP — Scalable System Design & Distributed Architecture
- Cache Invalidation And The Three Hard Cases — Scalable System Design & Distributed Architecture
- any Versus unknown: Defensive Typing In Practice — Production TypeScript
- Optional Properties, Readonly And Index Signatures — Production TypeScript
- Union Types, Intersections And Property Conflicts — Production TypeScript
- Discriminated Unions: Tagged Variants And Pattern Matching — Production TypeScript
- Tuples: Fixed Length, Labeled Elements And Variadic Tuples — Production TypeScript
- Generic Interfaces, Classes And Type Aliases — Production TypeScript
- Core Utilities: Partial, Required, Readonly, Pick And Omit — Production TypeScript
- Mapped Types, Key Remapping With as And Template Literals — Production TypeScript
- Modern Decorators: Stage 3 Standards And Class Metadata — Production TypeScript
- The Spine Artifact: Generating Typed Models From OpenAPI — Production TypeScript