A Configuration Management Database (“CMDB”) is a repository of information related to components of a system, such as an information technology system, a biological system, or a system of electronic components in a circuit. A CMDB contains configuration items and metadata that describes attributes and relationships therebetween. Configuration managers of a CMDB may describe technical, ownership, and relationship aspects of a configuration item.
As noted above, a CMDB may contain associations between configuration items. Such relationships may be modeled as a data structure of interconnected nodes known as graphs. A connection or association between each pair of nodes may be known as an edge or arc. A graph data structure may also associate each edge with some edge value, such as a symbolic label or a numeric attribute (cost, capacity, length, etc.). Thus, arrangements of various sections of a system may be represented with a subgraph of nodes within the graph. These arrangements may be known as topologies. A CMDB may be queried with a topological query language (“TQL”). As with standard query language (“SQL”) in relational databases, TQL may retrieve data from a CMDB.
While SQL allows users to express queries in a high level language, TQL queries are typically expressed graphically. A TQL query may enable users to search a CMDB graph for all subgraph instances of a pattern graph specified by the user. Unfortunately, TQL is not as accessible as SQL, since TQL requires an intimate understanding of the theory and structure of a CMDB database. The complexity of TQL limits a CMDB's user base to professionals with advanced training. Such complexity makes the benefits of CMDB unavailable to most users. While some natural language interfaces to CMDB have been discussed, these interfaces may be incapable of adapting to different wordings of natural language expressions.
In view of the foregoing, disclosed herein are a system, non-transitory computer readable medium, and method for querying a CMDB database. In one example, a topological query derived from an interpretation of an ambiguous query is executed in a configuration management database. In another example, the ambiguous query may be a natural language query. In yet a further example, the interpretation may be based on a context-free grammar. The techniques disclosed herein may allow users to submit natural language queries to a CMDB without worrying about the phrasing of the query or about potential ambiguities therein. Rather than requiring expertise in graph database structures and design, the techniques disclosed herein may enable any user to obtain data from a CMDB. In turn, CMDB may be more widely accessible to users of all levels. The aspects, features and advantages of the present disclosure will be appreciated when considered with reference to the following description of examples and accompanying figures. The following description does not limit the application; rather, the scope of the disclosure is defined by the appended claims and equivalents.
Non-transitory computer readable media may comprise any one of many physical media such as, for example, electronic, magnetic, optical, electromagnetic, or semiconductor media. More specific examples of suitable non-transitory computer-readable media include, but are not limited to, a portable magnetic computer diskette such as floppy diskettes or hard drives, a read-only memory (“ROM”), an erasable programmable read-only memory, a portable compact disc or other storage devices that may be coupled to computer apparatus 100 directly or indirectly. Alternatively, non-transitory CRM 112 may be a random access memory (“RAM”) device or may be divided into multiple memory segments organized as dual in-line memory modules (“DIMMs”). The non-transitory CRM 112 may also include any combination of one or more of the foregoing and/or other devices as well. While only one processor and one non-transitory CRM are shown in
The instructions residing in parser module 114 and execution engine 116 may comprise any set of instructions to be executed directly (such as machine code) or indirectly (such as scripts) by processor 110. In this regard, the terms “instructions,” “scripts,” and “applications” may be used interchangeably herein. The computer executable instructions may be stored in any computer language or format, such as in object code or modules of source code. Furthermore, it is understood that the instructions may be implemented in the form of hardware, software, or a combination of hardware and software and that the examples herein are merely illustrative.
As noted earlier, a CMDB, such as CMDB 118, may comprise a plurality of configuration item topologies and may be arranged as a graph data structure. Parser module 114 may instruct processor 110 to determine whether each interpretation of an ambiguous query expression can be converted into a topological query. In one example, the ambiguous query expression may be a natural language query expression. The conversion from a natural language query may be based on a predetermined context-free grammar. Execution engine 116 may instruct processor 110 to determine whether an interpretation of the ambiguous query is convertible to a topological query and to execute the topological query in the CMDB, if the interpretation of the ambiguous query is convertible to the topological query.
Working examples of the system, method, and non-transitory computer-readable medium are shown in
As shown in block 202, an ambiguous query may be read. The query may be an ambiguous natural language query submitted by a user. As shown in block 204, it may be determined whether an interpretation of the ambiguous query is translatable to a topological query. As noted above, the interpretation may be based on a predetermined context free grammar. An example context free grammar will be explained in more detail below. In one aspect, a syntax tree data structure may be generated for each interpretation of the ambiguous query. In a further example, the syntax trees may be processed concurrently by multithreading parser module 114.
Referring now to
The root of syntax tree 302 is an illustrative syntax variable “Query.” The syntax variable “Query” is shown associated with an example child syntax variable “Node.” In turn, “Node” is associated with yet another example syntax variable “Class Condition.” The illustrative syntax variables “Query,” “Node,” and “Class Condition” may belong to an example predetermined context free grammar. Furthermore, each association along the branch may represent a rewrite rule of the context free grammar. Thus, according to the rewrite rules, “Query” can be substituted with “Node;” and, “Node” may be substituted with “Class Condition.” The syntax variable “Class Condition” may then be associated with the phrase “All Servers,” which is a phrase from the natural language query. The words or phrases from the natural language query may be known as terminal symbols, since these symbols cannot be rewritten. Thus, according to the rewrite rule, “Class Condition” can be substituted with the phrase “All Servers.”
Syntax tree 302 also shows another illustrative syntax variable “Relation,” which is associated with the word “in” from the natural language query “All Severs in London.” Thus, the example context free grammar may specify that the syntax variable “Query” may be substituted with “Relation;” and, “Relation” can be substituted with the word “in.” The final branch from the root comprises associations between example syntax variables “Query,” “Node,” “Data Condition,” and terminates with an association to the word “London,” which is the last word from the example query.
Referring back to
Referring now to
Advantageously, the foregoing system, method, and non-transitory computer readable medium facilitates interactions between a CMDB and users that may not be familiar with the intricacies of CMDB databases or graph theory. In this regard, ambiguous terms in the query may be accommodated with a predefined context free grammar. In turn, the benefits of CMDB may be made accessible to a larger user base and may be used for many different types of systems.
Although the disclosure herein has been described with reference to particular examples, it is to be understood that these examples are merely illustrative of the principles of the disclosure. It is therefore to be understood that numerous modifications may be made to the examples and that other arrangements may be devised without departing from the spirit and scope of the disclosure as defined by the appended claims. Furthermore, while particular processes are shown in a specific order in the appended drawings, such processes are not limited to any particular order unless such order is expressly set forth herein; rather, processes may be performed in a different order or concurrently and steps may be added or omitted.