CA2310576A1 - System and method for selective incremental deferred constraint processing after bulk loading data - Google Patents

System and method for selective incremental deferred constraint processing after bulk loading data Download PDF

Info

Publication number
CA2310576A1
CA2310576A1 CA002310576A CA2310576A CA2310576A1 CA 2310576 A1 CA2310576 A1 CA 2310576A1 CA 002310576 A CA002310576 A CA 002310576A CA 2310576 A CA2310576 A CA 2310576A CA 2310576 A1 CA2310576 A1 CA 2310576A1
Authority
CA
Canada
Prior art keywords
data
checking
constraint
database
constraints
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Abandoned
Application number
CA002310576A
Other languages
French (fr)
Inventor
Petrus Kai C. C. Chan
Sam S. Lightstone
Richard S. Sidle
Calisto P. Zuzarte
Tuong Chanh Truong
Michael J. Winer
Roberta Jo Cochrane
Mir Hamid Pirahesh
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
International Business Machines Corp
Original Assignee
International Business Machines Corporation
Petrus Kai C. C. Chan
Sam S. Lightstone
Richard S. Sidle
Calisto P. Zuzarte
Tuong Chanh Truong
Michael J. Winer
Roberta Jo Cochrane
Mir Hamid Pirahesh
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by International Business Machines Corporation, Petrus Kai C. C. Chan, Sam S. Lightstone, Richard S. Sidle, Calisto P. Zuzarte, Tuong Chanh Truong, Michael J. Winer, Roberta Jo Cochrane, Mir Hamid Pirahesh filed Critical International Business Machines Corporation
Publication of CA2310576A1 publication Critical patent/CA2310576A1/en
Abandoned legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y10TECHNICAL SUBJECTS COVERED BY FORMER USPC
    • Y10STECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y10S707/00Data processing: database and file management or data structures
    • Y10S707/99931Database or file accessing
    • Y10S707/99933Query processing, i.e. searching
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y10TECHNICAL SUBJECTS COVERED BY FORMER USPC
    • Y10STECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y10S707/00Data processing: database and file management or data structures
    • Y10S707/99951File or database maintenance
    • Y10S707/99952Coherency, e.g. same view to multiple users

Abstract

The invention provides method and apparatus for use in a database management system for managing a database containing data, where the database has storage for storing data in the database, and has an instruction processor for processing instructions for managing data stored in the database.
The database has a constraint manager for managing constraints on said data stored in the database.
The invention provides efficient method and means for deferred checking of data after bulk loading into said database for violation of constraints by determining an appropriate procedure for constraint checking by determining whether constraint checking is required; and if it is required, determining whether to implement full, or incremental checking for compliance with said constraints; and then checking the data in the database in accordance with the determined constraint checking procedure.

Description

SYSTEM AND METHOD FOR SELECTIVE INCREMENTAL DEFERRED
CONSTRAINT PROCESSING AFTER BULK LOADING DATA
BACKGROUND OF THE INVENTION
Field of the Invention This invention relates generally to Relational Database Processing Systems, and in particular, to constraint checking and violation capture for bulk data stored in a relational database.
1 o Description of the Related Art A relational database management system (RDMS) uses relational techniques for storing and retrieving data. Relational databases are computerized information storage and retrieval systems in which data in the form of tables ("relations") are typically stored for use on disk drives or similar mass data stores. A "relation" includes a set of rows ("tuples" or "records") spanning one or more columns. A "record" expresses a mathematical relation between its column elements. Reference is made to C.J. Date, An Introduction to Database Systems, vol. 1, 4th edition, Addison-Wesley Publishing Co. Reading, Mass. ( 1986) for a description of a relational database management system.
An RDMS receives and executes commands to store, retrieve and delete data using high-level query languages such as the Structured Query Language (SQL). The term "query"
means a set of 2o commands for acting on data in a stored database. An SQL standard has been maintained by the International Standards Organization (ISO) since 1986. Reference is also made to the SQL-92 standard "Database Language SQL" published by the American National Standards Institute (ANSI) as ANSI X3.135-1992 and published by the ISO as ISO/IEC 9075:1992 for the official specification of the 1992 version of the Structured Query Language. See also James R. Groff et al. (LAN Times Guide to SQL, Osborne McGraw-Hill, Berkeley, Calif. 1994) for a description of SQL-92.
A table in an RDMS is partitioned into rows and columns such that there is one value at each intersection of a row and column. All of the values in a column are of the same data type. The only exception to this rule is that a value could be NULL. A NULL is a marker used to fill a place in a column where data is missing for some reason.

Tables are created explicitly by using the SQL CREATE TABLE command. A table may be created as "permanent", "temporary", or "virtual". Permanent tables include the base tables that contain the fundamental data that is permanently stored in the database.
Fundamental data refers to the data for which the database is created to manage in the first place, for example, records of a group such as employees or students. Virtual tables -- also called "views"-- are tables derived from base tables using queries. A view does not exist in the database as a stored set of values like a base table.
Instead the rows and columns of data visible through the view are the query result produced by the query that defines the view. The definition of the view is stored in the database. Temporary tables are not permanently stored, but are used for handling intermediate results, similar to program 1 o variables. Temporary tables are automatically flushed at the end of a working session. A table may be created, yet not have any data in it. Such a table, referred to as "empty", is typically created for receiving data at a later time.
"Constraints" define conditions that data must meet to be entered into a permanent table of fundamental data. Constraints may apply to columns or to tables; they are checked by an RDMS. A
constraint can be checked at any of the following times:
(1) after every statement that affects a table (e.g., after an INSERT query);
(2) at the end of a transaction executing one or more statements that affect a table; and (3) at any time between 1 and 2.
Frequently, in large commercial database systems, data must be entered quickly and in bulk.
2o Bulk-loading facilities, available for this purpose, load database tables at high speed from files outside an RDMS.
Because bulk-loading delivers massive amounts of data in a short amount of time, constraint checking can impose a severe bottleneck if not deferred until all of the data is loaded.
Even if deferred, constraint checking that must check each record one time for one constraint violation, flag the violation, and then check the same record again for each remaining constraint will consume a large amount of time, compounding the cost of bulk loading. Clearly, there is a need in the art for a utility that can check all constraints simultaneously for each record that requires checking in a given table to improve efficiency.
Recently, bulk loading tools have been provided which do not perform constraint checking.

A table receiving bulk-loaded data is placed in a "pending" state, meaning its data cannot be used until checked for constraints. What is needed is a tool for checking for constraints of such bulk-loaded data that can do so speedily and which also includes the capability of repairing such tables to remove violating records.
Referential Integrity In any tool that performs constraint checking of bulk-loaded data the problem of ensuring that no constraints are violated is complicated by the need to ensure "referential integrity" at the database.
Referential integrity ensures soundness of an entire database. Relatedly, consider the example of an 1o employee database with a table that groups employees by department and a table that contains all possible departments of an employing organization. In this case, the table of employees would include a column representing the respective employees' department numbers.
The employee department number value is a "foreign key" that references an unique identifying column in the table containing all the departments in an employing organization. The second table, in this case, is the "parent table". The unique identifying column in the parent table identifying department titles is referred to as a "primary key". Referential integrity is the state when all foreign key values are present in their parent keys. If an employee's department is eliminated and its corresponding record is deleted from the parent table, then the foreign key in the employee record, representing that department, is invalid. In such a case, the system would lack referential integrity. Although the above 2o simple example shows a foreign and primary key having only one column, referential integrity can be assured using mufti-column keys.
In the above example, the record for the employee having no department is said to be "orphaned" because the foreign key has no parent table. A typical SQL
technique for dealing with orphans is to eliminate them when their parent references are eliminated. A
function known as CASCADE is available in SQL for ensuring that records having foreign keys are eliminated when their referenced primary keys are eliminated.
Table Check Constraints Valid data within the table can be enforced through table check constraints.
Table check constraints specify search conditions that are enforced for each row of a table.
A table check constraint can be used for validation. Examples of some constraints can be: the values of a department number must lie within the range 10 to 100; the job title of an employee can only be "Sales", "Manager", or "Clerk"; or an employee who has been with the company for more than 8 years must earn more than $40,500.
What is needed is an efficient tool and method for checking constraints that includes referential integrity and table check constraints (for bulk-loaded data in a pending table that includes a violation capture mechanism).
1o BRIEF DESCRIPTION OF DRAWINGS
Fig. 1 shows a schematic representation of the query translation process using the method of US Patent 5,706,494;
Fig. 2 shows a Query Graph Model (QGM) diagram from the prior art for an exemplary SQL
query;
Fig. 3 is a functional block diagram of a relational database system suitable for application of the bulk data constrain checking system of this invention;
Figs. 4 -8 each provide a flow chart illustrating the steps employed in executing the method of US Patent 5,706,494.
Figs. 9-13 provide a flow chart illustrating the steps of employed in executing the present invention.
Fig. 9(a) elaborates the details of the portion of the invention illustrated in box 130 of Fig.

