摘要:
A method and apparatus for managing hierarchical relationships in a relational database system is provided. An “orderkey” data type, which is native within a relational database system, is disclosed. The orderkey type is designed to contain values that represent the position of an entity relative to the positions of other entities within a hierarchy. Such values represent hierarchical relationships between those entities. Values that are of the orderkey type have properties that allow hierarchy-oriented functions to be performed in an especially efficient manner. Database functions, which operate on and/or produce values that are of the orderkey type, are also disclosed. Such functions can be placed within SQL statements that a database server executes, for example. In response to executing SQL statements that contain such functions, the database server performs hierarchy-oriented operations in a highly efficient manner.
摘要:
A method and apparatus for processing path-based database operations is provided. According to one aspect, a path cache is maintained. For each hierarchical node that is traversed during a path-determining operation, it is determined whether a cache entry corresponding to that node is already contained in the path cache. If such a cache entry is already contained in the path cache, then the path indicated in that cache entry is used to complete the pathname for the node for which the operation is being performed. As a result, hierarchically higher nodes do not need to be traversed to complete the operation. Alternatively, if such a cache entry is not already contained in the path cache, then a cache entry for the node currently being traversed is generated and inserted into the path cache for use in subsequent path-determining operations.
摘要:
Mechanisms are described for providing auto-completion capability in a user interface that allows users to search for XML tags and data in a collection of XML documents. A user searching for data in XML documents might not be aware of the entire structure of the data. A path context may be specified for narrowing the search to a particular set of nodes within the documents in the collection. When the user is in the process of typing in an XML tag name, but prior to submitting the tag name to the search engine, the user interface presents an ordered list of completed XML tags that match the prefix typed by the user. The order of the tags in the list reflects the frequency of the completed tags found within the specified path context of the collection of documents. Likewise, when the user is in the process of typing a string of text to be searched for within the value of XML nodes in the set of documents, but prior to submitting the test string to the search engine, the user interface presents an ordered list of completed text strings that match the partially specified text, where the order of the completed text strings reflects their frequency within the specified path context in the collection of documents.
摘要:
Rules are collected for each structured element in a document. The rules that apply to any particular instance of an element depend on the hierarchical position of the instance within the document. The rules are collected and efficiently organized in a manner that accounts for this dependency. Once the rules are collected, the rules may be further processed. For example, there may be dependencies between calculations. The computation of the calculations is scheduled in a manner that accounts for these dependencies. Once the rules are collected and further processed, the rules are used to validate the given document.
摘要:
Highly relevant search results for unstructured queries are efficiently identified from normalized data. A server graphs relationships between each of the data objects. For each search term, the server identifies a candidate set of data objects mapped to the term. The server calculates priority scores for the candidate data objects based at least in part on one or more of: a link analysis of the graph; or an analysis of metadata describing structural constraints upon the candidate data objects. Based on the graph, the server identifies one or more search result subgraphs, each comprising at least one data object from each of the candidate sets. The server looks for subgraphs in an order that is based on the priority scores for the candidate data objects. The server may terminate its search early, in part because prioritizing the candidate data objects increases the likelihood of receiving relevant search results first.
摘要:
A technique for finding the nearest match in a computer storage system is provided. A query statement includes a new operator that indicates that a user desires to access a set of rows that contain a value nearest to a target value. An index is accessed that is based at least in part on a column reference included in the statement. The index comprises a plurality of leaf nodes, where each leaf node comprises one or more entries, where each entry contains a key value, corresponding to the column reference, and a reference to a row in a table. Because leaf nodes in an index are ordered and linked to one another, a portion of the index need only be scanned once. The set of rows from the table are returned that are referenced by one or more entries whose column values are nearest to the target value.
摘要:
A method and apparatus for managing relationships between resources stored in a repository is provided. A client sends, to a server, a request to store a first resource within a repository. In response to receiving the request, the server parses the first resource to retrieve relationship data that identifies a relationship between two or more resources to be stored, or currently stored, within the repository. The server stores, within a database accessible to the server, one or more relationship records that identify the relationship between the two or more resources. The one or more relationship records are stored separate from the two or more resources. Subsequently, the client may issue queries, to the server, about the one or more relationships records stored in the database. In this way, a user may access the one or more relationship records to analyze the relationship between resources stored in repository.
摘要:
An approach is provided to partition inter-linked documents into partitions of a database system. In some embodiments, a plurality of documents may be assigned to two or more partitions in the database system, thereby forming a number of inter-partition links between a first partition and a second partition. Here both the first partition and the second partition are in the two or more partitions. First documents may be assigned to the first partition while second documents are assigned to the second partition. Both the first documents and the second documents are in the plurality of documents. It is then determined whether moving one or more of the first documents in the first partition to the second partition reduces the number of inter-partition links between the first partition and the second partition. If that is the case, the one or more of the first documents are moved to the second partition.
摘要:
A declarative mechanism is used to manage large documents within a repository. The large documents are sectioned into subdocuments that are linked together by a parent document. The combination of the parent document and subdocument is referred to as a compound document. There are multiple options for configuring rules to break up a source document into a compound document and naming the subdocuments. The compound documents may be queried using statements that treat the compound document as a single XML document, or the parent document of a subdocument may be queried and treated independently. Access control and versioning can be applied at the finer granularity of the subdocument.
摘要:
Techniques are provided for using XML syntax in exchanging data in relational databases. According to certain embodiments of the invention, one or more portions of the relational database is visualized as an XML document. A standard Uniform Resource Locator (URL) mechanism is provided to access data stored in the relational database by defining the URL as an XPath expression over the visualized XML document.