Data
Learn about the data patterns offered by Genio.
DATA Menu – Persistence and Data Modeling
The DATA menu in Genio IDE exposes powerful tools to model and manage the persistence layer of an application. These tools are built around persistence patterns, which define how entities are structured, how they relate to each other, how integrity is enforced, and how data evolves over time. This functionality is critical to ensuring robust, scalable, and maintainable information systems.
What is Persistence?
In the context of Genio and information systems in general, persistence refers to the capability of saving data in a non-volatile medium (e.g., disks or cloud storage) and retrieving it consistently. Persistence is implemented through data modeling, which includes defining entities (tables), attributes (fields), relationships, keys, and constraints.
Genio adopts and extends the relational model established by Edgar F. Codd, supporting both strict normalization and deliberate redundancy when beneficial for performance or usability. While classical relational theory emphasizes consistency and elimination of redundancy, Genio enhances this model with practical engineering patterns that align with modern software needs.
Genio Persistence Patterns
1. CRUD Operations
CRUD stands for Create, Read, Update, and Delete. These are the foundational operations in any persistent system. In Genio:
- CRUD behavior is inferred from entity definitions.
- UI and API layers are auto-generated for each operation.
- Rules and validations can be associated with each action.
- Support for role-based access control on CRUD levels.
2. Relations (n:1, n:n)
Genio allows declarative modeling of relationships:
- n:1: A foreign key from one table to another.
- n:n: Implemented via associative tables with unique composite keys.
- Automatic UI generation for selection widgets, lists, and lookups.
- Referential integrity constraints enforced during code generation.
3. Last Value Relationships
In “last value” patterns:
- The latest (ordered) entry is dynamically selected at runtime.
- The field used for sorting can be any data type (date, version number, etc.).
- Useful in scenarios where temporal or sequential data determines the current state.
4. Transitive Relationships
Genio supports redundant derived fields to optimize filtering and presentation:
- Values from parent or related entities are replicated into dependent entities.
- Avoids complex joins at runtime.
- Improves filtering performance in UI components.
5. Reflective Relationships
Allows relationships within the same table:
- Used for hierarchical or peer-based structures (e.g., employee–manager).
- Supports recursive access and tree navigation.
- Declarative definition of parent and child roles.
6. Relational Hierarchies (Tree Structures)
Genio supports recursive entities via tree structures:
- Each record can point to a “parent” of the same type.
- Used in org charts, accounting plans, and nested categories.
- Parameters allow defining maximum depth, sort criteria, and constraints.
7. Indexing
- Automatic generation of database indexes based on usage patterns.
- Indexes on foreign keys and frequently filtered fields.
- Developers can override or add manual indexing rules.
8. Field Types
Each field has a defined data type, which determines its behavior, validation, and rendering:
- Supported types include:
Integer
, Decimal
, Boolean
, DateTime
, Money
, GUID
, Enum
, Blob
, File
, HTML
, Geo
, etc.
- Each type includes platform-specific rendering and validation logic.
9. Primary Keys
- Used to uniquely identify records.
- Types: Sequential (auto-increment), GUID (for distributed uniqueness).
- GUID is enforced in scenarios requiring offline replication and merging.
10. Referential Integrity
Genio enforces referential integrity at generation time:
- Prevents deletion of parent records with existing children.
- Supports
delete
, delete(new)
, clear
, and clear (new)
deletion rules.
- Declarative: defined in the entity schema.
11. Cascading Operations
- Duplication and deletion can cascade through entity relationships.
- Rules are evaluated recursively.
- Ensures consistent behavior across related entities.
12. Duplication Patterns
- Allows cloning existing records.
- Supports rules for excluding specific fields.
- Optional: can be disabled at entity level.
13. Logical Entities
- Multiple logical views can share the same physical table.
- Each logical entity has independent UI, rules, and workflows.
- Ensures reuse while maintaining functional separation.
14. External and Existing Sources
- Support for reverse-engineering existing schemas.
- Integration with external sources via
WebServices
, LDAP
, ODBC
, etc.
- Genio wraps external sources with ETL patterns and UI definitions.
15. Data Replication
- Data can be replicated across distributed systems.
- GUIDs ensure unique identification across nodes.
- Synchronization is automatic upon reconnection.
16. DBMS Specialization
- Genio optimizes code and queries for target DBMS (e.g., SQL Server, PostgreSQL).
- Leverages vendor-specific features where available.
- Ensures compatibility across environments.
17. Global Replacement
- Tool for unifying duplicate records.
- All references are updated to the canonical version.
- Ensures data quality and consistency.
18. Delete Everything (Bulldozer)
- Special operation for training/testing environments.
- Cascading delete of all data regardless of constraints.
- Restricted to admin roles and flagged for safety.
19. Global or Differentiated Databases
- Support for partitioning data across databases or years.
- Used for archiving, multi-tenancy, or scaling large systems.
- Fully transparent to the application logic.
- Record change history (audit trail).
- User attribution (created by, modified by).
- Multi-language field persistence.
- Export to interoperable formats.
- Embedded calculation and rules engine.
- Post-it notes and unstructured annotations.
- Dynamic schema extensions (user-defined tables/fields).