Bidirectional Mapping Views for Lossless Data Roundtripping
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current data access solutions face challenges in supporting updates through mappings, as they require preserving data consistency, triggering business rules, and dealing with complex mappings, which are difficult to extend and often result in fragile runtime environments, especially when dealing with updatable views.
Innovation Solution
The ADO.NET Entity Framework introduces a mapping architecture that automatically generates query and update views from high-level mapping specifications, ensuring roundtripping criteria are met, and uses bidirectional views to propagate updates through materialized view maintenance algorithms, leveraging robust database technologies.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If client-side mapping layers are used to provide updatable views, then data access flexibility is improved, but update processing reliability deteriorates due to difficulty in preserving data consistency
Solution Approach 1:
The patent introduces a server-side mapping layer as an intermediary between the client application and the database. This mapping layer includes mapping views that translate client-side update operations into database-compatible operations, ensuring data consistency while maintaining access flexibility. The mapping layer acts as a mediator that handles the complexity of update translation without exposing it to the client.
Solution Approach 2:
The system implements feedback mechanisms where the mapping layer monitors and tracks updates made through views. It uses update translation logic that receives feedback from the database about successful operations and propagates appropriate responses back to the client, ensuring that data consistency is maintained and any conflicts are properly handled.
2Adaptability or versatility
If complex mapping specifications are used to support various data models, then adaptability is improved, but system complexity worsens making the runtime fragile
Solution Approach 1:
The mapping system is segmented into distinct modular components: mapping specifications (declarative), mapping views (generated), and update translation logic (processing). Each component has a specific responsibility, allowing complex mapping capabilities to be built from simple, well-defined building blocks that are easier to manage and less fragile.
Solution Approach 2:
Mapping views are pre-generated and compiled from mapping specifications before runtime update operations occur. This preliminary action creates optimized, ready-to-use translation logic that reduces runtime complexity and fragility while maintaining the ability to handle complex mappings through the pre-processed view definitions.
3Productivity
If automatic view generation is implemented from mapping specifications, then productivity is improved, but measurement precision worsens due to vague mapping semantics
Solution Approach 1:
The system implements self-service through automated validation mechanisms that check mapping specifications against the pre-generated mapping views. The validation process automatically detects semantic inconsistencies and reporting errors without requiring manual intervention, thus maintaining productivity while improving precision through systematic self-checking.
Data Source
AI summary
A data access architecture may includes a mapping architecture for mapping data as may be used by an application to data as persisted in a database. Such a mapping architecture uses two types of “mapping views”—one for translating queries and the other for translating updates. A mechanism is provided that automatically generates query and update views from high-level mapping specifications. A validation may be performed to ensure that a mapping specification, when used in conjunction with a mapping architecture, allows data to “roundtrip” from the application to the database, without loss of data.


