Automated Database Schema Change Detection for Report Integrity
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Relational database schema changes can lead to errors or incorrect data retrieval in reports, as reports rely on the underlying schema structure, and existing methods require manual analysis and fixing when schema changes occur.
Innovation Solution
A method and system to detect database schema changes by comparing database states over time, analyzing changes, and applying these changes to reports using SQL statements to ensure accurate data retrieval, even after schema modifications.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If manual analysis and fixing methods are used when schema changes occur, then reports can be corrected to work with new schemas, but the process requires significant time and technical expertise
Solution Approach 1:
The system performs self-service by automatically detecting schema changes through database triggers and self-correcting report queries by generating and applying updated SQL statements, eliminating the need for manual intervention to maintain report functionality after schema changes
Solution Approach 2:
The system takes preliminary action by establishing database triggers that continuously monitor for schema changes and automatically update reports before errors occur, rather than waiting for manual detection and correction after failures happen
2Adaptability or versatility
If reports are manually updated after schema changes, then reports can adapt to new database structures, but the process requires technical knowledge of database schemas
Solution Approach 1:
The system automatically detects schema changes through database triggers and generates updated SQL statements without requiring user intervention, making the system self-sufficient in adapting to schema changes and eliminating the need for technical expertise in report maintenance
Solution Approach 2:
The system introduces an intermediary automated process that translates schema change events into corresponding report updates, acting as a mediator between database changes and report queries, thereby shielding users from technical complexity
3Productivity
If reports reference database table and column names directly, then data can be retrieved efficiently, but schema changes cause errors or incorrect data retrieval
Solution Approach 1:
The system makes the report queries dynamic by automatically generating and updating SQL statements based on current database schema, allowing the queries to adapt their structure and references to match the actual database state rather than relying on static hardcoded names
Solution Approach 2:
The system implements feedback through database triggers that monitor schema changes and automatically feed this information back to update the report queries, creating a closed-loop system that continuously maintains synchronization between schema and report references
Data Source
AI summary
A system and method to detect database schema changes are described. In various embodiments, a method of the embodiments detects database schema changes via triggers. In various embodiments, the changes are detected by comparing database schemas and determining modifications to database tables and database columns thereof. In various embodiments, the detected changes are applied to a report by generating a parse tree relevant for the modifications to database tables and columns; and traversing the tree to produce a statement to change the report to be relevant for the modifications to database tables and columns.


