Annotated DDL Change Records for Database Replication
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current methods for replicating data definition language (DDL) instructions between databases with different structures face challenges due to the complexity of mapping and filtering, as DDL instructions affect multiple database objects and depend on the executing environment, leading to errors in parsing and replication.
Innovation Solution
Generating annotated DDL change records that include the original expression and an annotation set, providing information about schema names, object names, and other database objects, allowing for fine-grained mapping and filtering across databases with different structures.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If parsing methods are used to process DDL text for replication, then mapping and filtering can be performed, but errors arise when the same object or schema name is used for different database objects and fine-grained mapping or filtering cannot be achieved
Solution Approach 1:
The patent segments the DDL text into distinct components (schema names, object names, database objects) using annotated change records. Each component is separately identified and tagged, allowing the system to distinguish between different uses of the same name (e.g., a schema named 'sales' versus a table named 'sales' in a different schema). This segmentation enables accurate mapping and filtering without the errors that plague text-based parsing approaches.
Solution Approach 2:
The patent introduces an intermediary layer of annotated change records that sit between the source DDL text and the target database system. These annotated records contain structured information about schema names, object names, and database objects, serving as a mediator that translates the source DDL into a form that can be accurately mapped and filtered before being applied to the target database. This intermediary prevents the direct parsing errors that occur when target systems attempt to interpret source DDL text without proper context.
2Ease of manufacture
If text search and replace is used for rudimentary mapping, then some mapping can be performed, but errors arise and fine-grained mapping or filtering cannot be achieved
Solution Approach 1:
Instead of using crude text search and replace, the patent segments the DDL text into meaningful components (schema names, object names, database objects) using annotated change records. This segmentation allows the system to perform precise mapping by matching specific components rather than relying on simple text replacement, thereby achieving fine-grained control over the mapping process while maintaining implementation feasibility.
Solution Approach 2:
The patent changes the parameter of mapping from simple text-based replacement to structured annotation-based mapping. By introducing annotated change records that contain explicit information about schema names, object names, and database objects, the system transforms the mapping process from a low-precision text operation to a high-precision structured operation, enabling fine-grained mapping and filtering capabilities.
3Adaptability or versatility
If DDL instructions are replicated between databases with different structures, then logical sharing is enabled, but complexities arise because DDL instructions may involve multiple database objects, affect multiple system tables, and depend on the executing environment
Solution Approach 1:
The patent introduces annotated change records as an intermediary layer between source and target databases with different structures. These annotated records contain structured information about schema names, object names, and database objects, allowing the system to handle the complexities of cross-database replication. The intermediary enables the system to track which DDL instructions involve multiple database objects, which affect multiple system tables, and which depend on the executing environment, thereby managing the replication complexity systematically.
Solution Approach 2:
The patent performs preliminary annotation of DDL instructions before replication occurs. By pre-processing the DDL text into annotated change records that capture schema names, object names, and database object relationships, the system prepares the replication data in advance. This preliminary action allows the target database system to understand the structure and dependencies of the source DDL instructions, making it easier to handle cross-database compatibility issues and reducing the complexity of the actual replication process.
Data Source
AI summary
Techniques are provided for data definition language (DDL) expression annotation. DDL expression text is captured. The DDL expression text corresponds to a DDL change in a source database. A component set is determined. The component set includes at least one component in the DDL expression text. An annotation set is generated. The annotation set includes at least one annotation for at least one component of the component set. Each annotation includes hierarchical data describing at least one hierarchical relationship in the component set. For example, an annotation may include a component ID, a component position, a component length, a component type, and a parent component ID. The annotation set and a change record comprising the DDL expression text are transmitted to a replication client.


