摘要:
A computer system identifies a predicate in a computer language containing constant expressions as vacuous. The system identifies distinct variables contained in the predicate and represents the predicate by a set of bounding rectangles. The bounding rectangles are represented in a space having a number of dimensions equal to the number of variables. There are finite limits on dimensions of a bounding rectangle which represent the relationship between the variables in the predicate and the constant expressions in the predicate. The predicate is identified as vacuously FALSE where the set of bounding rectangles is empty.
摘要:
A method, apparatus, and article of manufacture for handling NULL values in SQL queries over object oriented data. A two-phase method is used to enable a query evaluator in a two-valued logic environment to properly handle occurrences of NULL values for predicates that involve subqueries, i.e., basic subquery predicates and/or quantified subquery predicates. For basic subquery predicates, negation reduction is performed by applying logical equivalence rules and inverting basic comparators (e.g., transforming =) to eliminate NOTs. Then, transformations are employed for the resulting positive predicates to include NULL value testing, i.e., NULL protection. For quantified subquery predicates, in addition to performing negation reduction, quantified subqueries are converted into existential subqueries. In most cases, this yields a predicate that can be handled using NULL protection transformations for positive predicates. The exception (i.e., a "NOT EXISTS" resulting from the conversion step of a universally quantified subquery) is handled using NULL protection transformations for negative predicates. The evaluation of the NULL tested positive and negative predicates ensures that if a predicate has a NULL value, it is not included in the query result.
摘要:
A method for publishing relational data as XML by translating XML queries into queries against an relational database. Conversion of the relational database into an XML database is not required. Each relational table is mapped to a virtual XML document, and XML queries are issued over these virtual documents. An XML query is parsed and transformed into a language-neutral intermediate representation, which is a sequence of operations describing how the output document is derived from the underlying relational tables. The intermediate representation is then translated into an SQL query over the underlying relational tables and into instructions for a tagger. The SQL query is executed, and the SQL query results are then fed into the tagger, which follows tagger instructions to generate the marked up output.
摘要:
A method, apparatus, and article of manufacture for a computer-implemented technique for query optimization with deferred updates and autonomous sources. An object-oriented query is executed to retrieve data from a database. The database is stored on a data storage device connected to a computer. The object-oriented query is transformed into subqueries, wherein at least one subquery is directed against a database, and wherein one subquery is directed against an object cache. Each subquery that is directed against a database is executed to retrieve data from the database into the object cache. The subquery that is directed against the object cache is executed to retrieve data for the query, wherein the data incorporates updates to the object cache and updates to the database.
摘要:
A method, apparatus, and article of manufacture for a computer-implemented technique for query optimization with deferred updates and autonomous sources. An object-oriented query is executed to retrieve data from a database. The database is stored on a data storage device connected to a computer. The object-oriented query is transformed into subqueries, wherein at least one subquery is directed against a database, and wherein one subquery is directed against an object cache. Each subquery that is directed against a database is executed to retrieve data from the database into the object cache. The subquery that is directed against the object cache is executed to retrieve data for the query, wherein the data incorporates updates to the object cache and updates to the database.
摘要:
A method, apparatus, and article of manufacture for a computer-implemented technique for query optimization using a multi-layered object cache. An object-oriented query is executed to retrieve data from a database. The database is stored on a data storage device connected to a computer and queries are run against lower cache layers which have better performance characteristics than the external or upper layers. The multi-layered cache has an application objects (AOs) cache and a data access objects (DAOs) cache, and the application objects include methods deriving data from DAOs. The method includes a step of rewriting the query into a query directed against the DAOs cache, applying a pushdown transformation algorithm to the rewritten query directed against the DAOs cache, and executing the transformed query against the DAOs cache. The method also allows optimizing queries with path expressions by transforming path expression into joins. Another performance optimization includes using a limited data set only including the inserted and updated data, which allows the method to evaluate queries against a subset of a collection of cached objects instead of an entire collection of cached objects.
摘要:
A STOP AFTER clause for a relational database management system (RDBMS) structured query language (SQL) causes the RDBMS, in response to a query, to return a query result having at most a predetermined cardinality specified in the query. A query with a STOP AFTER clause is processed by the RDBMS by provision of one or more STOP operators that are inserted into a query execution plan generated by the RDBMS to execute the query. In a conservative policy, STOP operators are inserted in the query execution plan such that no tuples that might be required in the query result are discarded. In contrast, an aggressive policy inserts a STOP operator in the query execution plan wherever it is able to provide a beneficial cardinality reduction. A RESTART operator is inserted into aggressive policy query execution plans to ensure that at least the predetermined number of tuples are returned in the query result, and a final STOP operator is added at or near the root of the plan to ensure that at most the specified number of tuples are produced.
摘要:
A method of, and system for, interactively accessing information in response to a user command having a predefined operator and specifying one of a plurality of collections of information. The collections of information are stored in an object-oriented database in a hierarchical arrangement of data members. The hierarchical arrangement can include one level of data members and in which one of the data members is composed of a next level of data members. Each data member is stored according to one of a system-specified and a user-specified storage definition. A set of user-specified storage definitions is defined from the plurality of storage definitions. Upon detecting the user command, the specified collection of information is analyzed to determine which data members of the one level are stored according to one of the storage definitions of the set. Each data member not in the set is added to a projection list; each data member in the set is expanded into a next level of data members composing the data member in the set. Expanding can include analyzing each data member of the next level to determine whether it is in the set and if so again expanding up until a specified level of expanding. The projection list is processed to return to the user the information corresponding to the data members in the projection list. The invention may be implemented in a Parser layer of a known layered architecture for database systems.