Fig. 9(b) illustrates an embodiment of the process used in the LOAD process of the invention.
Fig. 9(c) elaborates the details of the portion of the process of the invention illustrated in the first half of box 133 in Fig. 9.
Fig. 9(d) elaborates on the second half of box 133 in Fig. 9.
Fig. 10 is simply a continuation of the flow chart in Fig. 9.
Fig. l l provides a high level drawing of a generalized embodiment of the general process of the invention.
Referring now to the drawings in which like reference numbers represent corresponding parts throughout, in FIG. 1 a query translation process used in the prior art IBM
Starburst relational database management system (Starburst RDMS) is shown with modifications necessitated for enabling the invention of US Patent 5,706,494. The IBM Starburst RDMS is described in detail in L. M. Haas, et at., "An Extensible Processor for an Extended Relational Query Language", IBM
Research Report, RJ 6182, IBM Almaden Research Center, San Jose, Calif., April 1988.
o Overview of Query Translation Process with SET CONSTRAINTS
Queries written in SQL, or the like, are processed in phases as shown in FIG.
1. An SQL
query is first lexed at 13, parsed and checked semantically at 14, and converted into an internal representation denoted as the Query Graph Model (QGM) 15. The QGM is a well-known data structure that summarizes the semantic relationships of the query for use by all components of the query compiler. A QGM optimization procedure 16 then rewrites the QGM in canonical form by iteratively transforming the QGM into a semantically equivalent QGM 15.
Reference for explanation regarding such optimization is made to W. Hasen, et al., "Query Rewrite Optimization in Starburst", IBM Research Report, RJ 6367, IBM Almaden Research Center, San Jose, Calif., August 1988.
2o The purpose of QGM optimization 16 is to simplify QGM 15 to help the subsequent plan optimization process to produce improved Query Execution Plans (QEPs). A plan optimization procedure 18 generates alternative QEPs, and chooses the best QEP 20, based on estimated costs.
The plan refinement procedure 22 transforms the best QEP 20 further by adding information necessary at execution time to make QEP 20 suitable for efficient execution.
QGM optimization step 16 is separate and distinct from QEP optimization step 18. For instance, reference is made to U.S.
Pat. No. 5,345,585 issued to Iyer et al., for a discussion of a useful join optimization method suitable for use in QEP optimization step 18. Reference is also made to U.S. Pat. No.
5,301,317 issued to Lohman et al., for a description of an adaptive QEP optimization procedure suitable for step 18.
US Patent 5,706,494 enabled constraint checking of bulk-loaded data by using a QGM 15, the known constraint engine combined with a known SQL compiler, this combination being denoted as the constraint compiler 24, and a module 26 described below. For an understanding of QGM 15 characteristics, reference is made to Hamid Pirahesh, et al., "Extensible/Rule Based Query Rewrite Optimization in Starburst," Proceedings of ACM SIGMOD '92 International Conference on Management of Data, San Diego, Calif., 1992. Among other characteristics, QGM
15 embraces the concepts of (a} quantifiers or record variables, (b) predicates, and (c) SELECT operations.
One aspect of US Patent 5,706,494 is embodied as a particular program object module coupled with computer hardware, shown in FIG. 3 and discussed in detail below.
This module is represented schematically in FIG. 1 at 26, and is denominated as the "SET
CONSTRAINTS
o MODULE". Preferably, the method performed partly by this module is implemented in software, but it may also be embodied as hardware logic that implements the rules described below in connection with the flow charts in FIGS. 4-8. Further, it may be embodied as software code stored in any useful recording medium, including being recorded magnetically on a computer disk, (not illustrated).
The QGM
A useful QGM known in the art is now described. FIG. 2 provides a QGM
representation of the following SQL query:
SELECT DISTINCT Q1.PARTNO, Q1.DESCP, Q2.PRICE
2o FROM INVENTORY Q1, QUOTATIONS Q2 WHERE Q1.PARTNO=Q2.PARTNO
AND Q2.PRICE>100 A SELECT box 24 is shown with a body 26 and a head 28. Body 26 includes dataflow arcs 30 and 32, which are also shown as the internal vertices 34 and 36. Vertex 36 is a set-former that ranges on (reads from) the box 38, which provides records on arc 32.
Similarly, vertex 34 ranges on box 40, which flows records on dataflow arc 30. The attributes to be retrieved from the query, PARTNO 46, DESC 48 and PRICE 50, are in head 28. Boxes 38 and 40 represent the base-relations accessed by the query, INVENTORY 42 and QUOTATIONS 44, respectively. Box 24 embraces the operations to be performed on the query to identify the PARTNOs that match in the two base-relations, as required by the join predicate 52 represented as an internal predicate edge joining vertices 34 and 36.Vertex 34 also includes a self referencing predicate 54 to identify prices of those PARTNOs that exceed 100.
For the purposes of this illustration, note that each box or node (formally denominated "quantifier node") in FIG. 2 is coupled to one or more other nodes by dataflow arcs (formally denominated "quantifier columns"). For instance, base-relation node 38 is coupled to select node 24 by data-flow arc 32 and base-relation node 40 is connected to select node 24 by data flow arc 30. The activities inside select node 24 produce a new stream of data records that are coupled to the TOP
1o node 56 along a dataflow arc 58. TOP node 56 represents the data output table requested by the query.
The object of several known QGM optimization procedures is to merge one or more nodes where possible by eliminating (collapsing) dataflow arcs. For instance, the above-cited Pirahesh et al. reference describes a set of rules for merging any number of nodes into a single SELECT node, with certain restrictions on non-existential or non-Boolean factor subqueries, set operators, aggregates and user-defined extension operators. Thus those skilled in the art know that QGM
optimization step 16 usually rewrites the QGM to eliminate numerous nodes and data-flow arcs even before considering useful query execution plans in plan optimization step 18 (FIG. 1 ).
2o Ensuring Referential Integrity (RI).
One or more columns in a base-relation may be assigned a "key attribute", such as "primary key" or "foreign key". The primary key of a base-relation uniquely identifies each record (row) in the relation. A foreign key establishes a "referential" relationship between the base-table (child) and another (parent) table designated by the foreign key column attribute. An unique key is a set of columns whose values uniquely determine a record in the table, so a primary key is, by definition, an unique key. Thus, a parent/child relationship may be established between two relations by adding a foreign-key attribute to one and relating it to an unique key attribute in another, as is well-known in the art. Such relationships may be added without limit and each key attribute may span several columns.

Generally speaking, a referential constraint relates a possibly multi-column foreign key from the child table to an unique key in the parent table. There is only one primary key in a table, but there may be many unique keys.
There are four types of database updates that can corrupt the referential integrity of the parent/child relationships in a database. These include (a) inserting a new child record, (b) updating the foreign key in a child record, (c) deleting a parent record, and (d) updating the primary key in a parent record.
When a new row is inserted into the child table, its foreign key value must match one of the primary key values in the parent table, according to the column attribute. If the foreign key value l0 does not match any primary key, then an attempt to insert the row is rejected since it will corrupt the database to allow a child to exist without a parent. Inserting a row in a parent table never gives this problem because it simply becomes a parent without children. Updating the foreign key in a child record is a different form of this problem. If the foreign key is modified by an UPDATE statement, the new value must match some primary key value in the parent relation to avoid "orphaning" the 15 updated record.
Upon deletion of a parent record that has one or more children, the child records are orphaned because their foreign key values no longer match any existing primary key value in the parent relation. Deleting a record from the child relation is no problem because the parent merely loses a child. Updating the primary key in a parent record is a different form of this problem. If the primary 2o key of a parent record is modified, all existing children of that record become orphans because their foreign key values no longer match an existing primary key value.
For each parent/child relationship created by a foreign key, SQL provides for an associated delete rule and an associated update rule. The delete rule specifies DBMS
action when a user tries to delete a parent record. Available rules include RESTRICT, CASCADE, SET
NULL, and SET
25 DEFAULT. The update rule also specifies one of these DBMS actions when the user tries to update the value of one of the primary key columns in the parent relation. The usual RESTRICT rule merely rejects the attempted operation. The CASCADE rule automatically deletes and updates records from the children responsive to a command to delete or update a parent record.

System Overview FIG. 3 shows a functional block diagram of a computer-implemented database processing system 68 suitable for practicing the procedure of this invention. This exemplary configuration is described for illustrative purposes only and it should be appreciated that the process and system of this invention can be embodied within system 68 in many different useful fashions, including the arrangement depicted in FIG. 3. System 68 includes a central processing unit (CPU) 70, which is coupled to a parallel bus 72. The query input terminal 74 allows the user to enter queries into system 68, either from a remote terminal or through any other useful method known in the art. As used herein, a "user query" includes a combination of SQL commands intended to produce one or more to output data tables according to specification included in the query. The data output terminal 76 displays the query results to the user and may be physically co-located with query input terminal 74.
System 68 includes the address space 78, which is shown schematically as containing program objects and data objects. The base table 80 is an example ofa data object pulled into address space 78 from the external mass store 82 by way of bus 72. The view definition 84 is another data object representing a "virtual table" made up of elements from one or more base tables in accordance with a VIEW definition statement. External mass store 82 includes a generally large plurality of base tables (also denominated base relations), exemplified by base tables 86 and 88. These base tables are moved partially or entirely between memory space 78 and external mass store 82 in a manner well-known in the art for database management systems.
2o Address space 78 also includes the control program object 90, which manages the other components of system 68. These components include the query parser 14 for accepting the query input from terminal 74 and forwarding it to the Query Graph Model (QGM) optimizer 16. The Constraint Compiler (C.C.) 24 and the Set Constraints (S.C.) Module 26 interact between the parser and the QGM.
The QGM optimizer rewrites the QGM representation of the user query to provide a "canonical form" of the QGM for output to the query optimizer 16. For instance, a QGM canonical form may include a large cyclical join graph organized within a single select node having dataflow arcs from many base-tables, subject to the restrictions of primary and referential integrity. After identifying an "optimal" query execution plan, optimizer 16 produces this plan as a program object, depicted as query execution plan 22 in address space 78. Plan 22 is finally executed with the assistance of control program 90 and the resulting relation is forwarded to data output of display 76 upon completion. It can be appreciated by those skilled in the art that the description of system 68 in FIG. 3 is exemplary and that the system and process, represented as the SET
CONSTRAINTS
processing module 26, may be incorporated in any RDMS that uses a query optimization process.
General Syntax To aid in understanding this invention, a brief discussion of important SQL
statements are included below.
l0 In SQL, a SELECT statement is used to retrieve data and generally comprises the format: "SELECT<clause>FROM<clause>WHERE<clause>GROUP
BY<clause>HAVING<clause>ORDER BY<clause>." The clauses generally must follow this sequence, but only the SELECT and FROM clauses are required. The result of executing a SELECT
statement is a subset of data retrieved by the RDMS software from one or more existing tables or views stored in the relational database, with the FROM clause telling the RDMS
software the name of the table or view from which the data is being selected. The subset of data is treated as a new table, termed the "result table", which typically comprises a temporary table.
In general, the items specified in the SELECT clause of the SELECT statement determine the columns that will be returned in the result table from the tables) identified in the FROM clause.
2o The WHERE clause determines which rows should be returned in the result table. Generally, the WHERE clause contains a "search condition" that must be satisfied by each row returned in the result table. The rows that satisfy the search condition form an intermediate set, which is then processed further according to specifications in the SELECT clause. The search condition may include one or more predicates, each of which specify a comparison between two or more column values, constants or correlated values. Multiple predicates in the WHERE
clause are themselves connected by Boolean operators.
A JOIN operation combines tables or views by appending rows from one table or view to another table or view. The rows, or portions of rows, from the different tables or views are concatenated horizontally through common columns. The JOIN operation is not provided explicitly as an SQL statement; instead it may be implied by naming more than one table or view in the FROM
clause of the SELECT statement. Although not required, JOIN operations normally include a WHERE clause that identifies the columns through which the rows can be combined. The WHERE
clause may also include one or more predicates in a subquery with conditional operators that are used to select the rows to be joined.
An INSERT statement adds data to a database according to the format: "INSERT
INTO
table.name VALUES (constant [, . . . ] ~ NULL)." INSERT fills one entire row in a single execution using the constants provided in the VALUES clause. Constraints are set for each table column when it is created, and a failure to comply with the table or column constraints will cause the INSERT to 1o fail with an error. The SQL compiler has means for generating an internal process that compiles in the code to check constraints against the data modified by the SQL command.
The DELETE statement may be used to remove data according to the format:
"DELETE
FROM table.name [WHERE]." DELETE erases all records of the table which satisfy the WHERE
clause's predicates.
t5 A predicate is an expression that is used in certain statements to test values and determine whether the effects of the statement should be applied to their values. A
predicate may have a Boolean value of TRUE, FALSE, or UNKNOWN. The UNKNOWN value results when NULLS
are used in comparisons. In terms of constraint checking, NOT NULL means that a column being checked may not contain the NULL value.
2o Understanding of the process described below will be improved by referring to the symbols table included below. The symbol tables include brief definitions of the symbols used in a preferred embodiment of pseudo-code useful for implementing this invention.
Formalisms 25 A raise error function raises a given error and rolls back the statement whenever it is invoked.
In addition to deleting (or inserting) the selected rows from (or into) the first table listed in the FROM (or INTO) clause, a DELETE (or INSERT) operator can also flow data into other operators just like a select. For example:
select c" 2 from (delete c" 5 FROM T where c, >5);

