Segregate Service Entities
Entities
Introduction
An entity is a distinct, identifiable object or concept in a system that can have data stored about it. It is a fundamental component of data modelling, particularly in database design and Entity-Relationship (ER) modelling.
Dashboard
Dashboard provides a quick overview of recent activities, helping users efficiently manage and access entities. It includes:
- Recent DB Entities
- Recent Service Entities
- Recent Queries
- Recent Stored Procedures
This feature allows users to quickly add, access, and edit recent items. If a user is accessing the Entities module for the first time, an empty screen with a "No Entities Found" message will be displayed.
Explorer
The Explorer panel allows users to create and manage different types of entities. The structure of the panel includes:
| Option | Functionality |
|---|---|
| Search | Search for entities, queries, constants, stored procedures, and deployment scripts. |
| DB Entities | Create and manage database entities. |
| Service Entities | Create and manage service entities. |
| Queries | Develop queries. |
| Server Constants | Create and manage stored procedures. |
| UI Constants | Create and manage UI constants. |
| DB Deployment Scripts | Create and manage database deployment scripts. |
Organizing Entities
It is recommended to organize Database entities (persistent) and service entities (non-persistent) into folders for better management, scalability, and maintainability of an application. Structuring entities into logical folders enhances readability and makes it easier to navigate complex applications.
Benefits of Organizing Entities in Folders
- Improved Organization – Helps categorize entities based on functionality, domain, or module.
- Enhanced Maintainability – Makes it easier to locate and manage entities in large applications.
- Better Collaboration – Allows teams to work efficiently by structuring entities logically.
- Scalability – Supports future expansion by keeping entities grouped in a structured manner.
- Faster Development – Simplifies entity discovery and reuse within workflows, APIs, and UI components.
It is recommended to group entities by Domain
Example: In an e-commerce application, create separate folders:
- Orders → Order, OrderItems, OrderStatus
- Customers → Customer, Address, PaymentInfo
- Products → Product, Category, Inventory
Folder names can include alphanumeric characters, periods (.), and underscores (_).
Example of a Hierarchical Namespace Structur
- Common (General-purpose entities)
- Finance.Invoices (Invoices-related entities)
- Finance.Payments (Payments-related entities)
- Core.ECom.Orders (Orders-related entities)
Types of Entities in OwlGen
OwlGen supports two types of entities:
- DB Entities
- Service Entities
DB Entities
DB Entities are used to define data that requires persistence. For each DB Entity created, a corresponding database table is generated.
Service Entities
Service Entities are non-persistent entities designed to handle temporary data processing, transformations, and API interactions without being stored in a database. These entities are primarily used when data needs to be processed dynamically but does not require long-term persistence.