SQL enhancements simplifying database querying
First Claim
1. A computer-implemented method comprising:
- providing in a database layer, a database engine and a database comprising data organized according to a relational model;
providing in an application layer, an entity relationship data model and a query engine in communication with the database engine;
causing the database engine to receive from via the query engine a query in a database language that has been extended to include an entity type and an association, the query further comprising a path expression including a filter element suffix followed by nested projection clauses specifying a relationship between a specified entity and an associated entity;
causing the database engine to return to the query engine a query result set comprising data of the associated entity matching the nested projection clauses of the path expression,wherein if the path expression includes an optional flattening symbol, the query result set comprises the data in a result set type structure that is flattened, andwherein if the path expression omits the optional flattening symbol, the query result set comprises the data in the result set type structure that corresponds to the nested projection clauses; and
causing the database engine to store the data in the database according to the result set type structure.
2 Assignments
0 Petitions
Accused Products
Abstract
Disclosed are techniques employed alone or in combination, to further enhance a database language and improve conciseness and comprehensiveness of query statements in application code. Embodiments may build upon an initial extension of database language to accommodate concepts of entity-relationship models (ERMs). That initial extension may include entities with structured types, and named associations. One technique modifies SQL to allow the SELECT command to specify element path expressions based upon a relationship (e.g. named associations between ERM elements). Another technique modifies SQL to introduce filter expressions suffixed to associations within path expressions, thus improving adherence to the principle of locality within query statements. Yet another technique allows a shorthand to “factor out” association path prefixes, thereby avoiding lengthy lists of path expressions in order to read several elements from the same nested structure or a same target entity behind a single association. Other techniques simplifying database querying are also disclosed.
-
Citations
15 Claims
-
1. A computer-implemented method comprising:
-
providing in a database layer, a database engine and a database comprising data organized according to a relational model; providing in an application layer, an entity relationship data model and a query engine in communication with the database engine; causing the database engine to receive from via the query engine a query in a database language that has been extended to include an entity type and an association, the query further comprising a path expression including a filter element suffix followed by nested projection clauses specifying a relationship between a specified entity and an associated entity; causing the database engine to return to the query engine a query result set comprising data of the associated entity matching the nested projection clauses of the path expression, wherein if the path expression includes an optional flattening symbol, the query result set comprises the data in a result set type structure that is flattened, and wherein if the path expression omits the optional flattening symbol, the query result set comprises the data in the result set type structure that corresponds to the nested projection clauses; and causing the database engine to store the data in the database according to the result set type structure. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A non-transitory computer readable storage medium embodying a computer program for performing a method, said method comprising:
-
providing in a database layer, a database engine and a database comprising data organized according to a relational model; providing in an application layer, an entity relationship data model and a query engine in communication with the database engine; causing the database engine to receive via the query engine a query in a database language that has been extended to include an entity type and an association, the query further comprising a path expression including a filter element suffix followed by nested projection clauses specifying a relationship between a specified entity and an associated entity; causing the database engine to return to the query engine a query result set comprising data of the associated entity matching the nested projection clauses of the path expression, wherein if the path expression includes an optional flattening symbol, the query result set comprises the data in a result set type structure that is flattened, and wherein if the path expression omits the optional flattening symbol, the query result set comprises the data in the result set type structure that corresponds to the nested projection clauses; and causing the database engine to store the data in the database according to the result set type structure. - View Dependent Claims (7, 8, 9, 10)
-
-
11. A computer system comprising:
-
one or more processors; a software program stored on a non-transitory computer readable storage medium and configured to cause the one or more processors to; provide in a database layer, a database engine and a database comprising data organized according to a relational model; provide in an application layer, an entity relationship data model and a query engine in communication with the database engine; cause the database engine to receive via the query engine a query in a database language that has been extended to include an entity type and an association, the query further comprising a path expression including a filter element suffix followed by nested projection clauses specifying a relationship between a specified entity and an associated entity; cause the database engine to return to the query engine a query result set comprising data of the associated entity matching the nested projection clauses of the path expression, wherein if the path expression includes an optional flattening symbol, the query result set comprises the data in a result set type structure that is flattened, and wherein if the path expression omits the optional flattening symbol, the query result set comprises the data in the result set type structure that corresponds to the nested projection clauses; and cause the database engine to store the data in the database according to the result set type structure. - View Dependent Claims (12, 13, 14, 15)
-
Specification