摘要:
The system, method, and program of this invention avoids potential write/write conflicts and read/write conflicts when a subcomponent of a composite object (e.g., an ADT) is mutated. The embodiments of this invention define a copy semantic for the mutation function. In one embodiment, a copy function is inserted prior to any mutation function. In a another embodiment, a global compile-time analysis is performed to determine if a write/write or read/write conflict exists; and to eliminate redundant copy constructors if a conflict does exist. In a preferred embodiment, only a local analysis is performed during the parsing phase, thereby avoiding a global compile-time analysis. A mutation safe flag is associated with each parse tree node. A read target leaf parse tree node is set to false while non-leaf parse tree nodes (functions) derive their value from an incoming node, except that constructors and copy constructor functions are always true. Whether or not a copy is made of the composite object (i.e., whether or not a copy constructor is inserted) prior to a mutation is determined according to the setting of the mutation safe flags and according to the following. If a mutation safe flag for a mutation function is false, a copy constructor is inserted for the mutated composite object and the mutation safe flag is set to true. In addition, for update and trigger statements, the mutation safe flag for a mutated target is defaulted to true. Furthermore, related update entries are grouped together and a copy is generated for the common target. The generated copy is used as the common target for all of the mutations caused by the update entries grouped together in order to accumulate all of the desired mutations in a same copy of the composite object.
摘要:
A method, apparatus, and article of manufacture for a computer-implemented embedded storage mechanism for structured data types. A statement is stored in a database stored on a data storage device connected to a computer. At compile-time, specific methods for a structured data type are mapped to generic methods using parse trees. At run-time, an in-memory representation of the structured data type is generated using information conveyed in the parse trees. Then, linearization of the generated in-memory representation is performed.
摘要:
A method, apparatus, and article of manufacture for a computer implemented storage mechanism for persistent objects in a database management system. A statement is executed in a computer. The statement is performed by the computer to manipulate data in a database stored on a data storage device connected to the computer. It is determined that an object is to be stored in an inline buffer. When the object can be entirely stored in the inline buffer, the object is stored in the inline buffer. When the object cannot be entirely stored in the inline buffer, a selected portion of the object is stored in the inline buffer and the remaining portion of the object is stored as a large object.
摘要:
A new approach to indexing semi-structured, non-traditional data uses an external search engine accessible to a database engine through a standardized interface. An external index managed by an external search engine maps object identifiers associated with the non-traditional data to row identifiers for a table stored in the relational database. In response to a query, one or more of the object identifiers are retrieved from the external index by the external search engine. The object identifiers returned by the external search engine are then used by the database engine to retrieve one or more row identifiers from an index in the relational database. The row identifiers are then used to retrieve one or more rows from the table in the relational database.
摘要:
A method, apparatus, and article of manufacture for a computer-implemented integrated architecture for user-defined search. A statement is executed in a database stored on a data storage device connected to a computer, and the database contains data. Under control of the database, a statement is received that requests manipulation of the data. The statement includes a user-defined function. An index of a user-defined index type is used to access the data. The user-defined function is processed with the accessed data.
摘要:
A framework for a query compiler and run-time environment for resolving a table reference to a dynamic table that is first identified at run-time but is initially unknown at compile-time. A parser parses the table reference and creates a parsed representation for the table that identifies the type of dynamic table. A code generator creates executable plans containing run-time table object representations (TAOB), from the parsed representations, that contain the type of dynamic table. The TAOB is also extended to provide for parameters that are definable at run-time, including a table ID of the actual table entity being referenced. A routine is embedded in a run-time routine that checks the type of dynamic table in the TAOB and dispatches control to one of a plurality of corresponding routines, depending upon the type of dynamic table. The corresponding routines use the extended TAOB to dynamically link the table reference to the dynamic table, depending upon the type of dynamic table. Once the dynamic table has been linked to the table reference, query processing continues as if that table were a base or derived table.
摘要:
A method, apparatus, and article of manufacture for computer-implemented support of database indexes based on a generalized B-tree index. The index is stored in a B-tree on a data storage device connected to a computer. In particular, multiple key sources are processed using key transformation. Then, a plurality of key targets are generated based on the processed key sources.
摘要:
A method, apparatus, and article of manufacture for optimizing queries in a database management system, wherein the queries comprise content-based searches of data types that are supported through the use of appropriate indexing techniques not known or available to the database management system. The queries are automatically rewritten or optimized to take advantage of the indexing techniques.
摘要:
A method, apparatus, and article of manufacture for a computer implemented authorization system. A statement is to be executed by a computer to manipulate data in a database stored on a data storage device connected to the computer. Initially, an environment of the database from which the statement was invoked is identified. Additionally, a security option is identified. Then, authorization privileges for the statement are determined based on the identified environment and security option.
摘要:
This invention provides an integrated compiler for compiling SQL3 control statements having procedural, i.e., control, information packaged together with query, i.e., non-procedural, statements. A query extractor contained within the parser extracts the query statement from the control statement leaving a control skeleton. The query statement is processed as usual through a query compiler for generating executable plans with the exception that the name resolution function for resolving variables is modified for looking up local variables. This modification takes into account the mapping of local and host variables to create a unification of local and host variables. The control skeleton is processed through a control analyzer which generates a representation of the control flow and a scope and symbol table. The control analyzer also unifies the local and host variables. A plan synthesizer then takes as input the control flow information, symbol tables, and individual executable plans for the query statements and generates a meta-plan comprising a merger of a top level plan for the control skeleton and sub-plans representing the executable plans of the query statement. Therefore, this invention provides a uniform way of treating local and host variables, provides an efficient way of performing bind-in/bind-out processes, creates a single execution plan requiring only a single run-time interpreter, and requires minimum enhancements to existing SQL2 compilers. In addition, this invention enables the application of global optimization techniques for optimizing both the control aspects and query aspects of the original control statement.