1. A method for querying a database comprising: identifying an interface to the database for receiving a query including path expressions by a database management apparatus; receiving input defining a compliance rule, the input including: i) input identifying a configuration-item type, the identified configuration-item type determining a type of configuration item in an IT infrastructure of different types of configuration items; ii) input defining a rule scope, the rule scope determining which configuration items of the identified type are to be checked by the compliance rule; and iii) input defining a desired state for each of the configuration items to be checked by the rule, the desired state including at least one compliance condition that must be satisfied for a checked configuration item to be in compliance; receiving input identifying at least one path, each path being from an object in an object model to a related object in the object model or to an attribute of a related object in the object model; creating a path expression for each identified path, each path expression being composed from tokens selected from the group consisting of object identifiers, attribute identifiers, a relationship operator, and path qualifiers, the tokens sequentially added together to create the path expression; displaying at least one list of selectable items, each item associated with a token; receiving selection of at least one of the selectable items; including the at least one token associated with the selected at least one item into the path expression for one of the identified paths; creating a query for querying data structured in accordance with the object model, the query including at least one of the created path expressions; and executing the query on the database to query the data.
1. A method for querying a database comprising: identifying an interface to the database for receiving a query including path expressions by a database management apparatus; receiving input defining a compliance rule, the input including: i) input identifying a configuration-item type, the identified configuration-item type determining a type of configuration item in an IT infrastructure of different types of configuration items; ii) input defining a rule scope, the rule scope determining which configuration items of the identified type are to be checked by the compliance rule; and iii) input defining a desired state for each of the configuration items to be checked by the rule, the desired state including at least one compliance condition that must be satisfied for a checked configuration item to be in compliance; receiving input identifying at least one path, each path being from an object in an object model to a related object in the object model or to an attribute of a related object in the object model; creating a path expression for each identified path, each path expression being composed from tokens selected from the group consisting of object identifiers, attribute identifiers, a relationship operator, and path qualifiers, the tokens sequentially added together to create the path expression; displaying at least one list of selectable items, each item associated with a token; receiving selection of at least one of the selectable items; including the at least one token associated with the selected at least one item into the path expression for one of the identified paths; creating a query for querying data structured in accordance with the object model, the query including at least one of the created path expressions; and executing the query on the database to query the data. 6. The method of claim 1 , comprising: translating the created query into a second query, the second query being expressed as a structured-query-language query.