Using Data Models is considered a best practice because they offer a structured, scalable, and error-resistant way to handle data — compared to directly working with Storage Nodes.
1. Clear Structure & Relationships
- Storage Nodes: Data is stored directly, and relationships must be handled manually.
- Data Models (Best Practice): Entities, attributes, and relationships (1-to-many, many-to-many) are visually defined and maintained.
Example:
User → Order (1-to-many)
- One user can have multiple orders.
- Data Model automatically manages fetching related orders — no manual joins or filters required.
2. Works Across Multiple Databases
- Storage Nodes: Need separate configurations and logic for each database type.
- Data Models: Support PostgreSQL, Oracle, MySQL, MsSql, MongoDB. All within a single model.
If you switch databases later, no query rewriting is needed — your flows still work seamlessly.
3. Faster Development with Auto-Generated Queries
- Storage Nodes: Require manual setup for
find,insert,update,delete, and aggregations. - Data Models: Provide ready-made nodes (Insert, Find, Update, Delete) where you just select the Data Model, choose the Entity, and map the Insert Object.
The correct SQL/NoSQL query is auto-generated and executed for you.
4. Built-In Data Integrity & Business Rules
- Storage Nodes: You must manually enforce validation, constraints, and relationships.
- Data Models: Automatically handle keys, constraints, and relationships — ensuring data consistency and preventing orphaned or duplicate records.
5. Scalable & Maintainable
- Storage Nodes: Adding a new entity or relationship requires rewriting queries and updating multiple flows.
- Data Models: Simply update the visual model — existing service flows remain intact and continue to work.
6. Simplified Data Operations
With Data Model nodes, you can:
- Insert → Add new records
- Find / Query → Fetch related data automatically
- Update → Modify records while respecting integrity rules
- Delete → Safely remove records
All without manually writing or maintaining queries.
Conclusion
The Data Model approach is the best practice because it provides:
Clear visual representation of data
Faster development through auto-generated queries
Cross-database compatibility
Better data integrity and consistency
Easy scalability and maintenance
This makes Data Models ideal for building robust, efficient, and future-proof applications — far more maintainable than directly using Storage Nodes.