Non-Relational to Relational Database Streaming via Schema Inference
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Non-relational databases lack the ability to perform complex querying and scanning of large datasets, which are essential for data analytics and transaction processing, while relational databases are optimized for these tasks, leading to a need for converting non-relational data into a relational format to leverage the strengths of relational databases.
Innovation Solution
A data stream conversion service that parses non-relational database attributes to generate a relational database schema, initializes the relational database, and converts data streams from non-relational to relational formats, allowing for near real-time replication and processing without impacting read capacity.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If non-relational databases are used to store data with changing schemas, then adaptability is improved, but the ability to perform complex querying and data analytics deteriorates
Solution Approach 1:
The system creates a relational database replica that copies data from the non-relational database. This replica maintains the adaptability benefits of the source database while enabling complex querying and data analytics through the structured relational format, thus resolving the contradiction between schema flexibility and querying capability.
Solution Approach 2:
The conversion service acts as an intermediary between the non-relational database and analytical systems. It transforms data from the flexible non-relational format into a relational format that supports complex querying, allowing both the adaptability of the source and the analytical power of the destination to coexist.
2Difficulty of detecting and measuring
If data is converted from non-relational to relational format, then querying capability is improved, but system complexity increases
Solution Approach 1:
The conversion service automatically detects schema changes in the non-relational database and performs real-time conversions without manual intervention. This automation reduces the operational complexity of maintaining the conversion infrastructure while preserving improved querying capabilities.
Solution Approach 2:
The system performs continuous real-time conversion of data streams from the non-relational database to the relational database. This ongoing automatic conversion ensures that the relational replica remains synchronized without requiring complex batch processing or manual updates, reducing system complexity.
3Loss of time
If real-time data conversion is performed, then data freshness is improved, but read capacity of the source database is impacted
Solution Approach 1:
The conversion service extracts data from the change log stream of the non-relational database rather than performing reads during normal database operations. This extraction approach maintains data freshness through real-time conversion while avoiding impact on the source database's read capacity for primary workloads.
Solution Approach 2:
The system performs conversion actions preliminarily by processing change logs as they are generated. This preliminary conversion ensures data is transformed before it is needed for analytical queries, achieving real-time synchronization without interfering with the source database's read operations.
Data Source
AI summary
A data stream conversion service may crawl a non-relational database to determined database attributes that characterize the data structure of the non-relational database. The data stream conversion service may evaluate the one or more attributes of the non-relational database to generate a schema for a relational database, wherein the schema maps the non-relational database attributes to respective fields of a relational database. The data stream conversion service may generate a relational database using the determined schema and replicate a data stream for the non-relational database to the relational database.


