Method and apparatus for optimizing queries over vertically stored database
First Claim
1. A method for optimizing queries over a vertically stored database having items that are partitioned into several partitions each having a partition signature representing items therein, the method comprising:
- decomposing a first query received from a user into multiple first subqueries;
generating a signature for each first subquery in a way corresponding to a way of generating the partition signature;
comparing the signature of the each first subquery with the partition signatures of all partitions, in order to obtain all partitions matching the first subquery;
rewriting a second subquery translated from the first subquery based on the matching partitions, in order to obtain the rewritten second subquery; and
composing rewritten second subqueries for all the first subqueries to form a second query so that queries are executed over the database using the second query;
wherein the database is an resource description framework (RDF) store in which each item contains RDF triples, the RDF store contains a subject column whose value represents RDF triple subjects, a property column whose value represents RDF triple properties, and an object column whose value represents RDF triple objects, and the RDF store further contains a unique identifier column whose value represents partitions where corresponding RDF triples are located.
1 Assignment
0 Petitions
Accused Products
Abstract
A method and device for optimizing queries over a vertically stored database. Items in the database are partitioned into several partitions each having a partition signature. The method includes decomposing a first query received from a user into multiple first subqueries; generating a signature for each first subquery in a way corresponding to the way of generating the partition signature; comparing the signature of each first subquery with partition signatures of all partitions respectively to obtain all partitions matching the first subquery; rewriting a second subquery translated from the first subquery based on the matching partitions to obtain a rewritten second subquery; and composing rewritten second subqueries for all first subqueries to form a second query so that queries are executed over the database using the second query.
84 Citations
13 Claims
-
1. A method for optimizing queries over a vertically stored database having items that are partitioned into several partitions each having a partition signature representing items therein, the method comprising:
-
decomposing a first query received from a user into multiple first subqueries; generating a signature for each first subquery in a way corresponding to a way of generating the partition signature; comparing the signature of the each first subquery with the partition signatures of all partitions, in order to obtain all partitions matching the first subquery; rewriting a second subquery translated from the first subquery based on the matching partitions, in order to obtain the rewritten second subquery; and composing rewritten second subqueries for all the first subqueries to form a second query so that queries are executed over the database using the second query; wherein the database is an resource description framework (RDF) store in which each item contains RDF triples, the RDF store contains a subject column whose value represents RDF triple subjects, a property column whose value represents RDF triple properties, and an object column whose value represents RDF triple objects, and the RDF store further contains a unique identifier column whose value represents partitions where corresponding RDF triples are located. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
-
-
13. A device for optimizing queries over a vertically stored database, wherein items in the database are partitioned into several partitions each having a partition signature representing items in it, the device comprising:
-
decomposing means for decomposing a first query received from a user into multiple first subqueries; query signature generating means for generating a signature for each first subquery in a way corresponding to a way of generating the partition signature; partition obtaining means for comparing the signature of the each first subquery with the partition signatures of all partitions, in order to obtain all partitions matching the first subquery; query rewriting means for rewriting a second subquery translated from the first subquery based on the matching partitions, in order to obtain the rewritten second subquery; and query composing means for composing rewritten second subqueries for all the first subqueries to form a second query, whereby queries are executed over the database using the second query; wherein the database is an resource description framework (RDF) store in which each item contains RDF triples, the RDF store contains a subject column whose value represents RDF triple subjects, a property column whose value represents RDF triple properties, and an object column whose value represents RDF triple objects, and the RDF store further contains a unique identifier column whose value represents partitions where corresponding RDF triples are located.
-
Specification