Cascade delete processing
Abstract
A time-efficient means for identifying and processing cascading deletes due to referential constraint violations includes: logging, to an error file, all primary key (“PK”) errors detected during table load operations; building a foreign key (“FK”) index for each child table; recursively probing each relevant FK index to identify all loaded rows that violate a referential constraint due to a PK error; logging all identified FK errors to the error file; and using the (preferably sorted) error file contents to identify, mark and physically delete table rows that violate a referential constraint. The described cascade delete processing methods make only a single pass through the table data, using ordinary computer files to track and organize rows identified for deletion. Use of error files rather than tablescans (multiple passes through the loaded table data) can provide a significant reduction in table load times, especially for large or intricately “related” tables.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 13 · Forward citations: 9.
Claims (1 — 1 Independent, 0 Dependent)
- Claim 1Independent Claim
A method to process cascading deletes in a relational database, comprising: loading one or more tables into memory, wherein each table comprises one or more rows and at least one of said tables is a parent table and at least one of said tables is a child table; obtaining a foreign key index for each loaded child table; logging, to an error file, all primary key errors detected during the act of loading one or more tables into memory; probing each relevant foreign key index to identify all loaded rows that violate a referential constraint due to a primary key error, such referential constraint
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (9 of 9 total)
References Cited — Backward Prior Art (13)
Non-Patent Literature (1)
- Gennick et al., "Oracle SQL Loader: The Definitive Guide", O'Reilly Publisher, Apr. 2001.