A custom entity, based on the provided information, is essentially a key with multiple typed or untyped attributes.
Understanding Custom Entities
In various data management and system contexts, an "entity" represents a distinct object or concept. When we talk about a custom entity, we mean a representation that you define specifically for your needs, going beyond standard or pre-defined types.
The core components of a custom entity, according to the reference, are:
- Key: This typically serves as a unique identifier for the entity. Think of it like a primary key in a database table that distinguishes one entity instance from another.
- Attributes: These are the characteristics or properties that describe the entity. A custom entity can have multiple attributes.
Attribute Types
The reference explicitly mentions that these attributes can be either typed or untyped. For typed attributes, you can define them using specific data types. The types listed are:
- String: Textual data (e.g., "John Doe", "New York").
- Integer: Whole numbers (e.g., 1, 100, -5).
- Float: Numbers with decimal points (e.g., 3.14, -0.5, 99.99).
This means when you create a custom entity, you are defining a structure where each entity instance will have a unique key and associated data fields (attributes) that conform to these specified types (or are untyped, allowing for more flexibility).
Practical Example
Imagine you are building a system to track books. You might define a custom entity called "Book".
Here's how it could break down based on the definition:
- Key: ISBN (a unique identifier for a book)
- Attributes:
Title
(String type)Author
(String type)PublicationYear
(Integer type)Price
(Float type)Genre
(Untyped or String type)
This structure allows you to create many "Book" custom entities, each identified by its unique ISBN and holding specific values for its title, author, year, price, and genre.
Summary of Components
Component | Description |
---|---|
Key | Unique identifier for the entity instance. |
Attributes | Properties or characteristics of the entity. |
Types | Data types for attributes (String, Integer, Float). |
By defining custom entities, systems can be tailored precisely to the specific data and concepts relevant to a particular application or domain, providing a flexible way to model and manage information.