Generating join queries using tensor representations
First Claim
1. A method of performing a join query in a relational database system by combining a first and a second relation each comprising a plurality of tuples formed over a plurality of attributes including a common attribute, comprising:
- storing said first and second relations in respective first and second relational tensors each having one or more orders, wherein an order of a relational tensor corresponds to an attribute of a relation represented by the relational tensor, and coordinates along an order of a relational tensor correspond to values of the corresponding attribute, and numeric values at coordinate locations within said relational tensor represent a count of tuples in said relation having the attribute values that correspond to the coordinate(s) of the numeric value along the order(s) of the relational tensor, and combining numeric values at matching coordinates in said first and second relational tensors to produce a result relational tensor having attributes found in said first and second relations.
1 Assignment
0 Petitions
Accused Products
Abstract
Query results and statistics regarding them are generated using a novel representation of an n-attribute relation as an order n relational tensor. Orders of the relational tensor respectively correspond to each of the attributes, and each coordinate along an order relates to a key value of the corresponding attribute. Numeric values are stored in the relational tensor, each numeric value representing a count of tuples having the attribute key values that correspond to the coordinate of the numeric value along the orders of the relational tensor. This storage representation is useful in a variety of contexts for enhancing the performance of a RDBMS system. Specifically, a data-representing relational tensor can be used to produce results for join operations such as the SQL operations JOIN, LEFT OUTER JOIN, RIGHT OUTER JOIN and FULL OUTER JOIN.
71 Citations
22 Claims
-
1. A method of performing a join query in a relational database system by combining a first and a second relation each comprising a plurality of tuples formed over a plurality of attributes including a common attribute, comprising:
-
storing said first and second relations in respective first and second relational tensors each having one or more orders, wherein an order of a relational tensor corresponds to an attribute of a relation represented by the relational tensor, and coordinates along an order of a relational tensor correspond to values of the corresponding attribute, and numeric values at coordinate locations within said relational tensor represent a count of tuples in said relation having the attribute values that correspond to the coordinate(s) of the numeric value along the order(s) of the relational tensor, and combining numeric values at matching coordinates in said first and second relational tensors to produce a result relational tensor having attributes found in said first and second relations. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18)
-
-
19. An apparatus for performing a join query in a relational database system, comprising:
-
a data storage device, wherein the data storage device stores a relational database, the relational database comprising two or more relations, each relation comprising one or more tuples on one or more attributes including a common attribute, the relational database including first and second relational tensors, wherein orders of said relational tensors correspond to individual attributes, and coordinates along an order of said relational tensors correspond to values of the corresponding attribute, and numeric values at coordinate locations within said relational tensors represent a count of tuples in a relation having the attribute values that correspond to the coordinates of the numeric value along the orders of the relational tensors, and a processor performing the join query by combining numeric values at matching coordinates in said first and second relational tensors to produce a result relational tensor having attributes found in said first and second relations.
-
-
20. A program product comprising:
-
a relational database comprising two or more relations, each relation comprising one or more tuples on one or more attributes including a common attribute, the relational database comprising two or more multi-order relational tensors, wherein orders of said relational tensors correspond to individual attributes, and coordinates along an order of said relational tensors correspond to values of the corresponding attribute, and numeric values at coordinate locations within said relational tensor represent a count of tuples in a relation having the attribute values that correspond to the coordinates of the numeric value along the orders of the relational tensor, relational database system adapted to retrieve data from said relational database, and perform a join query by combining numeric values at matching coordinates in said first and second relational tensors to produce a result relational tensor having attributes found in said first and second relations, and, signal bearing media bearing the relational tensor and the relational database system. - View Dependent Claims (21, 22)
-
Specification