Generic Data Transfer Object for Multi-Tier Data Access
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In traditional multi-tier systems, the middle tier has reduced functionality due to the integration of business logic and data persistence, leading to increased overhead from custom Data Transfer Objects (DTOs) and redundant metadata management, which complicates data access and processing.
Innovation Solution
The implementation of a Generic Data Transfer Object (GDTO) that leverages database metadata, allowing for a single data access object layer to marshal data, reducing the need for custom coding and optimizing backend communication by using tables of inputs instead of scalar values, and enabling layering of non-functional components like security filtering and error handling.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If traditional Data Transfer Objects (DTOs) are used for data marshaling between tiers, then data access functionality is provided, but code complexity and metadata management overhead increase significantly
Solution Approach 1:
The patent applies universality by creating a single shared generic DTO class that can serve multiple data access scenarios instead of creating dedicated DTO classes for each data model. This generic DTO uses reflection and metadata-driven approaches to handle diverse data structures, allowing one class to perform the functions of many specialized DTOs, thereby reducing code complexity while maintaining data access functionality
Solution Approach 2:
The patent uses copying by leveraging metadata copies from the database schema rather than duplicating entire DTO definitions. The generic DTO reflects the underlying data model metadata, allowing dynamic construction of data structures based on copied metadata information, which reduces the need for manual DTO construction and metadata management
2Reliability
If dedicated DTOs are created for each data model, then data transfer functionality is achieved, but overhead and processing time increase
Solution Approach 1:
The patent applies preliminary action by pre-defining a generic DTO structure that can adapt to different data models at runtime through reflection and metadata. Instead of creating and configuring dedicated DTOs at the time of data transfer, the generic DTO is prepared in advance with the capability to dynamically reflect underlying data structures, eliminating the need for runtime DTO construction and configuration overhead
Solution Approach 2:
The patent implements dynamics by making the DTO structure flexible and adaptable rather than static and fixed. The generic DTO uses reflection to dynamically determine its structure based on the underlying data model metadata, allowing it to adapt to different data transfer scenarios without requiring pre-configured dedicated DTO classes, thereby reducing marshaling overhead while maintaining data transfer accuracy
3Adaptability or versatility
If metadata is duplicated for DTOs in IMCE architecture, then data structure definition is enabled, but storage redundancy and maintenance complexity increase
Solution Approach 1:
The patent introduces an intermediary layer in the form of a metadata reflection mechanism that bridges the database schema and the generic DTO. Instead of duplicating metadata directly in DTO definitions, the reflection mechanism acts as an intermediary that dynamically translates database metadata into DTO structure at runtime, eliminating the need for separate metadata storage while maintaining data structure definition capability
Solution Approach 2:
The patent applies self-service by enabling the generic DTO to automatically generate its structure by reflecting the underlying data model metadata. The DTO serves itself by using reflection to determine its own fields, types, and relationships based on the database schema, eliminating the need for external metadata management and duplication while maintaining full adaptability to different data structures
Data Source
AI summary
A system and method for simplifying data access between tiers in a multi-tier system is disclosed. In an embodiment, a method is provided for receiving a request for service from a browser at a generic data access object (GDAO) layer; generating, by use of a data processor, a single, shared, generic data transfer object (GDTO) at the GDAO layer; calling through to a database tier, the database tier providing database metadata; and using the database metadata to include result data in the GDTO and return the GDTO in response to the request.