selects a record with two columns for each record deleted from T. The first column is the value of the c, column of the deleted record and the second column is always 5.
This is used in generated queries to insert the values of the deleted records along with some computed information about which constraints are violated into exception tables. For example, the following query deletes all records from T and inserts columns c,, cz, and c3 of each deleted record into table E.
insert into E (delete c" c2, c3 FROM T) The existence of a COMPOUND SQL allows a grouping of a set of SQL statements together, and allows them to share common subexpressions. For example:
1 o begin insert into T, select * from T, ;
create temporary table DT as (delete from TZ) insert into Ez select * from DT;
end This query first replicates the contents of T" then deletes all records from T2 and inserts the deleted records into table E2.
Implementation of the Method 2o US Patent 5,706,494 disclosed a method and tool for constraint-checking ofbulk-loaded data after storage in a relational database, that also ensures referential integrity.
Referring to FIG. 4, the process is implicitly started by the bulk loading of one or more tables {T; { in mass store 82, as shown in step 130. Such a table T; will be placed in a pending state until constraints are checked. Table Ti can be represented by either table 86 or 88 (FIG. 3). The SET
CONSTRAINTS process is initiated by an invocation command, for example, "SET
CONSTRAINTS COMMAND", as shown in step 132. The invocation command may be performed as an SQL query or may be automatically passed to processor 70. Referring to Fig. 4, the invocation command causes the SET CONSTRAINTS module to generate an INSERT query denoted as QMAIN for inserting one or more records into a bulk-loaded table in an RDMS, step 134. The processor then called an SQL compiler to compile an SQL INSERT command. The code generated to execute the INSERT included code to check for constraint violations in the records to be inserted step 136. However, before compiling, optimizing, and executing the compiled code, the method replaced an INSERT command with a SELECT command, step 138 thereby enabling the resulting code to "constraint-check" the bulk-loaded data by selecting records that were in violation of the column constraints.
The INSERT query denoted as QMAIN is really a "dummy" insert ofrecords that purportedly are to be inserted in the table T; as shown in step 134.
Referring again to FIG. 4, when the dummy INSERT inquiry is generated, then the constraint compiler 24 (FIG. 3) is called to compile the INSERT commands and check for constraint violations, as shown in step 136. The compiler 24 compiles QMAIN and produces a query that has been modified to provide the code for checking constraints. QMAIN is then modified to replace the INSERT commands with SELECT commands (step 138) producing a new query for checking bulk loaded data.
Referring to FIGS. 4 and 5, the processing ofthe SET CONSTRAINTS continues at step 140, signifying the continuity of flow between FIGS. 4 and 5. A determinative step 142 asks if the control program or a user requires only information that an error has occurred when the first constraint violation is found. If so, then this case is denoted as "check only". If "check only" is performed, then in step 144 the query of the type shown in Table 3 is compiled, optimized and executed, according 2o to normal QGM processing discussed with reference to FIG. 1 above. The error data reporting message generated in step 146 is then communicated. For example, it may be passed to display 76 or recorded in mass storage unit 82 for later retrieval. In step 147, if there are no errors, tables are taken out of the pending state.
Referring again to FIG. 5, if more than "check only" information is required, processing continues as shown at step 150. Before compiling a query, it is modified by convening negated existential predicates for referential constraints to subquery form. At step 152, the subquery is outer joined with its corresponding tables.
Referring to FIGS. 5 and 6, processing continues from step 154 to step 158.
Step 158 creates code that identifies all records in the one or more tables Ti that exhibit constraint violations, either by violating a check constraint or by violating referential integrity. In step 162, the SET
CONSTRAINTS module generates code that can construct a message for each record in violation that contains all constraint names for all records in violation. The message contains all of the constraint names concatenated in a string. After the code for creating the messages is created, then, in step 164, the SET CONSTRAINTS module constructs an INSERT statement that serves to place information in a new table. The new table will contain columns identifying records that are in violation of constraints, and will include for each identified record a timestamp indicating a reporting time, and the constructed message. This new table is denominated "the exception table" and is denoted herein as E;.
to Referring now to FIGS. 6, the above described information is used to automatically flag an error and identify it, such as "Permissible Age Range Exceeded", and will also show the offending record column entry, such as "19 years of age", as well as the other columns in the record. Preferably, the information includes the timestamp to indicate when the error was flagged.
Step 166 inquires if it is desirable to "fix-up" the tables) having violations. "Fix-up" refers to deleting records in violation of constraints, both primary and referential and also requires removing orphaned records from the database. If no fix-up is desired, steps 168, 170 and 174 are executed. The non-fix-up case ends with step 174. In step 168, the constructed modified query is compiled, optimized and executed according to the normal query translation process described above with reference to FIG. 1. Then, the exception table Ei is populated using the INSERT statement generated in step 164. The 2o non-fix-up case ends in step 174. In step 171, if there are no errors, then tables are brought out of pending state.
Referring to FIGS. 6 and 7, when repairing the database to erase records with column entry violations, processing continues to step 172.
In general, a DELETE statement must be applied before the INSERT in order to delete violating records from the database. The deleted records are then inserted into the exception tables) E;.
With reference now to FIG. 7, the processing of the SET CONSTRAINTS module implementing the fix-up case is described. In step 176, the module selects each record id (rid) for each record having violating entries. In step 178, the module implements a fix-up process, by replacing INSERTS with common table expressions (VIOL;) to represent violating records. In step 180, the module creates a temporary table DT; that is used later to select violating records to be deleted from the database.
The exception table is essentially a violation table that is used to flag all errors designating violations inherent in the original data before any violating records are deleted.
Referring to FIG. 8, processing continues from FIG. 7 as step 184 flows into step 188. The presence of the DELETE from a parent table in the query causes the constraint compiler to naturally compile in the code that eliminates orphan records, as shown in step 188. In this way, the orphaned children records can be inspected before they are erased. In step 190, the system of FIG. 3 carries out 1 o the constructed code created in the above steps, wherein the query is compiled, optimized, and executed in normal fashion, as described above with reference to FIG. 1. The tables are brought out of pending state in step 191. Processing of the method of this invention by the system of FIG. 3 ends in step 192.
Table 8 of US Patent 5,706,494 which follows, describes an example of a query for a check-only mode on a table EMP (Employee) and PROD (Project). Three tables, EMP, DEPT and PROD
were created according to the following definitions:.
create table EMP (empno int not null primary key, deptno int, age int, constraint EMPDEPT foreign key (deptno) references DEPT, constraint MINAGE age > 16);
create table DEPT (deptno int not null primary key, name varchar(20), mgrno int); and create table PROJ projno int not null primary key, lead int, constraint PROJLEAD foreign key (lead) references EMP).
3o Tables employee (EMP), department (DEPT) and project (PROJ) are related by referential integrity constraints. Constraint EMPDEPT of table EMP ensures the referential integrity relationship between column deptno (foreign key) of table EMP and the column deptno (primary key) of table DEPT. Constraint PROJLEAD of table PROJ ensures the referential integrity between column lead (foreign key) of table PROJ and the column empno (primary key) of table EMP.

