Abstract:
Techniques related to binary encoding of hierarchical data objects to support efficient path navigation of the hierarchical data objects are disclosed. A hierarchical data object may include field names that are associated with field values. A method may involve generating a plurality of hash codes, each hash code corresponding to a respective field name. The method may involve generating a hash-code mapping that maps each hash code to a respective field-name identifier. The method may involve generating a field-name mapping that maps each field name to a respective field-name identifier. The method may involve generating a hierarchical tree of nodes that includes non-leaf nodes and leaf nodes. A particular non-leaf node may include a child node mapping that maps the particular non-leaf node to one or more child nodes and may include a field-name-identifier-to-child mapping that maps a respective field-name identifier to each of the one or more child nodes.
Abstract:
Hierarchical data objects are indexed using an index referred to herein as a hierarchy-value index. A hierarchy-value index has, as index keys, tokens (tag name, a word in node string value) that are extracted from hierarchical data objects. Each token is mapped to the locations that correspond to the data for the token in hierarchical data objects. A token can represent a non-leaf node, such as an XML element or a JSON field. A location can be a region covering and subsuming child nodes. For a token that represents a non-leaf node, a location to which the token is mapped contains the location of any token corresponding to a descendant node of the non-leaf node. Thus, token containment based on the locations of tokens within a hierarchical data object may be used to determine containment relationships between nodes in a hierarchical data object.
Abstract:
Techniques are described for materializing pre-computed results of expressions. In an embodiment, a set of one or more column units are stored in volatile or non-volatile memory. Each column unit corresponds to a column that belongs to an on-disk table within a database managed by a database server instance and includes data items from the corresponding column. A set of one or more virtual column units, and data that associates the set of one or more column units with the set of one or more virtual column units, are also stored in memory. The set of one or more virtual column units includes a particular virtual column unit storing results that are derived by evaluating an expression on at least one column of the on-disk table.
Abstract:
A method and apparatus queries a table in a database where the table includes at least one column declared to be sparse. A binary large object may be used to store the sparse column data. The object includes a column-id and column-value pair for each non-null value. To answer a query with a constraint on a sparse column, the object is searched for one or more column ids to obtain the column values. Rows whose column values match a constraint are returned. In another embodiment, an internal table is used. Each tuple in the internal table has a column id and a value array indexed by an ordinal row number. To answer a query with a constraint on a sparse column, the column value in the internal table is found and matched against the constraint. If the match is successful, the index of the column value in the internal table is returned.
Abstract:
A method, device, and non-transitory computer-readable storage medium are provided for efficiently registering a relational schema. In co-compilation and data guide approaches, a subset of entities from schema descriptions are selected for physical registration, and other entities from the schema descriptions are not physically registered. In the co-compilation approach, a first schema description references a second schema description, and the subset includes a set of entities from the second schema description that are used by the first schema description. In the data guide approach, the subset includes entities that are used by a set of structured documents. In a pay-as-you-go approach, schema registration includes logically registering entities without creating relational database structures corresponding to the entities. A database server may execute database commands that reference the logically registered entities. A request to store data for the entities may be executed by creating relational database structures to store the data.