Query generation based on a logical data model

US11176199B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-11176199-B2
Application numberUS-201916373028-A
CountryUS
Kind codeB2
Filing dateApr 2, 2019
Priority dateApr 2, 2018
Publication dateNov 16, 2021
Grant dateNov 16, 2021

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

Systems and methods for query generation based on a logical data model are described. For example, methods may include accessing a first join graph representing tables in a database; receiving a first query that references data in two or more of the tables of the database; selecting a connected subgraph of the first join graph that includes the two or more tables referenced in the first query; generating multiple leaf queries that reference respective subject tables that are each a root table of the connected subgraph or a table including a measure referenced in the first query; generating a query graph that specifies joining of results from queries based on the multiple leaf queries to obtain a transformed query result; and invoking a transformed query on the database that is based on the query graph and the queries based on the multiple leaf queries to obtain the transformed query result.

First claim

Opening claim text (preview).

What is claimed is: 1. A method comprising: accessing a first join graph representing tables in a database, wherein the first join graph has vertices corresponding to respective tables in the database and directed edges corresponding to many-to-one join relationships; receiving a first query that references data in two or more of the tables of the database; selecting a connected subgraph of the first join graph that includes the two or more tables referenced in the first query; generating multiple leaf queries that reference respective subject tables that are each a root table of the connected subgraph or a table including a measure referenced in the first query, wherein generating at least two of the leaf queries includes inserting a reference to a primary key column for a shared attribution dimension table of the respective subject tables of the at least two of the leaf queries; generating a query graph that specifies joining of results from queries based on the multiple leaf queries to obtain a transformed query result for the first query, wherein the query graph has a single root node corresponding to the transformed query result; invoking a transformed query on the database that is based on the query graph and the queries based on the multiple leaf queries to obtain the transformed query result; and presenting data based on the transformed query result. 2. The method of claim 1 , comprising: splitting one of the multiple leaf queries into leaf queries that are perfectly joinable with a respective leaf query of the multiple leaf queries, wherein the queries based on the multiple leaf queries include the leaf queries resulting from the split. 3. The method of claim 1 , wherein one of the multiple leaf queries includes a reference to an attribute in a dimension table that is referenced in the first query. 4. The method of claim 1 , wherein selecting the connected subgraph includes: selecting an initial connected subgraph of the first join graph that includes the two or more tables referenced in the first query; and selecting one or more additional attribution dimension tables for inclusion in the connected subgraph, wherein a first root table of the initial connected subgraph is directly connected to a non-shared dimension table that is referenced in the first query, and the one or more additional attribution dimension tables are shared between a second root table of the initial connected subgraph and the first root table. 5. The method of claim 1 , wherein selecting the connected subgraph includes: biasing table selection to select paths that include tables referenced in the first query. 6. The method of claim 1 , wherein selecting the connected subgraph includes: biasing table selection to select paths that include root tables of the first join graph. 7. The method of claim 1 , comprising: decomposing a formula of the first query into component formulas; pushing down the component formulas to one or more of the multiple leaf queries that reference a column referenced by at least one of the component formulas; and composing a transformed formula in the single root node of the query graph based on results for the component formulas. 8. The method of claim 7 , wherein the formula is a non-composable formula. 9. The method of claim 7 , wherein the formula has multiple expression roots. 10. The method of claim 7 , wherein the formula includes an aggregation on a measure from a dimension table. 11. A system, comprising: a network interface, a processor, and a memory, wherein the memory stores instructions executable by the processor to: access a first join graph representing tables in a database, wherein the first join graph has vertices corresponding to respective tables in the database and directed edges corresponding to many-to-one join relationships; receive a first query that references data in two or more of the tables of the database; select a connected subgraph of the first join graph that includes the two or more tables referenced in the first query; generate multiple leaf queries that reference respective subject tables that are each a root table of the connected subgraph or a table including a measure referenced in the first query, wherein generating at least two of the leaf queries includes inserting a reference to a primary key column for a shared attribution dimension table of the respective subject tables of the at least two of the leaf queries; generate a query graph that specifies joining of results from queries based on the multiple leaf queries to obtain a transformed query result for the first query, wherein the query graph has a single root node corresponding to the transformed query result; and invoke a transformed query on the database that is based on the query graph and the queries based on the multiple leaf queries to obtain the transformed query result. 12. The system of claim 11 , wherein the memory stores instructions executable by the processor to: split one of the multiple leaf queries into leaf queries that are perfectly joinable with a respective leaf query of the multiple leaf queries, wherein the queries based on the multiple leaf queries include the leaf queries resulting from the split. 13. The system of claim 11 , wherein one of the multiple leaf queries includes a reference to an attribute in a dimension table that is referenced in the first query. 14. The system of claim 11 , wherein the memory stores instructions executable by the processor to select the connected subgraph by performing operations including: selecting an initial connected subgraph of the first join graph that includes the two or more tables referenced in the first query; and selecting one or more additional attribution dimension tables for inclusion in the connected subgraph, wherein a first root table of the initial connected subgraph is directly connected to a non-shared dimension table that is referenced in the first query, and the one or more additional attribution dimension tables are shared between a second root table of the initial connected subgraph and the first root table. 15. The system of claim 11 , wherein the memory stores instructions executable by the processor to select the connected subgraph by performing operations including: biasing table selection to select paths that include tables referenced in the first query. 16. The system of claim 11 , wherein the memory stores instructions executable by the processor to select the connected subgraph by performing operations including: biasing table selection to select paths that include root tables of the first join graph. 17. The system of claim 11 , wherein the memory stores instructions executable by the processor to: decompose a formula of the first query into component formulas; push down the component formulas to one or more of the multiple leaf queries that reference a column referenced by at least one of the component formulas; and compose a transformed formula in the single root node of the query graph based on results for the component formulas. 18. The system of claim 17 , wherein the formula is a non-composable formula. 19. The system of claim 17 , wherein the formula has multiple expression roots. 20. A non-transitory computer-readable storage medium that includes instructions that, when executed by a processor, facilitate performance of operations comprising: accessing a first join graph representing tables in a database, wherein the first join graph has vertices corresponding to respectiv

Assignees

Inventors

Classifications

  • Join order optimisation · CPC title

  • Join operations · CPC title

  • Graphs; Linked lists (G06F16/9027 takes precedence) · CPC title

  • Tablespace storage structures; Management thereof · CPC title

  • Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US11176199B2 cover?
Systems and methods for query generation based on a logical data model are described. For example, methods may include accessing a first join graph representing tables in a database; receiving a first query that references data in two or more of the tables of the database; selecting a connected subgraph of the first join graph that includes the two or more tables referenced in the first query; …
Who is the assignee on this patent?
Thoughtspot Inc
What technology area does this patent fall under?
Primary CPC classification G06F16/24544. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Nov 16 2021 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 4 related publications on this page (citations in our corpus or others sharing the same primary CPC).