1. begin 2. select 1 (3) from EMP
(4) where 1=case 5. when EMP.deptno is not null and 6. not exists 7. (select 1 from DEPT.deptno 8. where DEPT.deptno = EMP.deptno) 1o 9. then raise-- error('-3603', EMPDEPT) 10. when not EMP.age > 16) 11. then raise-- error('-3603', MINAGE) 12. else 2 13. end 14. select 1 15. from PROJ
16. where 1 = case 17. when PROJ.Iead is not null and 18. not exists 19. (select 1 from EMP
20. where EMP.empno = PROJ.Iead) 21. then raise-- error('-3603', PROJLEAD) 22. else 2 23. end 24. end Table 11 of US Patent 5,706,494, which follows, describes an example of a fix-up mode query as follows:
Teur.F. »
1. begin 2. create temporary table ONEROW(c,) as (values (1)) 3. create temporary table VIOLEMP (rid, empno, deptno, age, ts, msg) as 4. (select EMP.#rid, EMP.empno, EMP.deptno, EMP.age, current timestamp, 5. case when TEMpEMPDEPT'x 1S not null and 6. EMP.deptno is not null 7. then 'EMPDEPT'else "

8. end p 9. case when not (age > 16) 10. then 'MINAGE' else "
11. end 12. from EMP left outer join 13. (select 1 14. from ONEROW
15. where 16. not exists 17. (select 1 from DEPT
18. where DEPT.deptno = EMP.deptno)) as TEMPEMPDEPT
19. where (TEMPEMPDEPTx 1S not null and 20. EMP.deptno is not null) 21. or 22. not (age > 16)) 23. create temporary table VIOLPRO~ (rid, projno, lead, ts, msg) as 24. (select PROJ.projno, PROJ.Iead, current timestamp, 25. case when TEMPPROJLEAD~x 1S nOt null and 26. PROJ.Iead is not null 27. then 'PROJLEAD' else "
28. end 29. from PROJ left outer join 30. (select 1 31. from ONEROW
32. where 33. not exists 34. (select 1 from EMP
35. where EMP.empno = PROJ.Iead)) as TEMPPROJLEAD
36. where TEMPpROJLEAD~x 1S nOt null and 37. PROJ.Iead is not null) 38. select * from VIOLEMP ;
39. select * from VIOLPROJ ;
40. create temporary table DTEMP (empno, deptno, age, ts, msg) as 41. (delete VIOLE~,,P.empno, VIOLEMP.deptno, VIOLEMP.age, VIOLEMP.ts, VIOLor,,l,.msg 42. from EMP, VIOLEMP
43. where EMP.#rid = VIOLEMP.rid);
44. create temporary table DTPROJ (projno, lead, ts, msg) as 45. (delete VIOLPROJ.projno, VIOLPROJ.Iead, VIOLPROJ.ts, VIOLpROJ.msg 46. from PROJ, VIOLpROJ
47. where PROD.#rid = VIOLPROJ.rid);
48. insert into EEMr 49. select empno, deptno, age, ts, msg 50. from DTEMP ~

5l. lnSert lnt0 EpROJ

52. select projno, lead, ts, msg 53. from DTPROJ~

54. delete from PROJ, DTEMP

55. where PROJ.Iead = DTE~,,P.empno;

56. end SUMMARY OF THE INVENTION
The invention provides method and apparatus for use in a database management system for managing a database containing data, where the database has storage for storing data in the database, and has an instruction processor for processing instructions for managing data stored in the database.
The database has a constraint manager for managing constraints on said data stored in the database.
The invention provides efficient method and means for deferred checking of data after bulk loading into said database for violation of constraints by determining an appropriate procedure for constraint 3o checking by:
determining whether constraint checking is required; and if it is required, determining whether to implement full, or incremental checking for compliance with said constraints; and then checking the data in the database in accordance with the determined constraint checking procedure.
Software is provided for implementing the invention.
DETAILED DESCRIPTION OF A PREFERRED EMBODIMENT OF THE INVENTION
Referring to FIG 9 which depicts a flow chart of a process in accordance with the invention for bulk loading of data into a table T; and checking it, the process is started by the bulk loading of one or more tables (T;) in a mass storage 82 (of FIG 3) as shown in step 130.
The table T; will be placed in a pending state until constraints are checked.
Generally, a deferred constraint checking process checks the table for violating rows. A user can choose between check-only mode (i.e., error will be returned when the first violating row is found), or fix-up mode (i.e., removing all violating rows that violate any constraint defined on the table and moving these rows into another table called the Exception table). In either mode, if no error is returned, the table will be brought out of the Check Pending state.
1o Additional Terminology and Assumptions In a parallel mufti-node data processing system, a database management system operating in the data processing system can efficiently handle large amounts of data by partitioning the database into a number of database partitions and distributing the database partitioning across the nodes of the data processing system.
~ 5 A table, in which data resides, defined in the database may also be divided into partitions, referred to as table partitions. Data in the table is distributed across the table partitions according to a partitioning map.
LOAD stores newly loaded data contiguously at the end of the table. In an Parallel multi-node system, load data is stored contiguously on each partition.
2o Two types of LOAD operations are contemplated:
Load Replace -- newly loaded data replaces any existing data in a table Load Insert -- existing data is retained and newly loaded data are appended to the end of a table RID (Row ID) -- each row in a table can be uniquely identified by a unique row ID, called 25 the RID.
New Terminology Check Pending Pepiod: A table enters the check pending state as a result of a LOAD

command. The SET CONSTRAINTS statement is used to bring the table out of the check pending state. The period from when the table enters the check pending state to when the table is taken out of check pending state is referred to as a Check Pending Period.
Processing Methods:
Full Processing -- all rows in the tables are checked for constraint violations.
Incremental Processing -- only the delta portion (the newly appended data) are checked for constraint violations.
No Processing -- no row is checked for constraint violations.
Full vs. Partial Table Scan Full Table Scan -- A type of scan that reads all rows in a table from beginning to the end.
Partial Table Scan -- A type of scan that reads the rows in a table starting from a given point to the end.
T = Table T (where multiple tables may be involved, the i'e table will be labelled T;) T.partitionk = k'h partition of table T
T.partitionk.LoadOpr = most "expensive" Load Operation performed on the k"' partition of 2o T (LOADREPLACE, LOADINSERT, LOADNONE) in the current check pending period, where LOADREPLACE is more "expensive"
than LOADINSERT, which is more "expensive" than LOADNONE.
T.partitionk.startRID = Row ID of the first row of the first Load Append operation performed on the kth partition (assuming no Load Replace has occurred) in the current check pending period T.partitionk.pageCount = Number of pages that has been appended to the kth partition of table T. This is to be used by the Optimizer as statistics.
Referring to FIG. 9(a), additional detail is provided for step 130 which describes bulk loading where a table, T, is distributed in multiple partitions.
During the bulk load process data is divided up among table partitions (see Fig. 11) of the database system by the database management system according to its normal operating procedure which will be readily understood by those skilled in the art in database field.
For exemplary purposes, the loading of one partition, partitionk, 203, will be now described.
Referring to FIG 9(b) for this purpose, it can be seen that, instead of always checking all rows of a table in the check pending state for constraint violations, this invention enhances performance by keeping track of the operations that has been performed on the table and determining how much of the table needs to be checked for constraint violations.
The process of FIG 9(b) is conveniently implemented in the pseudo-code that follows which is indexed to FIG. 9(b).
if the load operation is in REPLACE mode (601 ) set T.partitionk.LoadOpr to LOADREPLACE; (602) else (the load is in INSERT mode) if T.partitionk.LoadOpr == LOADNONE (i.e. the table partition has not been loaded before) (603) set T.partitionk.startRID = BEGIN RID; (604) (the RID of the first row of the append portion) set T.partitionk.LoadOpr = LOADINSERT; (604) end if T.partitionk.pageCount = T.partitionk.pageCount + number of page appended;
(605) Note:
1. During a LOAD operation, the attribute LoadOpr is updated on each loaded partition to record the most "expensive" type of Load operation within a check pending period. If LoadOpr is set to 'LOADINSERT', startRID may also be updated.
2. T.partitionK.start RID is updated only for the *first* Load Append operation (i.e. only when the partition is loaded for the first time in the check pending period).
3. T.partitionk.startRID and T.partitionk.LoadOpr will be reset to 0 and LOADNONE
respectively when table T is later brought out of the check pending state.
Computing the type of Processing Method Required Referring to FIG. 9 again deferred constraint checking (step 132) is initiated by a user using, in the case of DB2TM UDBTM V5 for instance, the command "Set Constraints" with option 1 o "Immediate Checked".
Referring to step 133 in FIG. 9 as illustrated in greater detail in FIG 9(c), and the pseudo-code which follows, the specific embodiment of the invention depicted determines if full, incremented, or no processing is required for constraint checking when the command "SET
CONSTRAINTS FOR T IMMEDIATE CHECKED" is issued, the database management system determines the type of processing method (i.e. one of Full Processing, Incremental Processing or No Processing) required for constraint checking, performs constraint checkings, and brings table T out of the check pending state.
Algorithm (F_) F(T.const checked, T.force full, T.partitionk..LoadOpr) ->
T.processMethod:
Input:
2o ~ T.const checked = flags in the catalog indicating whether a type of constraint (e.g. Foreign Key or Check) has been checked or not.
~ T.forced full = forced full flag of table T (TRUE or FALSE), a flag indicating if full processing on the table is mandatory.
~ T.partitionk.LoadOpr (defined in New Terminology section) (the most expensive type of load operation recorded for the kth partition table T.) Output:

T.processMethod: the type of processing method required on table T
Pseudo-code:
if T.const checked flags indicates that table T has no constraint to be checked (606) T.processMethod = PROCESS NONE; (607) else if T.forced_full flag has been set (608) T.processMethod = PROCESS FULL ; (609) else initialize T.processMethod = PROCESS NONE; (610) t0 for each of the k'h partition (steps 611, 612, 617) if T.partitionk.LoadOpr == LOADREPLACE (613) T.processMethod = PROCESS FULL; (614) quit loop;
else if T.partitionk..LoadOpr == LOADINSERT (615) T.processMethod = PROCESS INCREMENTAL; (616) else T.partitionk.LoadOpr == LOADNONE) do nothing (leave T.processMethod unchanged) end for Note:
(1) The input T.force full of algorithm (F) is set in several cases:
~ If a constraint has been added to T or any of its ancestors while that table is in the Check Pending state.
~ a previous SET CONSTRAINTS statement employed full processing for some ancestors of T where the ancestors have a referential integrity relation to Table T. The forced_full flag will then be cascaded to all descendants of that ancestor.
(2) It is possible for the LOAD operation to load data into some partitions but not the others.
The LoadOpr on each partition may record a different (most expensive) LoadOpr.
The for-loop (steps 611 to 617) does the following:
~ if ANY partition has been load Replaced, FULL processing will be performed.
~ if ALL partitions record a LOADNONE, NO processing will be performed.
~ if there is at least one partition that has been Load Inserted and no partition has been Load Replaced, INCREMENTAL processing will be performed.
Referring to FIG 9(c) cont'd, if full processing is required (618), cascade full processing (620) to those descendent tables in the invocation list (list of tables specified in the same SET
CONSTRAINTS statement), and mark a force full (622) flag in those descendent tables that are not in the invocation list.
Referring to FIG 9(c), if incremental processing is required (619), a special predicate called the RIDGE (RID Greater Than) predicate will be added to the QGM graph (which will be explained subsequently). This predicate reduces the set of rows that require constraint checking to only the 2o newly appended rows. To assist in Optimizer decisions in order to keep track of the amount of data loaded an average Page Count can also be computed (621) from T.partitionk.pageCount.
Referring to FIG 9, if no processing is required, the table will not be checked for constraint violation.
As may be seen the embodiment of the invention determines if full, incremental, or no processing is required for constraint checking.
If no processing (634) is required, then the table can be brought immediately out of the check pending state (635) without doing any checking.

If processing is required (634) a query (636) is constructed by the database management system to capture the following semantics:
(a) if a user has selected the check-only mode of constraint checking an error message will be returned when the first violating row that has been loaded in the table T has been detected; or (b) if fix-up mode has been selected by the user, all rows violating constraints defined on the table can be either removed or copied an exception table.
As stated before, if no error message is returned, the table T will brought out of Check Pending state. Check only and fix-up nodes are known in the database field (see US Patent 5,706,494).
Referring once again to the invention herein as described in FIG. 9, in step 638, after constructing the query, a RIDGE predicate is added to each table T; that requires incremental processing. The RIDGE predicate allows constraint checking only the appended rows to table T;.
Link M, numbered 750, serves as a visual link between figures 9 and 10.
t5 Tables 8(a) and 11(a) show the modifications to Tables 8 and 11 after adding the RIDGE
predicate. A comparison of Table 8 and Table 8(a) indicates that the RIDGE
predicates "EMP.#TID>=DO1 D2 (on line 4 of Table 8(a) and "PROJ.#TID.=DO1 D2 (on line 16 of Table 8(a) are added to the query. Referring to Table 11 (a), similar predicates are added on line 19 and 36.

TABLE 8(a) 1. begin 2. select 1 3. from EMP

4. where EMP.#TID>=DOID2 and 1=case 5. when EMP.deptno is not null and 6. not exists 7. (select 1 from DEPT.deptno 8. where DEPT.deptno = EMP.deptno) 9. then raise-- error('-3603', EMPDEPT) 10. when not EMP.age > 16) 11. then raise-- error('-3603', MINAGE) 12. else 2 13. end 14. select 1 15. from PROJ

16. where PROJ. #TID>=DOID2 and 1 = case 17. when PROJ.Iead is not null and 18. not exists 19. (select 1 from EMP

20. where EMP.empno = PROJ.Iead) 21. then raise-- error('-3603', PROJLEAD) 22. else 2 23. end 24. end TABLE 11(a) 1. begin 2. create temporary table ONEROW(c,) as (values (1)) 3. create temporary table VIOLEMP (rid, empno, deptno, age, ts, msg) as 4. (select EMP.#rid, EMP.empno, EMP.deptno, EMP.age, current timestamp, 5. case when TEMpgMPDEPTx 1S not null and 6. EMP.deptno is not null 7. then ' EMPDEPT' else "

8. end II

9. case when not (age > 16) 10. then 'MINAGE' else "

11. end 12. from EMP left outer join 13. (select 1 14. from ONEROW

15. where 16. not exists 17. (select 1 from DEPT

18. where DEPT.deptno = EMP.deptno)) as TEMPgMPDEPT

19. where EMP.#TID>=DOID2 and (TEMPEMPDEPT'x 1S not null and 20. EMP.deptno is not null) 21. or 22. not (age > 16)) 23. create temporary table VIOLPRO~ (rid, projno, lead, ts, msg) as 24. (select PROJ.projno, PROJ.Iead, current timestamp, 25. case when TEMPpROJLEAD~X 1S nOt null and 26. PROJ.Iead is not null 27. then 'PROJLEAD' else "

28. end 29. from PROD left outer join 30. (select 1 31. from ONEROW

32. where 33. not exists 34. (select 1 from EMP

35. where EMP.empno = PROJ.Iead)) as TEMPPROJLEAD

36. where PROJ..#TID>=DOID2 and TEMPPROJr.EAn-x is not null and 37. PROJ.Iead is not null) 1o 38. select * from VIOLEMP ;

39. select * from VIOLPROJ ;

40. create temporary table DTEMP (empno, deptno, age, ts, msg) as 41. (delete VIOLEMP.empno, VIOLEMP.deptno, VIOLEMP.age, VIOLEMP.ts, VIOL~MP.msg 42. from EMP, VIOLEMP

43. where EMP.#rid = VIOLE~.rid);

44. create temporary table DTpROJ (projno, lead, ts, msg) as 45. (delete VIOLPRO~.projno, VIOLPRO,.lead, VIOLPROj.ts, VIOLPROJ.msg 46. from PROJ, VIOLPRO, 47. where PROJ.#rid = VIOLPRO~.rid);

48. insert into EEMP

49. select empno, deptno, age, ts, msg 50. from DTEMr ;
51. insert into EPROJ
52. select projno, lead, ts, msg 53. from DTPROJ~
54. delete from PROJ, DTEMP
55. where PROJ.Iead = DTEMP.empno;
56. end How the RIDGE predicated is used by the Optimizer and at query execution Hme The RIDGE (RID Greater Than) predicate is of the form: RID >= startRID, where RID is the row ID of the row being processed at execution time, startRID is the RID
recorded in the LOAD
phase. In the case of parallel mufti-node system, the predicate will be translated to the form RID >_ T.partitionk.startRID when executed on the kt" partition.
The RIDGE predicate, like other predicate performs a filtering function, and filters out those rows not in the appended portion by "comparing" the RID of the row being processed with T.startRID with the help of a mapping function (this technique is well known in the art and needs no explanation) between RID and the physical location of a row). This could be done through a to partial table scan by scanning (i.e. retrieving rows from ) table T
starting from the row with row id T.startRID.
Unlike other predicates, the RIDGE predicate can be marked as optional, especially for constraint checkings. Since constraint checking is idempotent (i.e., the same rows can be checked for constraint violations more than once), the RIDGE predicate can be marked as optional. It gives the Optimizer more flexibility if an alternative plan, which involves reading and checking rows not in the appended portion, is found to be cheaper than the partial table scan method. For example, if a column having a highly selective index is part of the constraints, it may be cheaper to use a full index scan instead of the partial table scan. In this case, the application of the RIDGE predicate is optional.
2o Referring to FIG. 10, the Query formed above can be compiled, optimized and executed (639) is well known in the art.
If check only mode is enabled (640) then only the first violating row, found in Table T;, if any, will cause error message (641) to be generated and returned to the user, however, if in fix-up node then violating rows will be moved (644) into an exception table.
The table T; will then be brought out of Check Pending (645) and the flags indicated in step 646 will be reset.
This completes checking the tables in accordance with one embodiment of the invention.

Examples of some embodiments of the invention and their advantages are described below:
Example 1 INCREMENTAL PROCESSING: when a table has been appended data using the Insert option of the Load command, except for a few special cases, only the appended portion needs to be checked for constraint violations. Performance will be greatly enhanced if the table size is huge while the appended portion is small.
Example:
load from datafile.del of del insert into T;
// The Load command appends some rows into // T and puts it into the check // pending state.
set constraints for T immediate checked;
// The system determines that only the // appended portion needs to be checked for // constraints violation.
Example 2 NO PROCESSING: when a table has been put into the check pending state without 2o introducing possible constraint violations (using the command SET
CONSTRAINTS with OFF
option), no row needs to be checked for constraint violations. This avoids unnecessary constraints processing.
set constraints for T off;
// T is put into the check pending state set constraints for T immediate checked;
// System determines that no row needs // to be checked for constraint violations.
Example 3 FULL PROCESSING: when new constraints have been added to a table while it is in the check pending state, existing rows may violate the new constraints. The whole table will be checked for constraint violations.
set constraints for T off;
// T is put into the check pending state 1 o alter table T add constraint CHK 1 check (c 1 >0);
// New constraint added to table set constraints for T immediate checked;
// System determines that new constraint // has been added. The whole table will is // be checked for constraint violations.
Example 4 FULL PROCESSING: when the parent of a child was fully processed (i.e. all rows in the parent table were checked for constraint violations), violating rows (if any) were moved to the exception table. Since these violating rows may be the foreign key of its children tables, all children 20 of the parent table need to be fully processed to ensure referential integrity of data.
load from datafile.del of del replace into T-parent;
// T-parent has been load replaced.
// Both T-parent and it child T child // are put into the check pending state.

set constraints for T-parent immediate checked;
// T_parent is fully processed.
set constraints for T child immediate checked;
// Full processing is cascaded from its // parents. All rows in T child are // checked for constraint violations.
Example 5 FULL PROCESSING: when a table has been loaded data using the REPLACE option.
Existing rows will be deleted and replaced with new rows. The entire table will be checked for constraint violations.
load from datafile.del of del replace int T; // Load in Replace mode set constraints for T immediate checked; // System determines that // entire table needs to // be checked for constraint // violations The following examples illustrate the invention applicable to a variety of bulk loading scenarios:
The scenarios (No, Full or Incremental processing) described above are the simple scenarios that only a single LOAD operation is performed. The method of the invention is capable of 2o determining the type of processing method after one or more LOAD operations (in a combination of either REPLACE or INSERT mode).
Example 6 Load Append to table T from source 1 Load Append to table T from source2 Load Append to table T from source3 Deferred constraint checking on table T will check constraints for the appended rows from sourcel, source2 and source3.
s Example 7 Load Append to table T from sourcel Load Replace to table T from source2 Load Append to table T from source3 o Deferred constraint checking on table T will check the whole table (i.e.
rows loaded from source2 and source3).
[Note: rows from source 1 were replaced by the second Load operation which was performed in Replace mode.]
15 Note that the SET CONSTRAINTS command examples (all 7 examples) above are in check-only mode. A similar approach applies to the scenarios in which user specifies fix-up mode, just that exception tables need to be defined and specified in SET CONSTRAINTS command.
The main focus of the examples is to demonstrate how much of the table needs to be checked for constraint violations (the entire table, only the appended portion, or no check is needed).
2o The following examples indicate performance improvements of the invention over the prior art US patent 5,706,494 in two scenarios:
Scenario 1:
~ a table T has a few check constraints and a Referential Integrity constraint 25 ~ l OM of data is loaded (appended) into the table every week ~ the table contains 1,040M of data, over a 2 year period, (i.e. 2 years x 52 weeks/year x 10 M/week = 1,040M of data) If 1 more week of data (lOM) is appended to the table:
~ before this invention, the whole table, 1050M of data, would be checked for constraint violation, (i.e., 1,040M + lOM = 1,050M of data).
~ with this invention, only the appended portion, i.e., lOM of data, will be checked for constraint violation. The number of rows that needs to be checked is about 1/100th of what needs to be checked before.
o Note: M represents a million records, G represents a billion records.
Scenario 2:
~ a table T has a few check constraints and a Referential Integrity constraint ~ 1 G of data is loaded (appended) into the table every month ~ the table contains 24G data over a 2 year period, ( i.e. 2 years x 12 months/year x 1 G/week = 24G of data) If 1 more month of data (1G) is appended to the table:
~ before this invention, the whole table .25G of data, will be checked for constraint violation, (i.e. 25 G (24G + 1G of data).
~ with this invention, only the appended portion, i.e., 1 G of data, will be checked for constraint violation. Number of rows that needs to be checked is about 1/25th of what needs to be checked before.
While this invention is primarily discussed as a method, it can be understood by a person of ordinary skill in the art that the apparatus discussed above in connection with FIG.3 may be programmed or otherwise designated to facilitate the practice of the method of this invention. Also, an article of manufacture, such as the prerecorded floppy disk or other similar computer program product, for use with a data processing system, could include a storage medium and program means recorded thereon for directing the data processing system to facilitate the practice of the method of this invention. It will be understood that such apparatus and articles of manufacture also fall within the spirit and scope of this invention.
Other embodiments and modification of this invention may occur to those of ordinary skill in the art in view of these teachings. Therefore, this invention is limited only by the following claims, which include all such embodiments and modifications when viewed in conjunction with the 1 o above specifications and accompanying drawings.

Claims (36)

1. In a database management system for managing a database containing data comprising:
storage for storing data in said database;
an instruction processor for processing instructions for managing data stored in said database;
a constraint manager for managing constraints on said data stored in said database;
a method for deferred checking of data after bulk loading into said database for violation of at least one constraint comprising:
determining an appropriate procedure for constraint checking comprising:
determining whether constraint checking is required;
and if it is required, determining whether to implement full, or incremental checking for compliance with said at least one constraint; and checking said data in accordance with said determined constraint checking procedure.
2. The method of claim 1 wherein said method for deferred checking of data after bulk loading into said database is adapted to check for violation of at least one constraint, said method comprising:
placing said database in a check pending state before checking;
determining an appropriate procedure for constraint checking as claimed in claim 1, checking said data in accordance with said determined constraint checking procedure, bringing said database out of said check pending state after checking said data.
3. In a relational database management system for managing a database containing data comprising:
memory storage for storing at least one table having a plurality of data records;
each of said data records being uniquely identifiable;
an instruction processor for processing instructions for managing said data records in said database;
a constraint manager for managing constraints, including table constraints and referential integrity constraints, on said data records in said database;
a method for deferred checking of data in a table after bulk loading into said database for violation of said constraints comprising:
placing said table into a check pending state before checking;
determining an appropriate procedure for constraint checking comprising:
determining whether constraint checking is required;
and if it is required, determining whether to implement full, or incremental checking for compliance with said constraints;
wherein said full checking comprises checking all data in a table including any preexisting data and bulk loaded data;
and wherein incremental checking comprises checking only that data in a table which was appended to said table in bulk loading;
checking said table in accordance with said determined constraint checking procedure; and bringing said table out of check pending state when constraint checking determines that no violation is present.
4. The method of claim 3 for deferred checking of data in a table after bulk loading into said database further comprising:
(a) recording load operation information (Load.Opr) including, whether bulk loaded data was appended to said table, or whether all data in said table, including data previously present in said table and new data, was replaced by bulk data; and, (b) setting selected constraint flags of said database management system;
said selected constraint flags being set when constraints require checking and are not set when constraints have either previously been checked or otherwise do not require checking;
wherein said determining of said appropriate procedure for constraint checking for a table includes using the following information:
said recorded load operation information and whether said selected constraint flags of said database management system are set.
5. The method of claim 4 wherein said selected constraint flags comprise:
at least one of a referential integrity constraint (foreign key) flag, a table check constraint flag, and a forced full constraint checking flag is set for said table;
6. The method of claim 5 wherein, in the process of a sequential series of bulk data load operations on a table, checking is deferred until all loading of data has occurred, wherein said recorded load operation information on a table is set to the most expensive load operation of said series of bulk data load operations performed on said table.
7. The method of claim 3 or 4 wherein newly loaded data is stored contiguously in a table during bulk loading and wherein each data record of said data is uniquely identified with a record identifier (RID), a starting RID being assigned to the first record of data bulk loaded.
8. The method of claim 7 wherein for newly loaded data, in the case of append mode loading being used, comprising:
storing only the starting RID of said appended portion of said data on said table;

said newly loaded data being appended to the end of previously stored data in said table.
9. The method of claim 3 or 4 wherein said database comprises a relational database having a plurality of nodes; wherein a table in said database is partitioned into partitions in said database, newly loaded data is stored contiguously in a table partition wherein during bulk loading, in the case of appended inserted mode loading being used, storing only the starting RID of said appended portion of said data on said table partition, said newly loaded data being appended to the end of previously stored data in said table partition.
10. The method of claim 4 or 5 for deferred constraint checking of a table implemented in table partitions across a database, comprising:
detecting if any flag indicates that a type of constraint has not already been checked is set, and if set checking said table for violation of said constraint;
detecting if a forced full flag is set, and if set checking all data records of said table for constraint violations;
detecting if data records in any table partition have been replaced, and if so checking all data records of said table for constraint violations; and detecting if any data has been inserted into a table partition without the replacement of data in any table partitions, and if so inserted without replacement checking for constraint violation by incremental checking.
11. The method of claim 10 comprising:
checking whether any data was loaded in bulk loading, and if no data was loaded then preventing constraint checking.
12. The method of claim9 if incremental checking procedure is selected for constraint checking applying a RIDGE filter to select only newly appended data for checking.
13. The method of claim 12 wherein said instruction processor of said database management system includes an instruction optimizer comprising:
setting said RIDGE filter as optional in said database management system, using instruction optimizer to select an optimum processing procedure for accessing desired data records of said table to be checked for constraint violation.
14. The method of claim 13 comprising:
recording the amount of data such as a page count of data loaded;
using said recorded amount by said query optimizer in decision making to determine an optimum processing procedure for checking constraint violation.
15. The method of claim 10 wherein a plurality of tables require checking, namely a parent table and at least one descendent table;
wherein if full constraint checking procedure is chosen for checking a parent table using a set constraint checking command listing parent and descendent tables said method comprises:
selecting full constraint checking procedure for said parent and descendent tables listed in said set constraint command, and for any descendent tables not listed in said set constraint command, marking a force-full flag to indicate that full processing will be required subsequently for said descendent tables in order to complete constraint checking before bringing said descendent tables out of check pending state.
16. The method of claims 3,4 or 5 wherein said instruction processor comprises a query processor for processing queries.
17. The method of claim 16 wherein said instruction processor comprises a query compiler for compiling queries and a query processor for processing queries in said database.
18. An article of manufacture for use in a computer system comprising a computer readable medium for storing statements or instructions for use in execution in a computer in accordance with the method of any of claims 1, 3 , or 4.
19. An article of manufacture for use in a computer system comprising a computer readable medium for storing statements or instructions for use in execution in a computer in accordance with the method of any of claims 4 or 10.
20. An article of manufacture for use in a computer system in a database management system for managing a database containing data having:
storage for storing data in said database;
an instruction processor for processing instructions for managing data stored in said database;
a constraint manager for managing constraints on said data stored in said database;
said article of manufacture comprising a computer usable medium having computer readable program code routines embodied in said medium including:
a program code routines embodied in said computer usable medium for causing the computer to effect deferred checking of data after bulk loading into said database for violation of at least one constraint comprising:
determining an appropriate procedure for constraint checking comprising:
determining whether constraint checking is required;
and if it is required, determining whether to implement full, or incremental checking for compliance with said at least one constraint; and checking said data in accordance with said determined constraint checking procedure.
21. The article of claim 20 wherein said program code routines embodied in said computer usable medium for causing the computer to effect deferred checking of data after bulk loading into said database are adapted to check for violation of at least one constraint, comprising routines for:
placing said database in a check pending state before checking;
determining an appropriate procedure for constraint checking as claimed in claim 1, checking said data in accordance with said determined constraint checking procedure, bringing said database out of said check pending state after checking said data.
22. For a relational database management system in a computer system for managing a database containing data having:
memory storage for storing at least one table having a plurality of data records;
each of said data records being uniquely identifiable;
an instruction processor for processing instructions for managing said data records in said database;
a constraint manager for managing constraints, including table constraints and referential integrity constraints, on said data records in said database;
an article of manufacture comprising a computer usable medium having computer readable program code means embodied in said medium including program code routines embodied in said computer usable medium for causing the computer to effect deferred checking of data in a table after bulk loading into said database for violation of said constraints, comprising routines for:
placing said table into a check pending state before checking;
determining an appropriate procedure for constraint checking comprising:

determining whether constraint checking is required;
and if it is required, determining whether to implement full, or incremental checking for compliance with said constraints;
wherein said full checking comprises checking all data in a table including any preexisting data and bulk loaded data;
and wherein incremental checking comprises checking only that data in a table which was appended to said table in bulk loading;
checking said table in accordance with said determined constraint checking procedure; and after checking said table, bringing said table out of said check pending state into a normal state if no constraint violation is found.
23. The article of manufacture of claim 22 for deferred checking of data in a table after bulk loading into said database further comprising program code routines for:
(a) recording load operation information (Load.Opr) including, whether bulk loaded data was appended to said table, or whether all data in said table, including data previously present in said table and new data, was replaced by bulk data; and, (b) setting selected constraint flags of said database management system;
said selected constraint flags being set when constraints require checking and are not set when constraints have either previously been checked or otherwise do not require checking;
wherein said determining of said appropriate procedure for constraint checking for a table includes using the following information:
said recorded load operation information and whether said selected constraint flags of said database management system are set.
24. The article of manufacture of claim 23 wherein said selected constraint flags comprise:

at least one of a referential integrity constraint (foreign key) flag, a table check constraint flag, and a forced full constraint checking flag is set for said table;
25. The article of manufacture of claim 24 wherein, in the process of a sequential series of bulk data load operations on a table, said computer program code routines are adapted so that checking is deferred until all loading of data has occurred, wherein said recorded load operation information on a table is set to the most expensive load operation of said series of bulk data load operations performed on said table.
26. The article of manufacture of claim 22 or 23 wherein said computer program code routines are adapted to store newly loaded data contiguously in a table during bulk loading and wherein each data record of said data is uniquely identified with a record identifier (RID), a starting RID being assigned to the first record of data bulk loaded.
27. The article of manufacture of claim 26 wherein for newly loaded data, in the case of append mode loading being used, comprising computer program code routines for:
storing only the starting RID of said appended portion of said data on said table;
said newly loaded data being appended to the end of previously stored data in said table.
28. The article of manufacture of claim 22 or 23 wherein said database comprises a relational database having a plurality of nodes; wherein a table in said database is partitioned into partitions in said database, newly loaded data is stored contiguously in a table partition wherein said computer program code routines are adapted so that during bulk loading, in the case of appended inserted mode loading being used, storing only the starting RID of said appended portion of said data on said table partition, said newly loaded data being appended to the end of previously stored data in said table partition.
29. The article of manufacture of claim 23 or 24 for deferred constraint checking of a table implemented in table partitions across a database, comprising computer program code routines for:
detecting if any flag indicates that a type of constraint has not already been checked is set, and if set checking said table for violation of said constraint;
detecting if a forced full flag is set, and if set checking all data records of said table for constraint violations;
detecting if data records in any table partition have been replaced, and if so checking all data records of said table for constraint violations; and detecting if any data has been inserted into a table partition without the replacement of data in any table partitions, and if so inserted without replacement checking for constraint violation by incremental checking.
30. The article of manufacture of claim 29 comprising computer program code routines for:
checking whether any data was loaded in bulk loading, and if no data was loaded then preventing constraint checking.
31. The article of manufacture of claim 28 if incremental checking procedure is selected for constraint checking said computer program code routines are adapted for applying a RIDGE filter to select only newly appended data for checking.
32. The article of manufacture of claim 31 wherein said instruction processor of said database management system includes an instruction optimizer comprising:
setting said RIDGE filter as optional in said database management system, and said computer program code routines are adapted to use said instruction optimizer to select an optimum processing procedure for accessing desired data records of said table to be checked for constraint violation.
33. The article of manufacture of claim 32 comprising computer program code routines for:
recording the amount of data such as a page count of data loaded;
using said recorded amount by said query optimizer in decision making to determine an optimum processing procedure for checking constraint violation.
34. The article of manufacture of claim 23, 24 or 28 wherein a plurality of tables require checking, namely a parent table and at least one descendent table comprising computer program code routines for;
if full constraint checking procedure is chosen for checking a parent table using a set constraint checking command listing parent and descendent tables said method comprises:

selecting full constraint checking procedure for said parent and descendent tables listed in said set constraint command, and for any descendent tables not listed in said set constraint command, marking a force-full flag to indicate that full processing will be required subsequently for said descendent tables in order to complete constraint checking before bringing said descendent tables out of check pending state.
35. The article of manufacture of claims 12, 13 or 14 wherein said instruction processor comprises a query processor for processing queries.
36. The article of manufacture of claim 25 wherein said instruction processor comprises a query compiler for compiling queries and a query processor for processing queries in said database.
CA002310576A 1999-07-30 2000-06-02 System and method for selective incremental deferred constraint processing after bulk loading data Abandoned CA2310576A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US09/364,753 US6453314B1 (en) 1999-07-30 1999-07-30 System and method for selective incremental deferred constraint processing after bulk loading data
US09/364,753 1999-07-30

Publications (1)

Publication Number Publication Date
CA2310576A1 true CA2310576A1 (en) 2001-01-30

Family

ID=23435931

Family Applications (1)

Application Number Title Priority Date Filing Date
CA002310576A Abandoned CA2310576A1 (en) 1999-07-30 2000-06-02 System and method for selective incremental deferred constraint processing after bulk loading data

Country Status (2)

Country Link
US (1) US6453314B1 (en)
CA (1) CA2310576A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220171781A1 (en) * 2004-06-18 2022-06-02 Google Llc System And Method For Analyzing Data Records

Families Citing this family (100)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB9603582D0 (en) 1996-02-20 1996-04-17 Hewlett Packard Co Method of accessing service resource items that are for use in a telecommunications system
CA2279222C (en) * 1999-07-30 2002-07-16 Ibm Canada Limited-Ibm Canada Limitee Direct call threaded code
US7016903B1 (en) 2001-01-25 2006-03-21 Oracle International Corporation Method for conditionally updating or inserting a row into a table
US6662175B1 (en) * 2001-05-08 2003-12-09 Ncr Corporation Semantic query optimization using value correlation
US20030172048A1 (en) * 2002-03-06 2003-09-11 Business Machines Corporation Text search system for complex queries
US7647354B2 (en) * 2002-05-24 2010-01-12 Oracle International Corporation High-performance change capture for data warehousing
US7165077B2 (en) * 2002-10-08 2007-01-16 Omnicare, Inc. Method for processing and organizing pharmacy data
US7502791B2 (en) * 2002-11-26 2009-03-10 Norsync Technology A/S Database constraint enforcer
US7305410B2 (en) * 2002-12-26 2007-12-04 Rocket Software, Inc. Low-latency method to replace SQL insert for bulk data transfer to relational database
US6961733B2 (en) 2003-03-10 2005-11-01 Unisys Corporation System and method for storing and accessing data in an interlocking trees datastore
US6829600B2 (en) * 2003-04-03 2004-12-07 Oracle International Corporation Merge delete statement for database operations
US7472107B2 (en) * 2003-06-23 2008-12-30 Microsoft Corporation Integrating horizontal partitioning into physical database design
US20060064400A1 (en) * 2004-09-21 2006-03-23 Oracle International Corporation, A California Corporation Methods, systems and software for identifying and managing database work
US7664847B2 (en) 2003-08-14 2010-02-16 Oracle International Corporation Managing workload by service
US7953860B2 (en) * 2003-08-14 2011-05-31 Oracle International Corporation Fast reorganization of connections in response to an event in a clustered computing system
US8516004B2 (en) * 2003-09-19 2013-08-20 Unisys Corporation Method for processing K node count fields using an intensity variable
US6944633B1 (en) * 2003-12-10 2005-09-13 Ncr Corporation Performing a join in a partitioned database system
US7711730B2 (en) * 2003-12-22 2010-05-04 International Business Machines Corporation Method of returning data during insert statement processing
US7340471B2 (en) * 2004-01-16 2008-03-04 Unisys Corporation Saving and restoring an interlocking trees datastore
EP1591916B1 (en) * 2004-04-26 2013-11-06 Sap Ag Method, computer program and device for deleting data sets contained in a table system
US7664790B2 (en) * 2004-06-18 2010-02-16 Bmc Software, Inc. Cascade delete processing
US7593923B1 (en) 2004-06-29 2009-09-22 Unisys Corporation Functional operations for accessing and/or building interlocking trees datastores to enable their use with applications software
US7302441B2 (en) * 2004-07-20 2007-11-27 International Business Machines Corporation System and method for gradually bringing rolled in data online with incremental deferred integrity processing
US7359923B2 (en) * 2004-08-20 2008-04-15 International Business Machines Corporation Online incremental deferred integrity processing and maintenance of rolled in and rolled out data
US7213041B2 (en) * 2004-10-05 2007-05-01 Unisys Corporation Saving and restoring an interlocking trees datastore
US7716241B1 (en) 2004-10-27 2010-05-11 Unisys Corporation Storing the repository origin of data inputs within a knowledge store
US7908240B1 (en) 2004-10-28 2011-03-15 Unisys Corporation Facilitated use of column and field data for field record universe in a knowledge store
US7418445B1 (en) 2004-11-08 2008-08-26 Unisys Corporation Method for reducing the scope of the K node construction lock
US7348980B2 (en) 2004-11-08 2008-03-25 Unisys Corporation Method and apparatus for interface for graphic display of data from a Kstore
US7676477B1 (en) 2005-10-24 2010-03-09 Unisys Corporation Utilities for deriving values and information from within an interlocking trees data store
US20070162508A1 (en) * 2004-11-08 2007-07-12 Mazzagatti Jane C Updating information in an interlocking trees datastore
US7499932B2 (en) * 2004-11-08 2009-03-03 Unisys Corporation Accessing data in an interlocking trees data structure using an application programming interface
US8224863B2 (en) * 2004-12-29 2012-07-17 Alcatel Lucent Equivalence class-based method and apparatus for cost-based repair of database constraint violations
US7409380B1 (en) 2005-04-07 2008-08-05 Unisys Corporation Facilitated reuse of K locations in a knowledge store
US7389301B1 (en) 2005-06-10 2008-06-17 Unisys Corporation Data aggregation user interface and analytic adapted for a KStore
US7490098B2 (en) * 2005-06-10 2009-02-10 International Business Machines Corporation Apparatus, system, and method for processing hierarchical data in disparate data repositories
JP4670496B2 (en) * 2005-06-14 2011-04-13 住友電気工業株式会社 Optical receiver
US8027969B2 (en) * 2005-12-29 2011-09-27 Sap Ag Efficient calculation of sets of distinct results in an information retrieval service
US20070214153A1 (en) * 2006-03-10 2007-09-13 Mazzagatti Jane C Method for processing an input particle stream for creating upper levels of KStore
US20080275842A1 (en) * 2006-03-20 2008-11-06 Jane Campbell Mazzagatti Method for processing counts when an end node is encountered
US20070220069A1 (en) * 2006-03-20 2007-09-20 Mazzagatti Jane C Method for processing an input particle stream for creating lower levels of a KStore
US7734571B2 (en) * 2006-03-20 2010-06-08 Unisys Corporation Method for processing sensor data within a particle stream by a KStore
US7689571B1 (en) 2006-03-24 2010-03-30 Unisys Corporation Optimizing the size of an interlocking tree datastore structure for KStore
US8238351B2 (en) * 2006-04-04 2012-08-07 Unisys Corporation Method for determining a most probable K location
US7676330B1 (en) 2006-05-16 2010-03-09 Unisys Corporation Method for processing a particle using a sensor structure
US8527502B2 (en) * 2006-09-08 2013-09-03 Blade Makai Doyle Method, system and computer-readable media for software object relationship traversal for object-relational query binding
US8548942B2 (en) 2006-10-04 2013-10-01 Salesforce.Com, Inc. Methods and systems for recursive saving of hierarchical objects to a database
US8682863B2 (en) 2006-10-04 2014-03-25 Salesforce.Com, Inc. Methods and systems for bulk row save logic in an object relational mapping layer and application framework
US8161010B2 (en) 2006-10-04 2012-04-17 Salesforce.Com, Inc. Methods and systems for providing fault recovery to side effects occurring during data processing
US7809702B2 (en) * 2007-05-08 2010-10-05 International Business Machines Corporation Generating from application modifications commands to modify the objects in a repository
US8056000B2 (en) * 2007-08-27 2011-11-08 International Business Machines Corporation Apparatus and system for an automated bidirectional format transform
US7958154B2 (en) * 2007-08-29 2011-06-07 International Business Machines Corporation Apparatus, system, and method for command manager support for pluggable data formats
US7870174B2 (en) * 2007-10-11 2011-01-11 Oracle International Corporation Reference partitioned tables
US8296316B2 (en) * 2007-10-17 2012-10-23 Oracle International Corporation Dynamically sharing a subtree of operators in a data stream management system operating on existing queries
US8073826B2 (en) 2007-10-18 2011-12-06 Oracle International Corporation Support for user defined functions in a data stream management system
US7991766B2 (en) * 2007-10-20 2011-08-02 Oracle International Corporation Support for user defined aggregations in a data stream management system
US8521867B2 (en) * 2007-10-20 2013-08-27 Oracle International Corporation Support for incrementally processing user defined aggregations in a data stream management system
US8639675B2 (en) * 2008-08-28 2014-01-28 Make Technologies, Inc. Linking of parent-child data records in a legacy software modernization system
US8676841B2 (en) 2008-08-29 2014-03-18 Oracle International Corporation Detection of recurring non-occurrences of events using pattern matching
US8214382B1 (en) * 2008-11-25 2012-07-03 Sprint Communications Company L.P. Database predicate constraints on structured query language statements
US8352517B2 (en) * 2009-03-02 2013-01-08 Oracle International Corporation Infrastructure for spilling pages to a persistent store
US8250048B2 (en) * 2009-04-20 2012-08-21 Oracle International Corporation Access control for graph data
US8238538B2 (en) 2009-05-28 2012-08-07 Comcast Cable Communications, Llc Stateful home phone service
US8321450B2 (en) 2009-07-21 2012-11-27 Oracle International Corporation Standardized database connectivity support for an event processing server in an embedded context
US8387076B2 (en) 2009-07-21 2013-02-26 Oracle International Corporation Standardized database connectivity support for an event processing server
US8301660B2 (en) * 2009-07-22 2012-10-30 Oracle International Corporation Enforcing restrictions for graph data manipulation operations
US8386466B2 (en) 2009-08-03 2013-02-26 Oracle International Corporation Log visualization tool for a data stream processing server
US8527458B2 (en) 2009-08-03 2013-09-03 Oracle International Corporation Logging framework for a data stream processing server
US9430494B2 (en) 2009-12-28 2016-08-30 Oracle International Corporation Spatial data cartridge for event processing systems
US9305057B2 (en) 2009-12-28 2016-04-05 Oracle International Corporation Extensible indexing framework using data cartridges
US8959106B2 (en) 2009-12-28 2015-02-17 Oracle International Corporation Class loading using java data cartridges
US10162851B2 (en) * 2010-04-19 2018-12-25 Salesforce.Com, Inc. Methods and systems for performing cross store joins in a multi-tenant store
US8713049B2 (en) 2010-09-17 2014-04-29 Oracle International Corporation Support for a parameterized query/view in complex event processing
US9189280B2 (en) 2010-11-18 2015-11-17 Oracle International Corporation Tracking large numbers of moving objects in an event processing system
US20120191639A1 (en) * 2011-01-26 2012-07-26 International Business Machines Corporation Statistics forecast for range partitioned tables
US8990416B2 (en) 2011-05-06 2015-03-24 Oracle International Corporation Support for a new insert stream (ISTREAM) operation in complex event processing (CEP)
US9329975B2 (en) 2011-07-07 2016-05-03 Oracle International Corporation Continuous query language (CQL) debugger in complex event processing (CEP)
US9053153B2 (en) * 2012-06-18 2015-06-09 Sap Se Inter-query parallelization of constraint checking
US9563663B2 (en) 2012-09-28 2017-02-07 Oracle International Corporation Fast path evaluation of Boolean predicates
US11288277B2 (en) 2012-09-28 2022-03-29 Oracle International Corporation Operator sharing for continuous queries over archived relations
US10956422B2 (en) 2012-12-05 2021-03-23 Oracle International Corporation Integrating event processing with map-reduce
US10298444B2 (en) 2013-01-15 2019-05-21 Oracle International Corporation Variable duration windows on continuous data streams
US9098587B2 (en) 2013-01-15 2015-08-04 Oracle International Corporation Variable duration non-event pattern matching
US9390135B2 (en) 2013-02-19 2016-07-12 Oracle International Corporation Executing continuous event processing (CEP) queries in parallel
US9047249B2 (en) 2013-02-19 2015-06-02 Oracle International Corporation Handling faults in a continuous event processing (CEP) system
US9418113B2 (en) 2013-05-30 2016-08-16 Oracle International Corporation Value based windows on relations in continuous data streams
US9934279B2 (en) 2013-12-05 2018-04-03 Oracle International Corporation Pattern matching across multiple input data streams
US9244978B2 (en) 2014-06-11 2016-01-26 Oracle International Corporation Custom partitioning of a data stream
US9712645B2 (en) 2014-06-26 2017-07-18 Oracle International Corporation Embedded event processing
US10120907B2 (en) 2014-09-24 2018-11-06 Oracle International Corporation Scaling event processing using distributed flows and map-reduce operations
US9886486B2 (en) 2014-09-24 2018-02-06 Oracle International Corporation Enriching events with dynamically typed big data for event processing
WO2017018901A1 (en) 2015-07-24 2017-02-02 Oracle International Corporation Visually exploring and analyzing event streams
US11243938B2 (en) * 2016-05-31 2022-02-08 Micro Focus Llc Identifying data constraints in applications and databases
CN106202441A (en) * 2016-07-13 2016-12-07 腾讯科技(深圳)有限公司 Data processing method based on relevant database, device and system
US10474653B2 (en) 2016-09-30 2019-11-12 Oracle International Corporation Flexible in-memory column store placement
US10936555B2 (en) * 2016-12-22 2021-03-02 Sap Se Automated query compliance analysis
JP6897248B2 (en) * 2017-04-06 2021-06-30 富士通株式会社 Update reflection program, update reflection method and update reflection device
US11468093B2 (en) * 2017-05-12 2022-10-11 Sap Se Synopsis based advanced partition elimination
US11468035B2 (en) 2017-05-12 2022-10-11 Sap Se Constraint data statistics
CN114817410B (en) * 2022-06-23 2022-09-13 心鉴智控(深圳)科技有限公司 Service data processing method, device, equipment and storage medium

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4933848A (en) 1988-07-15 1990-06-12 International Business Machines Corporation Method for enforcing referential constraints in a database management system
EP0360387B1 (en) 1988-09-23 1996-05-08 International Business Machines Corporation Data base management system
US5226158A (en) 1989-05-24 1993-07-06 International Business Machines Corporation Method and apparatus for maintaining referential integrity within a relational database
WO1991001530A2 (en) 1989-07-11 1991-02-07 Bell Communications Research, Inc. Methods and apparatus for checking the integrity of data base data entries
KR940004389B1 (en) 1989-10-13 1994-05-23 인터내셔널 비지네스 머신즈 코포레이션 Method and system for access plan generation to relational data base
US5499359A (en) 1994-01-18 1996-03-12 Borland International, Inc. Methods for improved referential integrity in a relational database management system
JPH07295868A (en) 1994-04-27 1995-11-10 Hitachi Ltd Integrity constraint control method for
US5513350A (en) 1994-05-27 1996-04-30 At&T Corp. Update constraints in transactions which may abort
US5577231A (en) 1994-12-06 1996-11-19 International Business Machines Corporation Storage access authorization controls in a computer system using dynamic translation of large addresses
US5706494A (en) 1995-02-10 1998-01-06 International Business Machines Corporation System and method for constraint checking bulk data in a database
US5778370A (en) 1995-08-25 1998-07-07 Emerson; Mark L. Data village system
US6105025A (en) * 1996-03-08 2000-08-15 Oracle Corporation Method for using an index as a workspace for deferred enforcement of uniqueness constraints
US5805615A (en) 1996-08-29 1998-09-08 International Business Machines Corporation Method and apparatus for encoding certain double-error correcting and triple-error detecting codes
EP0858043A3 (en) 1997-02-05 2000-01-05 Cunav Innovations Limited Computerised modelling
US5848405A (en) 1997-04-21 1998-12-08 Oracle Corporation Method and apparatus for identifying new data by address ranges

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220171781A1 (en) * 2004-06-18 2022-06-02 Google Llc System And Method For Analyzing Data Records

Also Published As

Publication number Publication date
US6453314B1 (en) 2002-09-17

Similar Documents

Publication Publication Date Title
US6453314B1 (en) System and method for selective incremental deferred constraint processing after bulk loading data
US5706494A (en) System and method for constraint checking bulk data in a database
US5873075A (en) Synchronization of SQL actions in a relational database system
US5367675A (en) Computer automated system and method for optimizing the processing of a query in a relational database system by merging subqueries with the query
US6618719B1 (en) Database system with methodology for reusing cost-based optimization decisions
US5950210A (en) Database row version differentiation process
US5546576A (en) Query optimizer system that detects and prevents mutating table violations of database integrity in a query before execution plan generation
AU772754B2 (en) System and method for rewriting relational database queries
US6374263B1 (en) System for maintaining precomputed views
Grefen et al. Integrity control in relational database systems—an overview
US7031956B1 (en) System and method for synchronizing and/or updating an existing relational database with supplemental XML data
US6278994B1 (en) Fully integrated architecture for user-defined search
US6529896B1 (en) Method of optimizing a query having an existi subquery and a not-exists subquery
US5963933A (en) Efficient implementation of full outer join and anti-join
US7275056B2 (en) System and method for transforming queries using window aggregation
US7174327B2 (en) Generating one or more XML documents from a relational database using XPath data model
US5511186A (en) System and methods for performing multi-source searches over heterogeneous databases
US5761654A (en) Memory structure and method for tuning a database statement using a join-tree data structure representation, including selectivity factors, of a master table and detail table
US6098075A (en) Deferred referential integrity checking based on determining whether row at-a-time referential integrity checking would yield the same results as deferred integrity checking
US20050165866A1 (en) Method and apparatus for updating XML views of relational data
JPH0760407B2 (en) How the database system works
US20080016122A1 (en) Techniques of XML query optimization over static heterogeneous XML containers
Snodgrass et al. Adding valid time to SQL/temporal
Lanzelotte et al. Optimization of nonrecursive queries in OODBs
Bair et al. Notions of upward compatibility of temporal query languages

Legal Events

Date Code Title Description
EEER Examination request
FZDE Discontinued