P
US7797304B2ExpiredUtilityPatentIndex 88

Extensible query language with support for rich data types

Assignee: MICROSOFT CORPPriority: Mar 20, 2006Filed: Aug 21, 2006Granted: Sep 14, 2010
Est. expiryMar 20, 2026(expired)· nominal 20-yr term from priority
Inventors:MURALIDHAR SUBRAMANIANSTARCK STEPHEN FREDERICKHOUSE SEAN BCAVANAGH SIMONVALBUENA FABIO MEIRELES FNAGARAJAN RAMESH
G06F 16/84G06F 16/40
88
PatentIndex Score
26
Cited by
16
References
21
Claims

Abstract

A query language has support for rich data types. A query language system contains an application configured to generate queries according to the query language. In addition, the system has a platform for handling queries that are generated using the provided query language. The platform contains an object services layer, a map provider layer, and a bridge layer which may ultimately interface with a variety of commercially available databases.

Claims

exact text as granted — not AI-modified
1. A system for processing an application request for data, comprising:
 a processor; 
 an object services layer for accepting a request, wherein the request comprises a collection expression comprising at least table subqueries and expressions in a from clause of a database query expressed in any one of a plurality of application data models and captures data semantics independent of the data stores and deployment tiers for an entity data model comprising a collection of database and non-database data types; 
 an object services layer for generalizing queries for collections of database and non-database types using extensions driven from metadata associated with each data type in the collection to create uniform expressions for each data type in the collection; 
 a map provider layer that supplies a plurality of mapping transforms for transforming the request into a canonical expression tree representative of a database query and mapping all data from the entity data model, wherein the mapped entity data model comprises an expression for each entity within the collection of database and non-database data types; and 
 a bridge layer for converting the canonical expression tree into a modified expression tree and performing data-model compensation, said modified expression tree being adapted to at least one requirement of a first database or a data store; 
 wherein said bridge layer is configured to convert the expression tree into any of a plurality of data model capabilities adapted to requirements of any of a plurality of databases and is configured to return a result to said bridge layer. 
 
   
   
     2. The system of  claim 1 , wherein the request further comprises a set operation selected from the group comprising union, intersect, and except, wherein said set operation operates on collections. 
   
   
     3. The system of  claim 1 , wherein the request further comprises a join operation that operates on collections. 
   
   
     4. A processor-implemented method for processing an application request for data, the method comprising:
 accepting a request via an object services layer implemented on the processor, wherein the request comprises a set operation selected from the group comprising union, intersect, and except, wherein said set operation operates on collections comprising at least table subqueries and expressions in a from clause of a database query for database and non-database data types to create uniform expressions for each data type in the collection; 
 generalizing queries for collections of database and non-database types using extensions driven from metadata associated with each data type in the collection to create uniform expressions for each data type in the collection; 
 supplying, via a map provider layer, a plurality of mapping transforms for transforming the request into a canonical expression tree representative of a database query and mapping all data from an entity data model, wherein the mapped entity data model comprises an expression for each entity within the collection of database and non-database data types; and 
 converting, via a bridge layer, the canonical expression tree into a modified expression tree and performing data-model compensation, said modified expression tree being adapted to at least one requirement of a first database and any of plurality of data stores; 
 wherein said bridge layer is configured to convert the expression tree into any of a plurality of data model capabilities adapted to requirements of any of a plurality of databases or storage providers and is configured to return a result to said bridge layer. 
 
   
   
     5. The method of  claim 4 , wherein the request further comprises a join operation that operates on collections. 
   
   
     6. A computer-readable storage medium comprising computer-executable instructions for processing an application request for data, the computer-executable instructions, when executed by the processor, performing acts of:
 accepting a request for a join operation that operates on collections comprising at least table subqueries and expressions in a from clause of a database query expressed in any one of a plurality of application data models and captures data semantics independent of the data stores and deployment tiers for an entity data model comprising a collection of database and non-database data types; 
 generalizing queries for collections of database and non-database types using extensions driven from metadata associated with each data type in the collection to create uniform expressions for each data type in the collection; 
 supplying a plurality of mapping transforms for transforming the request into a canonical expression tree representative of a database query and mapping all data from an entity data model, wherein the mapped entity data model comprises an expression for each entity within the collection of database and non-database data types; and 
 converting, via a bridge layer, the canonical expression tree into a modified expression tree and performing data-model compensation, said modified expression tree being adapted to at least one requirement of a first database or any of a plurality of data stores; 
 wherein said bridge layer is configured to convert the expression tree into any of a plurality of data model capabilities adapted to requirements of any of a plurality of databases and is configured to return a result to said bridge layer. 
 
   
   
     7. A processor comprising an application configured to request data from a database, wherein said application generates a request according to a query language, said query language comprising at least the following characteristics:
 said query language permits use of a collection expression comprising at least table subqueries and expressions in a from clause of a database query expressed in any one of a plurality of application data models and captures data semantics independent of the data stores and deployment tiers for an entity data model comprising a collection of database and non-database data types; 
 said query language permits use of an object services layer for generalizing queries for collections of database and non-database types using extensions driven from metadata associated with each data type in the collection to create uniform expressions for each data type in the collection; 
 said query language initiates a map provider layer that supplies a plurality of mapping transforms for transforming the collection expression into a canonical expression tree representative of a database query; 
 said query language permits use of a set operation selected from the group comprising union, intersect, and except, wherein said set operation operates on collections by providing a syntactic operator to allow projection of an expression from a collection comprising at least table subqueries and expressions in a from clause of a database query for database and non-database data types and creating uniform expressions for each data type in the collection; and 
 said query language permits use of a join operation that operates on collections and mapping all data from an entity data model, wherein the mapped entity data model comprises an expression for each entity within the collection comprising database and non-database data types. 
 
   
   
     8. The processor of  claim 7 , said query language further requiring every query to comprise at least one expression. 
   
   
     9. The processor of  claim 8 , wherein each expression has an uniform interpretation that does not depend on the context in which it is used. 
   
   
     10. The processor of  claim 7 , said query language further permitting use of the following expressions: 
     1+2*3 
     “abc” 
     row(1 as a, 2 as b) 
     {1, 3, 5} 
     e1 union all e2 
     distinct(e1). 
   
   
     11. The processor of  claim 7 , wherein said query language considers all subqueries to be multiset subqueries. 
   
   
     12. The processor of  claim 7 , wherein if a scalar value is desired from a subquery, said query language requires said application to provide an element operator that operates on a collection. 
   
   
     13. The processor of  claim 7 , said query language further permitting use of an element operator to extract a singleton value from a collection, and a select value clause to avoid creating a row-wrapper during a query expression. 
   
   
     14. The processor of  claim 7 , said query language further permitting use of a select value clause to skip an implicit row construction. 
   
   
     15. The processor of  claim 7 , said query language further permitting use of a row constructor to construct arbitrary rows such that a select value row (e1, e2, . . . ) statement is exactly equivalent to the statement select e1, e2, . . . . 
   
   
     16. The processor of  claim 7 , said query language further permitting use of a query expression that generalizes left-correlations in the from-clause and treats them uniformly. 
   
   
     17. The processor of  claim 7 , said query language requiring all column references to be qualified with a table alias. 
   
   
     18. The processor of  claim 7 , said query language further permitting use of a syntactic shortcut to handle navigation through a collection, wherein the shortcut uses the .. operator to allow projection of an expression from a collection, such that “a..b” is the equivalent of “select value t.b from a as t”. 
   
   
     19. The processor of  claim 7 , said query language further permitting use of aliasing of group-by keys, and left-correlations among such keys. 
   
   
     20. The processor of  claim 7 , said query language further permitting use of two kinds of aggregates, a collection-based aggregate that operates on collections, and produces an aggregated result, and a Structured Query Language (SQL) style aggregate, wherein said mechanism implicitly converts SQL style aggregates into collection-based aggregates. 
   
   
     21. The processor of  claim 7 , said query language further permitting use of an INSERT..VALUES statement, and said statement not allowing a column list to be specified in said INSERT..VALUES statement.

Cited by (0)

No later patents cite this yet.

References (0)

No backward citations on record.