Systems and methods for transforming query results into hierarchical information
First Claim
1. A method for data processing by generating a hierarchical data stream, comprising:
- receiving a query including at least one valid database statement used to retrieve at least one rowset from a database;
processing the query to retrieve said at least one rowset from the database; and
transforming a rowset of said at least one rowset into a datatype instance of the hierarchical language of said hierarchical data stream by mapping at least one row element of the rowset into at least one node of the hierarchical data stream;
wherein said receiving includes receiving a query including at least one valid database statement used to retrieve at least one rowset from a database and at least one of a name option parameter, a root option parameter, a map option parameter, at least one namespace option parameter and a null option parameter;
wherein said receiving includes receiving a query including at least one valid database statement used to retrieve at least one rowset from a database and a name option parameter, whereby said transforming includes overwriting a name of a row element; and
wherein if said name option parameter is specified to be a predetermined value, then said transforming includes dropping a tag of the row element and any contained attributes.
2 Assignments
0 Petitions
Accused Products
Abstract
A computerized system and method for transforming (formatting or aggregating) the results of a query into a hierarchical information stream, such as an extensible Markup Language (XML) data stream is disclosed. A database server receives a query and generates a rowset. A rowset processor, using the mode specified in the query, processes the rowset and query to generate the XML data stream. For the “auto1” mode, the rowset processor transforms a rowset into an XML data stream using primary-foreign key information specified in the query to determine nesting. For the “auto2” mode, the rowset processor transforms a rowset into an XML data stream using table ordering information included in the query to determine nesting. For the “explicit” mode, the rowset processor transforms a rowset into an XML data stream using the explicit organizational information specified in the query. In one embodiment, it is easier for a developer to compose expressions to generate nested hierarchical structures than previous formulations and simpler semantics are provided without implicit hierarchy inference. The syntax of an embodiment of the hierarchical formatting function includes optional arguments including a name option, a root option, map option, namespace options and a null option.
50 Citations
6 Claims
-
1. A method for data processing by generating a hierarchical data stream, comprising:
-
receiving a query including at least one valid database statement used to retrieve at least one rowset from a database; processing the query to retrieve said at least one rowset from the database; and transforming a rowset of said at least one rowset into a datatype instance of the hierarchical language of said hierarchical data stream by mapping at least one row element of the rowset into at least one node of the hierarchical data stream; wherein said receiving includes receiving a query including at least one valid database statement used to retrieve at least one rowset from a database and at least one of a name option parameter, a root option parameter, a map option parameter, at least one namespace option parameter and a null option parameter; wherein said receiving includes receiving a query including at least one valid database statement used to retrieve at least one rowset from a database and a name option parameter, whereby said transforming includes overwriting a name of a row element; and wherein if said name option parameter is specified to be a predetermined value, then said transforming includes dropping a tag of the row element and any contained attributes.
-
-
2. A method for data processing by generating a hierarchical data stream, comprising:
-
receiving a query including at least one valid database statement used to retrieve at least one rowset from a database; processing the query to retrieve said at least one rowset from the database; and transforming a rowset of said at least one rowset into a datatype instance of the hierarchical language of said hierarchical data stream by mapping at least one row element of the rowset into at least one node of the hierarchical data stream; wherein said receiving includes receiving a query including at least one valid database statement used to retrieve at least one rowset from a database and at least one of a name option parameter, a root option parameter, a map option parameter, at least one namespace option parameter and a null option parameter; wherein said receiving includes receiving a query including at least one valid database statement used to retrieve at least one rowset from a database and a map option parameter, whereby said transforming includes overwriting the row element mapping with a mapping that interprets names as paths; and wherein said transforming includes overwriting the row element mapping with a mapping that interprets names as paths and said mapping includes mapping columns in the order in which the columns appear in the rowset to attributes or subelements by interpreting the column names as a path.
-
-
3. A method for data processing by generating a hierarchical data stream, comprising:
-
receiving a query including at least one valid database statement used to retrieve at least one rowset from a database; processing the query to retrieve said at least one rowset from the database; and transforming a rowset of said at least one rowset into a datatype instance of the hierarchical language of said hierarchical data stream by mapping at least one row element of the rowset into at least one node of the hierarchical data stream; wherein said receiving includes receiving a query including at least one valid database statement used to retrieve at least one rowset from a database and at least one of a name option parameter, a root option parameter, a map option parameter, at least one namespace option parameter and a null option parameter; wherein said receiving includes receiving a query including at least one valid database statement used to retrieve at least one rowset from a database and at least one namespace option parameter and said transforming includes associating a namespace to at least a portion of said hierarchical data stream; and wherein said associating includes associating the namespace to the outermost node of the hierarchical data stream generated according to said transforming.
-
-
4. A method for data processing by generating a hierarchical data stream, comprising:
-
receiving a query including at least one valid database statement used to retrieve at least one rowset from a database; processing the query to retrieve said at least one rowset from the database; and transforming a rowset of said at least one rowset into a datatype instance of the hierarchical language of said hierarchical data stream by mapping at least one row element of the rowset into at least one node of the hierarchical data stream; wherein said receiving includes receiving a query including at least one valid database statement used to retrieve at least one rowset from a database and at least one of a name option parameter, a root option parameter, a map option parameter, at least one namespace option parameter and a null option parameter; wherein said receiving includes receiving a query including at least one valid database statement used to retrieve at least one rowset from a database and at least one namespace option parameter and said transforming includes associating a namespace to at least a portion of said hierarchical data stream; and wherein said associating includes associating the namespace to at least one top-level node of the hierarchical data stream generated according to said transforming, wherein if there is a plurality of top-level nodes, the namespace is added to each of the plurality of top-level nodes.
-
-
5. A method for data processing by generating a hierarchical data stream, comprising:
-
receiving a query including at least one valid database statement used to retrieve at least one rowset from a database; processing the query to retrieve said at least one rowset from the database; and transforming a rowset of said at least one rowset into a datatype instance of the hierarchical language of said hierarchical data stream by mapping at least one row element of the rowset into at least one node of the hierarchical data stream; wherein said receiving includes receiving a query including at least one valid database statement used to retrieve at least one rowset from a database and at least one of a name option parameter, a root option parameter, a map option parameter, at least one namespace option parameter and a null option parameter; wherein said receiving includes receiving a query including at least one valid database statement used to retrieve at least one rowset from a database and at least one namespace option parameter and said transforming includes associating a namespace to at least a portion of said hierarchical data stream; and wherein said receiving includes receiving a query including a first valid database statement used to retrieve at least one rowset from the database nested within a second valid database statement used to retrieve at least one rowset from the database, whereby said first valid database statement inherits all namespace option parameters associated with said second valid database statement and optionally, said first valid database statement is allowed to overwrite the namespace option parameters of said second valid database statement.
-
-
6. A method for data processing by generating a hierarchical data stream, comprising:
-
receiving a query including at least one valid database statement used to retrieve at least one rowset from a database; processing the query to retrieve said at least one rowset from the database; and transforming a rowset of said at least one rowset into a datatype instance of the hierarchical language of said hierarchical data stream by mapping at least one row element of the rowset into at least one node of the hierarchical data stream; wherein said receiving includes receiving a query including at least one valid database statement used to retrieve at least one rowset from a database and at least one of a name option parameter, a root option parameter, a map option parameter, at least one namespace option parameter and a null option parameter; wherein said receiving includes receiving a query including at least one valid database statement used to retrieve at least one rowset from a database and a null option parameter, whereby said transforming includes overwriting a default mapping of a NULL value during said transforming; and whereby an “
absent”
value of said null option parameter specifies default behavior whereby a null value results in the absence of a row element'"'"'s containing attribute or subelement, whereby an “
xsinil”
value of said null option parameter adds a namespace declaration for a schema instance namespace and whereby an “
empty”
value of said null option parameter represents a null value with an empty string as the value of the attribute or subelement of a row element.
-
Specification