US20180150526A1 - Generic query language for data stores - Google Patents

Generic query language for data stores Download PDF

Info

Publication number
US20180150526A1
US20180150526A1 US15/365,613 US201615365613A US2018150526A1 US 20180150526 A1 US20180150526 A1 US 20180150526A1 US 201615365613 A US201615365613 A US 201615365613A US 2018150526 A1 US2018150526 A1 US 2018150526A1
Authority
US
United States
Prior art keywords
operand
query
data store
associated data
operands
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
US15/365,613
Other versions
US10776352B2 (en
Inventor
Roman Nersisyan
Yung-Ching Tseng
Sandeep Gangadharan
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hewlett Packard Enterprise Development LP
Original Assignee
Hewlett Packard Enterprise Development LP
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hewlett Packard Enterprise Development LP filed Critical Hewlett Packard Enterprise Development LP
Priority to US15/365,613 priority Critical patent/US10776352B2/en
Assigned to HEWLETT PACKARD ENTERPRISE DEVELOPMENT LP reassignment HEWLETT PACKARD ENTERPRISE DEVELOPMENT LP ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: NERSISYAN, ROMAN, TSENG, YUNG-CHING, GANGADHARAN, SANDEEP
Publication of US20180150526A1 publication Critical patent/US20180150526A1/en
Application granted granted Critical
Publication of US10776352B2 publication Critical patent/US10776352B2/en
Active legal-status Critical Current
Adjusted expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • G06F16/244Grouping and aggregation
    • G06F17/30554
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2452Query translation
    • G06F17/30407
    • G06F17/30477
    • G06F17/30589

Definitions

  • NoSQL data stores has brought new capabilities to store, scale and perform well on queries.
  • NoSQL has brought new query languages.
  • a document-based data store may have its own query language; a distributed cache may have its own declared N1SQL language; etc.
  • data store vendors generally try to bring new query mechanisms that are as simple as possible. These new query mechanisms would allow users to create complex queries by using simple query syntax.
  • data store implementations may come with its own query language to be used on the client side.
  • the query language is specific to the implementation of the data store and the client-side applications.
  • FIG. 1 is a block diagram of an example architecture for using a generic query language for data stores
  • FIGS. 2A-2D are block diagrams illustrating example queries generated using the generic query language for data stores
  • FIGS. 3A-3F are block diagrams illustrating more example queries generated using the generic query language for data stores
  • FIG. 4 is a flowchart of an example query process to use the generic query language for data stores
  • FIG. 5 is a flowchart of an example query process to use the generic query language for data stores
  • FIG. 6 is a flowchart of an example query process to use the generic query language for data stores.
  • FIG. 7 is a block diagram of an example network device to generate queries using the generic query language for data stores.
  • Data store implementations may come with its own query language to be used by the clients of the data store. Those query languages often are limited to the implementation of the data store. For example, the use of specific query language may be allowed from a limited client base, e.g., JAVA-based clients. As another example, some data stores may allow queries based on a Representational State Transfer (REST) Application Programming Interface (API) by putting query string in Uniform Resource Identifier (URI) query parameter or a JavaScript Object Notation (JSON) body.
  • REST Representational State Transfer
  • API Application Programming Interface
  • URI Uniform Resource Identifier
  • JSON JavaScript Object Notation
  • the generic URI query language described herein can provide a simple way to create complex queries by being independent from the underlying data store and storing mechanisms. Specifically, this generic query language can provide an easy way of representing a full set of variations of queries, especially in many-to-many and one-to-many relationships.
  • the generic query language would need support for a basic set of operations by the data stores. For example, the underlying database needs to provide a set of basic query operations (e.g., “equal,” “not equal,” “greater than,” “less than,” etc.) and a set of query aggregation operations (e.g., “or,” “and,” “not,” etc.).
  • the generic query language may be extended if the underlying data store has additional query capabilities.
  • the mechanism to store many-to-many relationships in the data stores could vary depending on a plurality of data store characteristics.
  • associative tables can be used to store the many-to-many relationships.
  • NoSQL data stores other options may be used.
  • At least two approaches can be used to store many-to-many relationships for key-value (object) data stores. These approaches can apply to cases where mostly READ or WRITE operations are frequent but update operation.
  • One approach in SQL-based data stores when on one side of a many-to-many relationship, is using a simple type represented as a string and data can be stored in de-normalized form.
  • query performance can be higher.
  • the generic query language described herein is not coupled with the design or implementation of the underlying storing mechanism.
  • FIG. 1 is a block diagram of an example architecture for using a generic query language for data stores.
  • FIG. 1 includes a Software-Defined Networking (SDN) Controller 180 that can be connected to a plurality of clients (e.g., Client 110 ) and/or servers (e.g., Server 120 ).
  • SDN Controller 180 generally refers to an application in software-defined networking (SDN) that manages flow control to allow intelligent networking.
  • SDN controller 180 may be based on protocols, such as OpenFlow, that allow servers to communicate to network switches on where to send packets.
  • protocols such as OpenFlow
  • SDN Controller 180 may include a data store 160 and a network application (e.g., SDN Application) 140 .
  • Data store 160 generally refers to a repository to persistently store and manage collections of data, e.g., a database, a file, etc.
  • a database can be a series of bytes that is managed by a database management system (DBMS).
  • DBMS database management system
  • a file can be a series of bytes that is managed by a file system.
  • data store 160 may be used by cloud storage systems for abstracting collections of data inside their respective applications.
  • data store 160 can refer to a broad class of storage systems including, but not limited to, simple files (e.g., a spreadsheet), file systems, email storage systems (both server and client systems), relational databases (e.g., SQL databases), non-relational databases (e.g., NoSQL), object-oriented databases, key-value databases, distributed data storages, directory services, virtual machines, etc.
  • simple files e.g., a spreadsheet
  • file systems e.g., email storage systems (both server and client systems)
  • relational databases e.g., SQL databases
  • non-relational databases e.g., NoSQL
  • object-oriented databases e.g., key-value databases
  • distributed data storages e.g., directory services, virtual machines, etc.
  • generic query 150 can be generated using a generic query language as defined in the present disclosure as long as data store 160 provides operational support 170 compatible with the generic query language, such as, the support for the operations of OR, AND, NOT, EQUAL, etc.
  • Network Application 140 may provide a REST API 130 to the plurality of clients and/or servers, such that the plurality of clients and/or servers can generate a generic query 150 to data store 160 .
  • data store 160 may reside anywhere in the network so long as it has connectivity to the plurality of clients and/or servers.
  • network application 140 can be implemented without a SDN framework.
  • the example generic query language allows grouping by using OR/AND operands, using NOT operand and parenthesis to create possible variations of logical queries.
  • Boolean algebra can be functionally complete with three OR, AND, and NOT operands. In other words, other logical operations could be expressed by using the OR, AND, and NOT operations. Although there may be even smaller sets with one or two cardinality, these three operands were chosen because most data stores provide some ways to support them.
  • this example generic query language can be easily used as query value in the URI query parameter.
  • Detailed information about query parameter in URI could be found in IETF RFC 3986 (URI Generic Syntax), which are incorporated herein in its entirety.
  • the example generic query language is context free, which allows the use of Backus-Naur form (BNF) notation to describe its grammar and parses queries by using regular expressions.
  • BNF Backus-Naur form
  • Table 1 below illustrates the definition of the generic query language.
  • a query constructed using the generic query language defined in Table 1 may include multiple queries connected by an operand.
  • Each of the multiple queries can be an expression, which generally takes the form of a first hash tag followed by AllowedAttributeNames, then a second hash tag followed by AllowedOperations, and then a third hash tag followed by a plurality of Values. Therefore, the generic query language herein allows a single query to include multiple expressions.
  • AllowedAttributeNames may include those alphanumerical values that designer will allow in its attribute names.
  • Whitespaces in BNF maybe ignored in real expressions.
  • AllowedOperations may include operations that data store 160 allows, for example, “equal,” “notEqual,” “greaterThan,” “lessThan,” “greaterEqual,” “lessEqual,” “in,” “between,” “like,” “notLike,” “regex,” etc.
  • the term “query” generally refers to a precise request for information retrieval with an underlying data store (e.g., database, file, or any other information systems).
  • the query may be constructed using the example generic query language.
  • “query language” generally refers to a computer language used to make queries into databases and information systems.
  • the query may also be used as a query string.
  • “query string” generally refers to an optional part of a Uniform Resource Identifier (URI) that follows the first question mark in the context of a World Wide Web (WWW).
  • URI Uniform Resource Identifier
  • WWWW World Wide Web
  • the query constructed using the example generic query language may be used as a web search query, which generally refers to a query entered by users into an interface of a search engine to search in a database, a local network, Internet, etc.
  • the example generic query language allows creating queries for many-to-many relationships in a simple syntax. Hence, results that conventionally are joined together from multiple datasets returned by multiple queries can now be obtained in single dataset in response to a single query using the example generic query language. Additionally, the example generic query language allows more restrictions on possible query formats using simple syntax, and thus eliminates complex nested queries. The following examples are given for illustration purposes only to explain the aforementioned advantage of the example generic query language.
  • FIGS. 2A-2D are block diagrams illustrating example queries generated using the generic query language for data stores.
  • the example queries in FIGS. 2A-2D and FIGS. 3A-3D use employees and their visited states as an example context. Assuming that an employee can visit multiple states. Therefore, the relationship between the employees set and the states set is a many-to-many relationship, because a particular state could be visited by multiple employees and an employee could visit multiple states.
  • FIG. 2A shows example information stored in a data store. Note that, in the data store, such information could be stored in multiple tables. In some examples such as in key-value stores, such information may be stored in various data structures.
  • FIG. 2A includes at least three fields, namely, first name 210 of an employee, last name 220 of the employee, and visited states 230 indicating the states that the employee has visited before.
  • employee John Thomas has visited the states of Alabama, Nevada, New Jersey, and Wyoming; employee Kevin Thompson has visited the states of Alaska, New Mexico, and South Dakota; employee John Thom berg has visited the states of Wyoming, South Carolina, and New York; employee Johnathan Smith has visited the states of Alabama, New Hampshire, and Ohio; employee Fred Brown has visited the states of Alabama and Oregon; etc.
  • FIG. 2B illustrates a simple query that searches for employees whose first name is John.
  • Query 240 as a URI query parameter will look like (#FirstName#Equal#John).
  • the string inside parenthesis e.g., #FirstName#Equal#John
  • FirstName is an example of AllowedAttributeNames
  • Equal is an example of AllowedOperations
  • John is an example of Values.
  • the underlying data store may return a result 250 as shown in FIG. 2B .
  • Result 250 may include employees John Thomas and John Thomberg.
  • query 260 searches for employees with first name John or Kevin. Instead of joining two expressions in the form of (#FirstName#equal#John) or (#FirstName#equal#Kevin), the example generic query language herein allows query 260 to be written in the form of a single expression (#FirstName#Equal#John, Kevin).
  • comma (,) in a values represents a logical operand “OR.”
  • the underlying data store will execute the first expression (#FirstName#equal#John) to obtain a first resulting dataset that includes employees whose first name equals to John (e.g., John Thomas, John Thomberg), and then execute the second expression (#FirstName#equal#Kevin) to obtain a second resulting dataset that includes employees whose first name equals to Kevin (e.g., Kevin Thompson).
  • the data store will combine the first resulting dataset and the second resulting dataset to obtain the response to the query (e.g., John Thomas, John Thomberg, Kevin Thompson).
  • the data stores have built-in operational support for OR, EQUAL, etc. However, because of the limitations of existing query languages, the data store had to perform complex logical operations on the resulting datasets in response to the search query.
  • the data store can receive a query including multiple values in a single expression, e.g., (#FirstName#Equal#John, Kevin), and return results 270 in a single dataset (e.g., John Thomas, John Thomberg, Kevin Thompson).
  • a query including multiple values in a single expression, e.g., (#FirstName#Equal#John, Kevin), and return results 270 in a single dataset (e.g., John Thomas, John Thomberg, Kevin Thompson).
  • query 280 searches for employees with first name John or Kevin and last Name starting with Thom.
  • wildcard characters e.g., %) or LIKE operation is a capability of the underlying data store.
  • an underscore sign (_) may be used to represent a wildcard for a single character; and, a percentage sign (%) may be used to represent a wildcard for multiple characters in an expression. If the underlying data store does not support wildcard characters, then this capability could be excluded from the language.
  • Both the underscore sign and the percentage sign are examples of AllowedOperations that include any operations allowed by the underlying data store.
  • the grammar of the example generic query language allows for creating any kind of logical combinations using OR, AND, NOT, and parenthesis, such as, ((expression1)and(expression2))or(!((expression3)or(expression 4))and(expression5)).
  • FIGS. 3A-3F are block diagrams illustrating more example queries generated using the generic query language for data stores. Specifically, FIGS. 3A-3F describe the use cases of searching for many-to-many relationship. A new operation—the CONTAIN operation—is introduced in these example queries. Although many data stores may not have support for the CONTAIN operation, the CONTAIN operation could be implemented by using other operations and capabilities that are supported in the data store.
  • FIG. 3A illustrates a query that searches for employees who visited the states of Alabama.
  • Query 310 as a URI query parameter may be constructed as (#visitedStates#Contains#Alabama).
  • the data store can receive a query including the CONTAIN operation in a single expression, and return results 320 in a single dataset (e.g., John Thomas, Johnathan Smith, Kevin Thompson).
  • query 330 searches for employees who have visited the states of Alabama or Wyoming.
  • Query 330 may be constructed as (#VisitedStates#Contains#Alabama,Nebraska).
  • the comma sign (,) in values indicates a logical operand “OR.”
  • the underlying data store will execute the first expression (#visitedStates#Contains#Alabama) to obtain a first resulting dataset that includes employees who has visited the state of Alabama (e.g., John Thomas, Johnathan Smith, Fred Brown), and then execute the second expression (#visitedStates#Contains#Nebraska) to obtain a second resulting dataset that includes employees who has visited the state of Wyoming (e.g., John Thomas, John Thomberg).
  • the data store will combine the first resulting dataset and the second resulting dataset to obtain the response to the query (e.g., John Thomas, Johnathan Smith, Kevin Thompson, John Thomberg).
  • the query e.g., John Thomas, Johnathan Smith, Kevin Thompson, John Thomberg.
  • the data store can receive a query including a CONTAIN operation and multiple values in a single expression, e.g., (#VisitedStates#Contains#Alabama, Iowa), and return results 340 in a single dataset (e.g., John Thomas, Johnathan Smith, Kevin Thompson, John Thomberg).
  • a query including a CONTAIN operation and multiple values in a single expression, e.g., (#VisitedStates#Contains#Alabama, Kansas), and return results 340 in a single dataset (e.g., John Thomas, Johnathan Smith, Kevin Thompson, John Thomberg).
  • query 350 searches for employees who have visited both Alabama and Wyoming.
  • Query 350 may be constructed as (#VisitedStates#Contains#Alabama&Nebraska).
  • the ampersand sign (&) in values indicates a logical operand “AND.”
  • the underlying data store can receive a query including a CONTAIN operation and multiple values in a single expression, e.g., (#VisitedStates#Contains#Alabama&Nebraska), and return results 360 in a single dataset (e.g., John Thomas, John Thomberg).
  • query 370 searches for employees who have not visited either Alabama or Wyoming. According to the De Morgan Law from Boolean Algebra, an expression can be rewritten as one without parenthesis. For example, not (a or b) is equivalent to not (a) and not (b). Thus, query 370 can be constructed as (#VisitedStates#Contains#!Alabama&!Nebraska).
  • the underlying data store can receive a query including one comparison operation (e.g., a CONTAIN operation) and multiple logical operations (e.g., NOT operation, AND operation) that are followed by multiple values in a single expression, e.g., (#VisitedStates#Contains#!Alabama&!Nebraska), and return results 375 in a single dataset (e.g., Kevin Thomberg).
  • a comparison operation e.g., a CONTAIN operation
  • multiple logical operations e.g., NOT operation, AND operation
  • return results 375 e.g., Kevin Thomberg
  • the example generic query language does not allow the use of parenthesis in Values.
  • the example generic query language allows the use of multiple logical operations (e.g., “AND,” “OR,” and “NOT” operations) in a single expression. From Boolean Algebra, it is possible to create any logical expressions with this set of operands without parenthesis using the De Morgan Law.
  • query 380 searches for employees who have visited at least a state whose name starts with “New” and such employees have not visited any states whose name starts with “South.”
  • query 380 may be constructed as (#VisitedStates#Contains#New %&!South%).
  • the wildcard characters such as the percentage sign (%), are supported by the capabilities of the underlying data store.
  • the underlying data store can receive a query including one comparison operation (e.g., a CONTAIN operation), multiple logical operations (e.g., NOT operation, AND operation), along with values including multiple wildcard characters in a single expression, and return results 385 in a single dataset (e.g., John Thomas, Johnathan Smith).
  • a comparison operation e.g., a CONTAIN operation
  • multiple logical operations e.g., NOT operation, AND operation
  • return results 385 in a single dataset e.g., John Thomas, Johnathan Smith.
  • FIG. 3F shows yet another example query using the generic query language.
  • Query 390 searches for employees who have visited exactly a provided list of states.
  • query 390 may be constructed using the “EQUAL” operation, which is a part of the AllowedOperations supported by the underlying data store.
  • query 390 may be constructed as (#VisitedStates#Equal#Alabama&Oregon).
  • the underlying data store can receive a query including one comparison operation (e.g., an EQUAL operation) followed by multiple values in a single expression, and return results 395 in a single dataset (e.g., Fred Brown).
  • the example generic query language described herein allows for creation of complex queries in a simplified manner to search for many-to-many relationships combined with search in other attributes.
  • the queries constructed using the example generic query language can easily be integrated into a URI as a query parameter.
  • An example URI query parameter may look like this: http://example.com/?(#visitedstates#equal#Alabama&oregon).
  • reserved characters such as, comma (,), hash tag (#), ampersand (&), etc. can be encoded in the URI string.
  • the percentage sign (%) may be used as an escape character in the URI string, it can be encoded as well if used as a wildcard character.
  • FIGS. 4-6 references may be made to the components in FIGS. 1-3 to provide contextual examples.
  • network application 140 described in FIG. 1 executes operations 410 - 440 , 510 - 550 , and 610 - 640 to construct a query using the generic query language for data stores.
  • FIGS. 4-6 are described as implemented by a computing device, it may be executed on other suitable devices or components.
  • FIGS. 4-6 may be implemented in the form of executable instructions on a machine-readable storage medium 720 as in FIG. 7 .
  • FIG. 4 is a flowchart of an example process to use the generic query language for data stores.
  • a computing device may construct a plurality of expressions using a generic query language that is independent of implementation of an associated data store (operation 410 ).
  • the associated data store may support a plurality of operands that include at least one comparison operand and multiple logical operands.
  • the computing device can generate a single query including the plurality of expressions to the associated data store, wherein the plurality of expressions are connected using the multiple logical operands (operation 420 ). Note that each expression in the single query may include multiple values separated by the multiple logical operands.
  • the computing device can transmit the single query to the associated data store (operation 430 ).
  • the computing device can receive a single set of results corresponding to the single query (operation 440 ).
  • FIG. 5 is a flowchart of an example process to use the generic query language for data stores.
  • a computing device may construct a first expression using a generic query language that is independent of implementation of an associated data store (operation 510 ).
  • the associated data store here may support a plurality of operands that include at least one comparison operand and multiple logical operands.
  • the computing device can construct a second expression using the generic query language (operation 520 ). Note that each expression in the single query may include multiple values separated by the multiple logical operands.
  • the computing device can generate a single query by connecting the first expression with a second expression using an operand (operation 530 ).
  • the computing device can submit the single query to the associated data store that supports at least one comparison operand and multiple logical operands (operation 540 ). Finally, the computing device can receive a single set of results corresponding to the single query from the associated data store (operation 550 ).
  • FIG. 6 is a flowchart of an example process to use the generic query language for data stores.
  • a computing device may construct a plurality of expressions using a generic query language that is independent of implementation of an associated data store (operation 610 ). Then, the computing device can combine the plurality of expressions into a single query using an operand (operation 620 ). Note that each expression in the single query may include multiple values separated by the multiple logical operands. This allows execution of a single query to accomplish what has been conventionally obtained through the aggregation of resulting datasets from multiple individual queries.
  • the computing device can send the single query to the associated data store that supports a plurality of operands comprising at least one comparison operand and multiple logical operands (operation 630 ). Finally, the computing device can receive a single set of results corresponding to the single query from the associated data store (operation 640 ).
  • the one comparison operand supported by the associated data store may include an EQUAL operand, a NOT EQUAL operand, a GREATER THAN operand, a LESS THAN operand, etc.
  • the multiple logical operands supported by the associated data store may include an OR operand, an AND operand, and a NOT operand.
  • each of the plurality of expressions can include an attribute name, an operation, and a plurality of values.
  • Each of the attribute name, the operation, and the plurality of values may be preceded by a special character.
  • the plurality of values are separated by a plurality of value operands.
  • the plurality of value operands may include a comma indicating an OR operation, or an ampersand indicating an AND operation.
  • the associated data store may include a text data file, a spreadsheet file, a file system, an email storage system, a relational database, a non-relational database, an object-oriented database, a distributed data storage, a directory service, or a virtual machine.
  • each component of the associated data store may support the one comparison operand and the multiple logical operands.
  • the single query is used as a uniform resource identifier (URI) query parameter.
  • reserved characters can be encoded in the URI string.
  • Such reserved characters may include, but are not limited to, a comma sign (,) indicating the OR operand, a hash tag sign (#) introducing a name of attribute and/or operand or a value, an ampersand sign (&) indicating the AND operand, an exclamation sign (! indicating the NOT operand, a percentage sign (%) indicating a wildcard for multiple characters, an underline sign (_) indicating a wildcard for a single character, etc.
  • FIG. 7 is a block diagram of an example computing device with at least one processor 710 to execute instructions 730 - 780 within a machine-readable storage medium 720 to construct a query using the generic query language for data stores.
  • “computing device” or “network device” generally includes a device that is adapted to transmit and/or receive signaling and to process information within such signaling such as a station (e.g., any data processing equipment such as a computer, cellular phone, personal digital assistant, tablet devices, etc.), an access point, data transfer devices (such as network switches, routers, controllers, etc.) or the like.
  • computing device 700 includes at least one processor 710 and machine-readable storage medium 720 , it may also include other components that would be suitable to one skilled in the art.
  • computing device 700 may include an additional processing component and/or storage.
  • the computing device executes instructions 730 - 780 .
  • Computing device 700 is an electronic device with the at least one processor 710 capable of executing instructions 730 - 780 , and as such implementations of computing device 700 include a mobile device, server, data center, networking device, client device, computer, or other type of electronic device capable of executing instructions 730 - 780 .
  • the instructions 730 - 780 may be implemented as methods, functions, operations, and other processes implemented as machine-readable instructions stored on the storage medium 720 , which may be non-transitory, such as hardware storage devices (e.g., random access memory (RAM), read only memory (ROM), erasable programmable ROM, electrically erasable ROM, hard drives, and flash memory).
  • RAM random access memory
  • ROM read only memory
  • erasable programmable ROM electrically erasable ROM
  • hard drives e.g., hard drives, and flash memory
  • the at least one processor 710 may fetch, decode, and execute instructions 730 - 780 to construct a query using the generic query language for data stores. Specifically, the at least one processor 710 executes instructions 730 - 780 to: construct a plurality of expressions using a generic query language that is independent of implementation of an associated data store; generate a single query including the plurality of expressions to the associated data store; transmit the single query to the associated data store; construct a first expression using a generic query language that is independent of implementation of an associated data store; construct a second expression using the generic query language; generate a single query by connecting the first expression with a second expression using an operand; submit the single query to the associated data store that supports at least one comparison operand and multiple logical operands; construct a plurality of expressions using a generic query language that is independent of implementation of an associated data store; combine the plurality of expressions into a single query using an operand; send the single query to the associated data store that supports a plurality of operands comprising at least one
  • the machine-readable storage medium 720 includes instructions 730 - 780 for the processor 710 to fetch, decode, and execute.
  • the machine-readable storage medium 720 may be an electronic, magnetic, optical, memory, storage, flash-drive, or other physical device that contains or stores executable instructions.
  • the machine-readable storage medium 720 may include, for example, Random Access Memory (RAM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a storage drive, a memory cache, network storage, a Compact Disc Read Only Memory (CDROM) and the like.
  • RAM Random Access Memory
  • EEPROM Electrically Erasable Programmable Read-Only Memory
  • CDROM Compact Disc Read Only Memory
  • the machine-readable storage medium 720 may include an application and/or firmware which can be utilized independently and/or in conjunction with the at least one processor 710 to fetch, decode, and/or execute instructions of the machine-readable storage medium 720 .
  • the application and/or firmware may be stored on the machine-readable storage medium 720 and/or stored on another location of the network device 700 .

Abstract

In some examples, a method includes constructing, by a computing device, a plurality of expressions using a generic query language that is independent of implementation of an associated data store, the associated data store supporting a plurality of operands comprising at least one comparison operand and multiple logical operands; generating, by the computing device, a single query including the plurality of expressions to the associated data store, wherein the plurality of expressions are connected using the multiple logical operands; transmitting, by the computing device, the single query to the associated data store; and receiving, by the computing device, a single set of results corresponding to the single query.

Description

    BACKGROUND
  • There is a tendency in data store industry to have simplified queries. NoSQL data stores has brought new capabilities to store, scale and perform well on queries. Also, NoSQL has brought new query languages. For example, a document-based data store may have its own query language; a distributed cache may have its own declared N1SQL language; etc. Thus, data store vendors generally try to bring new query mechanisms that are as simple as possible. These new query mechanisms would allow users to create complex queries by using simple query syntax. Generally, data store implementations may come with its own query language to be used on the client side. However, the query language is specific to the implementation of the data store and the client-side applications.
  • BRIEF DESCRIPTION OF THE DRAWINGS
  • The following detailed description references the drawings, wherein:
  • FIG. 1 is a block diagram of an example architecture for using a generic query language for data stores;
  • FIGS. 2A-2D are block diagrams illustrating example queries generated using the generic query language for data stores;
  • FIGS. 3A-3F are block diagrams illustrating more example queries generated using the generic query language for data stores;
  • FIG. 4 is a flowchart of an example query process to use the generic query language for data stores;
  • FIG. 5 is a flowchart of an example query process to use the generic query language for data stores;
  • FIG. 6 is a flowchart of an example query process to use the generic query language for data stores; and
  • FIG. 7 is a block diagram of an example network device to generate queries using the generic query language for data stores.
  • DETAILED DESCRIPTION
  • Data store implementations may come with its own query language to be used by the clients of the data store. Those query languages often are limited to the implementation of the data store. For example, the use of specific query language may be allowed from a limited client base, e.g., JAVA-based clients. As another example, some data stores may allow queries based on a Representational State Transfer (REST) Application Programming Interface (API) by putting query string in Uniform Resource Identifier (URI) query parameter or a JavaScript Object Notation (JSON) body. This capability adds many opportunities for data stores to be useful in such a trending design pattern as a micro-service architecture, where communication is based on the REST API.
  • The generic URI query language described herein can provide a simple way to create complex queries by being independent from the underlying data store and storing mechanisms. Specifically, this generic query language can provide an easy way of representing a full set of variations of queries, especially in many-to-many and one-to-many relationships. The generic query language would need support for a basic set of operations by the data stores. For example, the underlying database needs to provide a set of basic query operations (e.g., “equal,” “not equal,” “greater than,” “less than,” etc.) and a set of query aggregation operations (e.g., “or,” “and,” “not,” etc.). Moreover, the generic query language may be extended if the underlying data store has additional query capabilities.
  • According to the present disclosure, the mechanism to store many-to-many relationships in the data stores could vary depending on a plurality of data store characteristics. For example, for Structured Query Language (SQL) based data stores, associative tables can be used to store the many-to-many relationships. On the other hand, for NoSQL data stores, other options may be used.
  • At least two approaches can be used to store many-to-many relationships for key-value (object) data stores. These approaches can apply to cases where mostly READ or WRITE operations are frequent but update operation. One approach in SQL-based data stores, when on one side of a many-to-many relationship, is using a simple type represented as a string and data can be stored in de-normalized form. However, by storing with associative tables, query performance can be higher. Nevertheless, the generic query language described herein is not coupled with the design or implementation of the underlying storing mechanism.
  • Architecture
  • FIG. 1 is a block diagram of an example architecture for using a generic query language for data stores. Specifically, FIG. 1 includes a Software-Defined Networking (SDN) Controller 180 that can be connected to a plurality of clients (e.g., Client 110) and/or servers (e.g., Server 120). SDN Controller 180 generally refers to an application in software-defined networking (SDN) that manages flow control to allow intelligent networking. SDN controller 180 may be based on protocols, such as OpenFlow, that allow servers to communicate to network switches on where to send packets.
  • In the example illustrated in FIG. 1, SDN Controller 180 may include a data store 160 and a network application (e.g., SDN Application) 140. Data store 160 generally refers to a repository to persistently store and manage collections of data, e.g., a database, a file, etc. A database can be a series of bytes that is managed by a database management system (DBMS). A file can be a series of bytes that is managed by a file system. In addition, data store 160 may be used by cloud storage systems for abstracting collections of data inside their respective applications. Therefore, data store 160 can refer to a broad class of storage systems including, but not limited to, simple files (e.g., a spreadsheet), file systems, email storage systems (both server and client systems), relational databases (e.g., SQL databases), non-relational databases (e.g., NoSQL), object-oriented databases, key-value databases, distributed data storages, directory services, virtual machines, etc.
  • Regardless of the implementations of data store 160, generic query 150 can be generated using a generic query language as defined in the present disclosure as long as data store 160 provides operational support 170 compatible with the generic query language, such as, the support for the operations of OR, AND, NOT, EQUAL, etc.
  • Network Application 140 may provide a REST API 130 to the plurality of clients and/or servers, such that the plurality of clients and/or servers can generate a generic query 150 to data store 160.
  • Note that, even though data store 160 is illustrated as a part of SDN Controller 180 in FIG. 1, data store 160 may reside anywhere in the network so long as it has connectivity to the plurality of clients and/or servers. Also, network application 140 can be implemented without a SDN framework.
  • In the following sections, first, a generic query language is defined herein. Then, a number of example queries are provided for illustration purposes only. Finally, possible ways of storing in a key-value data store are introduced.
  • Language Description
  • The example generic query language according to the present disclosure allows grouping by using OR/AND operands, using NOT operand and parenthesis to create possible variations of logical queries. Boolean algebra can be functionally complete with three OR, AND, and NOT operands. In other words, other logical operations could be expressed by using the OR, AND, and NOT operations. Although there may be even smaller sets with one or two cardinality, these three operands were chosen because most data stores provide some ways to support them.
  • Moreover, this example generic query language can be easily used as query value in the URI query parameter. Detailed information about query parameter in URI could be found in IETF RFC 3986 (URI Generic Syntax), which are incorporated herein in its entirety. In addition, the example generic query language is context free, which allows the use of Backus-Naur form (BNF) notation to describe its grammar and parses queries by using regular expressions.
  • Table 1 below illustrates the definition of the generic query language.
  • TABLE 1
    Example Generic Query Language Description
    Query :: = NotOperand (Query) B
    B :: = Operand Query
    Operand :: = or | and
    Query :: = Expression
    B :: = epsilon(empty)
    Expression :: = #AllowedAttributeNames #AllowedOperations
    #Values
    Values :: == SingleValueRemainValues
    RemainValues :: = ValueOperand SingleValue RemainValues
    RemainValues :: = epsilon(empty)
    ValueOperand :: = , | &
    SingleValue :: = NotOperand AvailableValues
    NotOperand :: = ! | epsilon(empty)
  • As shown in Table 1, a query constructed using the generic query language defined in Table 1 may include multiple queries connected by an operand. Each of the multiple queries can be an expression, which generally takes the form of a first hash tag followed by AllowedAttributeNames, then a second hash tag followed by AllowedOperations, and then a third hash tag followed by a plurality of Values. Therefore, the generic query language herein allows a single query to include multiple expressions.
  • Here, AllowedAttributeNames may include those alphanumerical values that designer will allow in its attribute names. Whitespaces in BNF maybe ignored in real expressions. AllowedOperations may include operations that data store 160 allows, for example, “equal,” “notEqual,” “greaterThan,” “lessThan,” “greaterEqual,” “lessEqual,” “in,” “between,” “like,” “notLike,” “regex,” etc.
  • As used herein, the term “query” generally refers to a precise request for information retrieval with an underlying data store (e.g., database, file, or any other information systems). The query may be constructed using the example generic query language. As used herein, “query language” generally refers to a computer language used to make queries into databases and information systems. The query may also be used as a query string. As used herein, “query string” generally refers to an optional part of a Uniform Resource Identifier (URI) that follows the first question mark in the context of a World Wide Web (WWW). In some examples, the query constructed using the example generic query language may be used as a web search query, which generally refers to a query entered by users into an interface of a search engine to search in a database, a local network, Internet, etc.
  • The example generic query language allows creating queries for many-to-many relationships in a simple syntax. Hence, results that conventionally are joined together from multiple datasets returned by multiple queries can now be obtained in single dataset in response to a single query using the example generic query language. Additionally, the example generic query language allows more restrictions on possible query formats using simple syntax, and thus eliminates complex nested queries. The following examples are given for illustration purposes only to explain the aforementioned advantage of the example generic query language.
  • Example Queries
  • FIGS. 2A-2D are block diagrams illustrating example queries generated using the generic query language for data stores. The example queries in FIGS. 2A-2D and FIGS. 3A-3D use employees and their visited states as an example context. Assuming that an employee can visit multiple states. Therefore, the relationship between the employees set and the states set is a many-to-many relationship, because a particular state could be visited by multiple employees and an employee could visit multiple states.
  • FIG. 2A shows example information stored in a data store. Note that, in the data store, such information could be stored in multiple tables. In some examples such as in key-value stores, such information may be stored in various data structures. FIG. 2A includes at least three fields, namely, first name 210 of an employee, last name 220 of the employee, and visited states 230 indicating the states that the employee has visited before. For example, according to the information stored in the data store, employee John Thomas has visited the states of Alabama, Nevada, New Jersey, and Nebraska; employee Kevin Thompson has visited the states of Alaska, New Mexico, and South Dakota; employee John Thom berg has visited the states of Nebraska, South Carolina, and New York; employee Johnathan Smith has visited the states of Alabama, New Hampshire, and Ohio; employee Fred Brown has visited the states of Alabama and Oregon; etc.
  • FIG. 2B illustrates a simple query that searches for employees whose first name is John. Query 240 as a URI query parameter will look like (#FirstName#Equal#John). The string inside parenthesis (e.g., #FirstName#Equal#John) can be referred to as an expression. Here, FirstName is an example of AllowedAttributeNames, Equal is an example of AllowedOperations, and John is an example of Values. When executing query 240, the underlying data store may return a result 250 as shown in FIG. 2B. Result 250 may include employees John Thomas and John Thomberg.
  • Referring now to FIG. 2C, query 260 searches for employees with first name John or Kevin. Instead of joining two expressions in the form of (#FirstName#equal#John) or (#FirstName#equal#Kevin), the example generic query language herein allows query 260 to be written in the form of a single expression (#FirstName#Equal#John, Kevin). Here, comma (,) in a values represents a logical operand “OR.”
  • With a conventional query including two expressions, the underlying data store will execute the first expression (#FirstName#equal#John) to obtain a first resulting dataset that includes employees whose first name equals to John (e.g., John Thomas, John Thomberg), and then execute the second expression (#FirstName#equal#Kevin) to obtain a second resulting dataset that includes employees whose first name equals to Kevin (e.g., Kevin Thompson). Next, the data store will combine the first resulting dataset and the second resulting dataset to obtain the response to the query (e.g., John Thomas, John Thomberg, Kevin Thompson). It is important to note that the data stores have built-in operational support for OR, EQUAL, etc. However, because of the limitations of existing query languages, the data store had to perform complex logical operations on the resulting datasets in response to the search query.
  • Now with the example generic query language herein, the data store can receive a query including multiple values in a single expression, e.g., (#FirstName#Equal#John, Kevin), and return results 270 in a single dataset (e.g., John Thomas, John Thomberg, Kevin Thompson).
  • Referring now to FIG. 2D, query 280 searches for employees with first name John or Kevin and last Name starting with Thom. Here, the use of wildcard characters (e.g., %) or LIKE operation is a capability of the underlying data store. For example, an underscore sign (_) may be used to represent a wildcard for a single character; and, a percentage sign (%) may be used to represent a wildcard for multiple characters in an expression. If the underlying data store does not support wildcard characters, then this capability could be excluded from the language. Both the underscore sign and the percentage sign are examples of AllowedOperations that include any operations allowed by the underlying data store.
  • The grammar of the example generic query language allows for creating any kind of logical combinations using OR, AND, NOT, and parenthesis, such as, ((expression1)and(expression2))or(!((expression3)or(expression 4))and(expression5)).
  • FIGS. 3A-3F are block diagrams illustrating more example queries generated using the generic query language for data stores. Specifically, FIGS. 3A-3F describe the use cases of searching for many-to-many relationship. A new operation—the CONTAIN operation—is introduced in these example queries. Although many data stores may not have support for the CONTAIN operation, the CONTAIN operation could be implemented by using other operations and capabilities that are supported in the data store.
  • FIG. 3A illustrates a query that searches for employees who visited the states of Alabama. Query 310 as a URI query parameter may be constructed as (#visitedStates#Contains#Alabama). With the example generic query language herein, the data store can receive a query including the CONTAIN operation in a single expression, and return results 320 in a single dataset (e.g., John Thomas, Johnathan Smith, Kevin Thompson).
  • Referring now to FIG. 3B, query 330 searches for employees who have visited the states of Alabama or Nebraska. Query 330 may be constructed as (#VisitedStates#Contains#Alabama,Nebraska). Here, the comma sign (,) in values indicates a logical operand “OR.” With a conventional query including two expressions, the underlying data store will execute the first expression (#visitedStates#Contains#Alabama) to obtain a first resulting dataset that includes employees who has visited the state of Alabama (e.g., John Thomas, Johnathan Smith, Fred Brown), and then execute the second expression (#visitedStates#Contains#Nebraska) to obtain a second resulting dataset that includes employees who has visited the state of Nebraska (e.g., John Thomas, John Thomberg). Next, the data store will combine the first resulting dataset and the second resulting dataset to obtain the response to the query (e.g., John Thomas, Johnathan Smith, Kevin Thompson, John Thomberg). This is another example demonstrating that, because of the limitations of existing query languages, the underlying data store had to perform complex logical operations on the resulting datasets in response to the search query.
  • Now with the example generic query language herein, the data store can receive a query including a CONTAIN operation and multiple values in a single expression, e.g., (#VisitedStates#Contains#Alabama, Nebraska), and return results 340 in a single dataset (e.g., John Thomas, Johnathan Smith, Kevin Thompson, John Thomberg).
  • Referring now to FIG. 3C, query 350 searches for employees who have visited both Alabama and Nebraska. Query 350 may be constructed as (#VisitedStates#Contains#Alabama&Nebraska). Here, the ampersand sign (&) in values indicates a logical operand “AND.” Again, the underlying data store can receive a query including a CONTAIN operation and multiple values in a single expression, e.g., (#VisitedStates#Contains#Alabama&Nebraska), and return results 360 in a single dataset (e.g., John Thomas, John Thomberg).
  • In FIG. 3D, query 370 searches for employees who have not visited either Alabama or Nebraska. According to the De Morgan Law from Boolean Algebra, an expression can be rewritten as one without parenthesis. For example, not (a or b) is equivalent to not (a) and not (b). Thus, query 370 can be constructed as (#VisitedStates#Contains#!Alabama&!Nebraska). In this example, the underlying data store can receive a query including one comparison operation (e.g., a CONTAIN operation) and multiple logical operations (e.g., NOT operation, AND operation) that are followed by multiple values in a single expression, e.g., (#VisitedStates#Contains#!Alabama&!Nebraska), and return results 375 in a single dataset (e.g., Kevin Thomberg).
  • Note that, the example generic query language does not allow the use of parenthesis in Values. However, the example generic query language allows the use of multiple logical operations (e.g., “AND,” “OR,” and “NOT” operations) in a single expression. From Boolean Algebra, it is possible to create any logical expressions with this set of operands without parenthesis using the De Morgan Law.
  • Referring now to FIG. 3E, query 380 searches for employees who have visited at least a state whose name starts with “New” and such employees have not visited any states whose name starts with “South.” Using the example generic query language, query 380 may be constructed as (#VisitedStates#Contains#New %&!South%). Here, the wildcard characters, such as the percentage sign (%), are supported by the capabilities of the underlying data store. In this example, the underlying data store can receive a query including one comparison operation (e.g., a CONTAIN operation), multiple logical operations (e.g., NOT operation, AND operation), along with values including multiple wildcard characters in a single expression, and return results 385 in a single dataset (e.g., John Thomas, Johnathan Smith).
  • FIG. 3F shows yet another example query using the generic query language. Query 390 searches for employees who have visited exactly a provided list of states. Thus, query 390 may be constructed using the “EQUAL” operation, which is a part of the AllowedOperations supported by the underlying data store. Specifically, query 390 may be constructed as (#VisitedStates#Equal#Alabama&Oregon). In this example, the underlying data store can receive a query including one comparison operation (e.g., an EQUAL operation) followed by multiple values in a single expression, and return results 395 in a single dataset (e.g., Fred Brown).
  • As seen in the above examples, the example generic query language described herein allows for creation of complex queries in a simplified manner to search for many-to-many relationships combined with search in other attributes. The queries constructed using the example generic query language can easily be integrated into a URI as a query parameter. An example URI query parameter may look like this: http://example.com/?(#visitedstates#equal#Alabama&oregon). In the example generic query language, reserved characters, such as, comma (,), hash tag (#), ampersand (&), etc. can be encoded in the URI string. Also, because the percentage sign (%) may be used as an escape character in the URI string, it can be encoded as well if used as a wildcard character.
  • Processes to Use Generic Query Language for Data Stores
  • In discussing FIGS. 4-6, references may be made to the components in FIGS. 1-3 to provide contextual examples. In one implementation, network application 140 described in FIG. 1 executes operations 410-440, 510-550, and 610-640 to construct a query using the generic query language for data stores. Further, although FIGS. 4-6 are described as implemented by a computing device, it may be executed on other suitable devices or components. For example, FIGS. 4-6 may be implemented in the form of executable instructions on a machine-readable storage medium 720 as in FIG. 7.
  • FIG. 4 is a flowchart of an example process to use the generic query language for data stores. First, a computing device may construct a plurality of expressions using a generic query language that is independent of implementation of an associated data store (operation 410). Here, the associated data store may support a plurality of operands that include at least one comparison operand and multiple logical operands. Then, the computing device can generate a single query including the plurality of expressions to the associated data store, wherein the plurality of expressions are connected using the multiple logical operands (operation 420). Note that each expression in the single query may include multiple values separated by the multiple logical operands. This allows execution of a single query to accomplish what has been conventionally obtained through the aggregation of resulting datasets from multiple individual queries. Next, the computing device can transmit the single query to the associated data store (operation 430). Finally, the computing device can receive a single set of results corresponding to the single query (operation 440).
  • FIG. 5 is a flowchart of an example process to use the generic query language for data stores. First, a computing device may construct a first expression using a generic query language that is independent of implementation of an associated data store (operation 510). Similarly, the associated data store here may support a plurality of operands that include at least one comparison operand and multiple logical operands. Then, the computing device can construct a second expression using the generic query language (operation 520). Note that each expression in the single query may include multiple values separated by the multiple logical operands. Next, the computing device can generate a single query by connecting the first expression with a second expression using an operand (operation 530). This allows execution of a single query to accomplish what has been conventionally obtained through the aggregation of resulting datasets from multiple individual queries. Subsequently, the computing device can submit the single query to the associated data store that supports at least one comparison operand and multiple logical operands (operation 540). Finally, the computing device can receive a single set of results corresponding to the single query from the associated data store (operation 550).
  • FIG. 6 is a flowchart of an example process to use the generic query language for data stores. First, a computing device may construct a plurality of expressions using a generic query language that is independent of implementation of an associated data store (operation 610). Then, the computing device can combine the plurality of expressions into a single query using an operand (operation 620). Note that each expression in the single query may include multiple values separated by the multiple logical operands. This allows execution of a single query to accomplish what has been conventionally obtained through the aggregation of resulting datasets from multiple individual queries. Next, the computing device can send the single query to the associated data store that supports a plurality of operands comprising at least one comparison operand and multiple logical operands (operation 630). Finally, the computing device can receive a single set of results corresponding to the single query from the associated data store (operation 640).
  • In some examples, the one comparison operand supported by the associated data store may include an EQUAL operand, a NOT EQUAL operand, a GREATER THAN operand, a LESS THAN operand, etc. In some examples, the multiple logical operands supported by the associated data store may include an OR operand, an AND operand, and a NOT operand.
  • Furthermore, each of the plurality of expressions can include an attribute name, an operation, and a plurality of values. Each of the attribute name, the operation, and the plurality of values may be preceded by a special character. In some examples, the plurality of values are separated by a plurality of value operands. For example, the plurality of value operands may include a comma indicating an OR operation, or an ampersand indicating an AND operation.
  • In some examples, the associated data store may include a text data file, a spreadsheet file, a file system, an email storage system, a relational database, a non-relational database, an object-oriented database, a distributed data storage, a directory service, or a virtual machine. When the associated data store includes multiple components, each component of the associated data store may support the one comparison operand and the multiple logical operands.
  • In some examples, the single query is used as a uniform resource identifier (URI) query parameter. Specifically, reserved characters can be encoded in the URI string. Such reserved characters may include, but are not limited to, a comma sign (,) indicating the OR operand, a hash tag sign (#) introducing a name of attribute and/or operand or a value, an ampersand sign (&) indicating the AND operand, an exclamation sign (!) indicating the NOT operand, a percentage sign (%) indicating a wildcard for multiple characters, an underline sign (_) indicating a wildcard for a single character, etc.
  • Computing Device to Use Generic Query Language for Data Stores
  • FIG. 7 is a block diagram of an example computing device with at least one processor 710 to execute instructions 730-780 within a machine-readable storage medium 720 to construct a query using the generic query language for data stores. As used herein, “computing device” or “network device” generally includes a device that is adapted to transmit and/or receive signaling and to process information within such signaling such as a station (e.g., any data processing equipment such as a computer, cellular phone, personal digital assistant, tablet devices, etc.), an access point, data transfer devices (such as network switches, routers, controllers, etc.) or the like.
  • Although the computing device 700 includes at least one processor 710 and machine-readable storage medium 720, it may also include other components that would be suitable to one skilled in the art. For example, computing device 700 may include an additional processing component and/or storage. In another implementation, the computing device executes instructions 730-780. Computing device 700 is an electronic device with the at least one processor 710 capable of executing instructions 730-780, and as such implementations of computing device 700 include a mobile device, server, data center, networking device, client device, computer, or other type of electronic device capable of executing instructions 730-780. The instructions 730-780 may be implemented as methods, functions, operations, and other processes implemented as machine-readable instructions stored on the storage medium 720, which may be non-transitory, such as hardware storage devices (e.g., random access memory (RAM), read only memory (ROM), erasable programmable ROM, electrically erasable ROM, hard drives, and flash memory).
  • The at least one processor 710 may fetch, decode, and execute instructions 730-780 to construct a query using the generic query language for data stores. Specifically, the at least one processor 710 executes instructions 730-780 to: construct a plurality of expressions using a generic query language that is independent of implementation of an associated data store; generate a single query including the plurality of expressions to the associated data store; transmit the single query to the associated data store; construct a first expression using a generic query language that is independent of implementation of an associated data store; construct a second expression using the generic query language; generate a single query by connecting the first expression with a second expression using an operand; submit the single query to the associated data store that supports at least one comparison operand and multiple logical operands; construct a plurality of expressions using a generic query language that is independent of implementation of an associated data store; combine the plurality of expressions into a single query using an operand; send the single query to the associated data store that supports a plurality of operands comprising at least one comparison operand and multiple logical operands; receive a single set of results corresponding to the single query from the associated data store; etc.
  • The machine-readable storage medium 720 includes instructions 730-780 for the processor 710 to fetch, decode, and execute. In another example, the machine-readable storage medium 720 may be an electronic, magnetic, optical, memory, storage, flash-drive, or other physical device that contains or stores executable instructions. Thus, the machine-readable storage medium 720 may include, for example, Random Access Memory (RAM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a storage drive, a memory cache, network storage, a Compact Disc Read Only Memory (CDROM) and the like. As such, the machine-readable storage medium 720 may include an application and/or firmware which can be utilized independently and/or in conjunction with the at least one processor 710 to fetch, decode, and/or execute instructions of the machine-readable storage medium 720. The application and/or firmware may be stored on the machine-readable storage medium 720 and/or stored on another location of the network device 700.

Claims (20)

We claim:
1. A method comprising:
constructing, by a computing device, a plurality of expressions using a generic query language that is independent of implementation of an associated data store, the associated data store supporting a plurality of operands comprising at least one comparison operand and multiple logical operands;
generating, by the computing device, a single query including the plurality of expressions to the associated data store, wherein the plurality of expressions are connected using the multiple logical operands;
transmitting, by the computing device, the single query to the associated data store; and
receiving, by the computing device, a single set of results corresponding to the single query.
2. The method of claim 1, wherein the one comparison operand supported by the associated data store comprises one of: an EQUAL operand, a NOT EQUAL operand, a GREATER THAN operand, and a LESS THAN operand.
3. The method of claim 1, wherein the multiple logical operands supported by the associated data store comprise: an OR operand, an AND operand, and a NOT operand.
4. The method of claim 1, wherein each of the plurality of expressions comprises an attribute name, an operation, and a plurality of values.
5. The method of claim 4, wherein each of the attribute name, the operation, and the plurality of values is preceded by a special character.
6. The method of claim 4, wherein the plurality of values are separated by a plurality of value operands, and wherein the plurality of value operands comprise a comma indicating an OR operation and an ampersand indicating an AND operation.
7. The method of claim 1, wherein the associated data store comprises at least one of a text data file, a spreadsheet file, a file system, an email storage system, a relational database, a non-relational database, an object-oriented database, a distributed data storage, a directory service, and a virtual machine, each component of the associated data store supporting the one comparison operand and the multiple logical operands.
8. The method of claim 1, wherein the single query is used as a uniform resource identifier (URI) query parameter.
9. A system comprising at least a memory and a processor coupled to the memory, the processor executing instructions stored in the memory to:
construct a first expression using a generic query language that is independent of implementation of an associated data store;
construct a second expression using the generic query language;
generate a single query by connecting the first expression with a second expression using an operand;
submit the single query to the associated data store that supports at least one comparison operand and multiple logical operands; and
receive a single set of results corresponding to the single query from the associated data store.
10. The system of claim 9, wherein the one comparison operand comprises one of: an EQUAL operand, a NOT EQUAL operand, a GREATER THAN operand, and a LESS THAN operand.
11. The system of claim 9, wherein the multiple logical operands comprise: an OR operand, an AND operand, and a NOT operand.
12. The system of claim 9, wherein the first expression comprises an attribute name, an operation, and a plurality of values.
13. The system of claim 12, wherein each of the attribute name, the operation, and the plurality of values is preceded by a special character.
14. The system of claim 12, wherein the plurality of values are separated by a plurality of value operands, and wherein the plurality of value operands comprise a comma indicating an OR operation and an ampersand indicating an AND operation.
15. The system of claim 9, wherein the query language uses Backus-Naur form notation to describe grammar rules and parses the single query using regular expressions.
16. The system of claim 9, wherein the single query is used as a uniform resource identifier (URI) query parameter.
17. A non-transitory machine-readable storage medium encoded with instructions executable by at least one processor of a network device, the machine-readable storage medium comprising instructions to:
construct a plurality of expressions using a generic query language that is independent of implementation of an associated data store;
combine the plurality of expressions into a single query using an operand;
send the single query to the associated data store that supports a plurality of operands comprising at least one comparison operand and multiple logical operands; and
receive a single set of results corresponding to the single query from the associated data store.
18. The non-transitory machine-readable storage medium of claim 17, wherein the one comparison operand comprises one of: an EQUAL operand, a NOT EQUAL operand, a GREATER THAN operand, and a LESS THAN operand, and wherein the multiple logical operands comprise: an OR operand, an AND operand, and a NOT operand.
19. The non-transitory machine-readable storage medium of claim 17, wherein each of the plurality of expressions comprises an attribute name, an operation, and a plurality of values, each of the attribute name, the operation, and the plurality of values being preceded by a special character.
20. The non-transitory machine-readable storage medium of claim 17, wherein the plurality of values in each expression are separated by a plurality of value operands, and wherein the plurality of value operands comprise a comma indicating an OR operation and an ampersand indicating an AND operation.
US15/365,613 2016-11-30 2016-11-30 Generic query language for data stores Active 2037-05-21 US10776352B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US15/365,613 US10776352B2 (en) 2016-11-30 2016-11-30 Generic query language for data stores

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
US15/365,613 US10776352B2 (en) 2016-11-30 2016-11-30 Generic query language for data stores

Publications (2)

Publication Number Publication Date
US20180150526A1 true US20180150526A1 (en) 2018-05-31
US10776352B2 US10776352B2 (en) 2020-09-15

Family

ID=62190874

Family Applications (1)

Application Number Title Priority Date Filing Date
US15/365,613 Active 2037-05-21 US10776352B2 (en) 2016-11-30 2016-11-30 Generic query language for data stores

Country Status (1)

Country Link
US (1) US10776352B2 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111026827A (en) * 2019-12-06 2020-04-17 北京地拓科技发展有限公司 Data service method and device for soil erosion factors and electronic equipment
US11176173B2 (en) * 2018-07-10 2021-11-16 Comptel Oy Arrangement for enriching data stream in a communications network and related method
US11500889B1 (en) 2022-04-24 2022-11-15 Morgan Stanley Services Group Inc. Dynamic script generation for distributed query execution and aggregation
US11520739B1 (en) 2022-04-24 2022-12-06 Morgan Stanley Services Group Inc. Distributed query execution and aggregation
US11645231B1 (en) 2022-04-24 2023-05-09 Morgan Stanley Services Group Inc. Data indexing for distributed query execution and aggregation

Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5924103A (en) * 1997-03-12 1999-07-13 Hewlett-Packard Company Works-in-progress in an information management system
US20020120616A1 (en) * 2000-12-30 2002-08-29 Bo-Hyun Yun System and method for retrieving a XML (eXtensible Markup Language) document
US20070219863A1 (en) * 2006-03-20 2007-09-20 Park Joseph C Content generation revenue sharing
US20100145946A1 (en) * 2008-12-09 2010-06-10 Microsoft Corporation Translating queries to representational state transfer (rest)
US20100169381A1 (en) * 2008-12-31 2010-07-01 International Business Machines Corporation Expression tree data structure for representing a database query
US7881957B1 (en) * 2004-11-16 2011-02-01 Amazon Technologies, Inc. Identifying tasks for task performers based on task subscriptions
US20110167063A1 (en) * 2010-01-05 2011-07-07 Ashwin Tengli Techniques for categorizing web pages
US20130024788A1 (en) * 2011-07-18 2013-01-24 Salesforce.Com, Inc. Computer implemented methods and apparatus for presentation of feed items in an information feed to be displayed on a display device
US20130318117A1 (en) * 2012-05-22 2013-11-28 Oracle International Corporation Directory server processing requests based on hierarchical models while using backend servers operating based on relational models
US20140082013A1 (en) * 2012-09-20 2014-03-20 Sap Ag Query templates for queries in data stream management systems
US20140374276A1 (en) * 2013-06-25 2014-12-25 Lifescan Scotland Limited Physiological monitoring system communicating with at least a social network
US20150074034A1 (en) * 2013-09-09 2015-03-12 Xerox Corporation Global regular expression backreferences
US20150365359A1 (en) * 2014-06-13 2015-12-17 Russell Hasan Html5-based message protocol
US20160299947A1 (en) * 2015-04-08 2016-10-13 Zscaler, Inc. Optimized exclusion filters for multistage filter processing in queries
US20160350091A1 (en) * 2015-05-27 2016-12-01 Prakash Khot Mechanisms For Declarative Expression Of Data Types For Data Storage
US20170031976A1 (en) * 2015-07-29 2017-02-02 Oracle International Corporation Materializing internal computations in-memory to improve query performance
US20180314736A1 (en) * 2013-07-17 2018-11-01 Google Llc Third party search applications for a search system

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002001416A2 (en) 2000-06-23 2002-01-03 The Johns Hopkins University Architecture for distributed database information access
US6795825B2 (en) 2000-09-12 2004-09-21 Naphtali David Rishe Database querying system and method
WO2004044785A1 (en) 2002-11-12 2004-05-27 Thought, Inc. Dynamic transparent object querying generation and parsing
US7702649B1 (en) 2004-06-08 2010-04-20 Sap Ag Object-relational mapping system and method for generic relationships
US20060195460A1 (en) 2005-02-28 2006-08-31 Microsoft Corporation Data model for object-relational data
US7797304B2 (en) 2006-03-20 2010-09-14 Microsoft Corporation Extensible query language with support for rich data types

Patent Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5924103A (en) * 1997-03-12 1999-07-13 Hewlett-Packard Company Works-in-progress in an information management system
US20020120616A1 (en) * 2000-12-30 2002-08-29 Bo-Hyun Yun System and method for retrieving a XML (eXtensible Markup Language) document
US7881957B1 (en) * 2004-11-16 2011-02-01 Amazon Technologies, Inc. Identifying tasks for task performers based on task subscriptions
US20070219863A1 (en) * 2006-03-20 2007-09-20 Park Joseph C Content generation revenue sharing
US20100145946A1 (en) * 2008-12-09 2010-06-10 Microsoft Corporation Translating queries to representational state transfer (rest)
US20100169381A1 (en) * 2008-12-31 2010-07-01 International Business Machines Corporation Expression tree data structure for representing a database query
US20110167063A1 (en) * 2010-01-05 2011-07-07 Ashwin Tengli Techniques for categorizing web pages
US20130024788A1 (en) * 2011-07-18 2013-01-24 Salesforce.Com, Inc. Computer implemented methods and apparatus for presentation of feed items in an information feed to be displayed on a display device
US20130318117A1 (en) * 2012-05-22 2013-11-28 Oracle International Corporation Directory server processing requests based on hierarchical models while using backend servers operating based on relational models
US20140082013A1 (en) * 2012-09-20 2014-03-20 Sap Ag Query templates for queries in data stream management systems
US20140374276A1 (en) * 2013-06-25 2014-12-25 Lifescan Scotland Limited Physiological monitoring system communicating with at least a social network
US20180314736A1 (en) * 2013-07-17 2018-11-01 Google Llc Third party search applications for a search system
US20150074034A1 (en) * 2013-09-09 2015-03-12 Xerox Corporation Global regular expression backreferences
US20150365359A1 (en) * 2014-06-13 2015-12-17 Russell Hasan Html5-based message protocol
US20160299947A1 (en) * 2015-04-08 2016-10-13 Zscaler, Inc. Optimized exclusion filters for multistage filter processing in queries
US20160350091A1 (en) * 2015-05-27 2016-12-01 Prakash Khot Mechanisms For Declarative Expression Of Data Types For Data Storage
US20170031976A1 (en) * 2015-07-29 2017-02-02 Oracle International Corporation Materializing internal computations in-memory to improve query performance

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
https://docs.oracle.com/javaee/5/tutorial/doc/javaeetutorial5.pdf (Year: 2010) *
https://www.siteground.com/tutorials/phpmyadmin/query/ (2015 version) https://www.phpmyadmin.net/files/4.5.0/ (Year: 2015) *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11176173B2 (en) * 2018-07-10 2021-11-16 Comptel Oy Arrangement for enriching data stream in a communications network and related method
CN111026827A (en) * 2019-12-06 2020-04-17 北京地拓科技发展有限公司 Data service method and device for soil erosion factors and electronic equipment
US11500889B1 (en) 2022-04-24 2022-11-15 Morgan Stanley Services Group Inc. Dynamic script generation for distributed query execution and aggregation
US11520739B1 (en) 2022-04-24 2022-12-06 Morgan Stanley Services Group Inc. Distributed query execution and aggregation
US11645231B1 (en) 2022-04-24 2023-05-09 Morgan Stanley Services Group Inc. Data indexing for distributed query execution and aggregation

Also Published As

Publication number Publication date
US10776352B2 (en) 2020-09-15

Similar Documents

Publication Publication Date Title
US10776352B2 (en) Generic query language for data stores
US10528548B2 (en) Enforcing referential integrity for object data documents
US11567997B2 (en) Query language interoperabtility in a graph database
US11615143B2 (en) System and method for querying a graph model
US10346399B2 (en) Searching relational and graph databases
US9514188B2 (en) Integrating map-reduce into a distributed relational database
JP6144700B2 (en) Scalable analysis platform for semi-structured data
US10275475B2 (en) Scalable analysis platform for semi-structured data
US9817858B2 (en) Generating hash values
US20170357653A1 (en) Unsupervised method for enriching rdf data sources from denormalized data
US20150169686A1 (en) System and method for querying hybrid multi data sources
US9805137B2 (en) Virtualizing schema relations over a single database relation
CN103761102B (en) A kind of uniform data service platform and its implementation
GB2537670A (en) A query mediator, a method of querying a polyglot data tier and a computer program executable to carry out a method of querying a polyglot data tier
US11449550B2 (en) Ad-hoc graph definition
US11238084B1 (en) Semantic translation of data sets
US8756246B2 (en) Method and system for caching lexical mappings for RDF data
CN107346317A (en) A kind of data query method and apparatus
US20210311958A1 (en) Data warehousing system and process
US11188594B2 (en) Wildcard searches using numeric string hash
US10467269B2 (en) Accessing category-specific search servers
US20150154268A1 (en) Method of discovering and exploring feature knowledge
US11347732B1 (en) JSON persistence service
KR20190129474A (en) Apparatus and method for retrieving data
Zollmann Nosql databases

Legal Events

Date Code Title Description
AS Assignment

Owner name: HEWLETT PACKARD ENTERPRISE DEVELOPMENT LP, TEXAS

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:NERSISYAN, ROMAN;TSENG, YUNG-CHING;GANGADHARAN, SANDEEP;SIGNING DATES FROM 20161122 TO 20161130;REEL/FRAME:040471/0656

STPP Information on status: patent application and granting procedure in general

Free format text: FINAL REJECTION MAILED

STPP Information on status: patent application and granting procedure in general

Free format text: DOCKETED NEW CASE - READY FOR EXAMINATION

STPP Information on status: patent application and granting procedure in general

Free format text: NON FINAL ACTION MAILED

STPP Information on status: patent application and granting procedure in general

Free format text: RESPONSE TO NON-FINAL OFFICE ACTION ENTERED AND FORWARDED TO EXAMINER

STPP Information on status: patent application and granting procedure in general

Free format text: NOTICE OF ALLOWANCE MAILED -- APPLICATION RECEIVED IN OFFICE OF PUBLICATIONS

STPP Information on status: patent application and granting procedure in general

Free format text: NOTICE OF ALLOWANCE MAILED -- APPLICATION RECEIVED IN OFFICE OF PUBLICATIONS

STCF Information on status: patent grant

Free format text: PATENTED CASE

MAFP Maintenance fee payment

Free format text: PAYMENT OF MAINTENANCE FEE, 4TH YEAR, LARGE ENTITY (ORIGINAL EVENT CODE: M1551); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

Year of fee payment: 4