摘要 |
Described herein is using type information with a graph of nodes and predicates, in which the type information may be used to determine validity of (type check) a query to be executed against the graph. In one aspect, each node has a type, and each predicate indicates a valid relationship between two types of nodes. A type checking mechanism uses the type information to determine whether a query is valid, which may be the entire query prior to query processing/compilation time, or as the query is being composed by a user. One or more valid predicates for a given node may be discovered based upon the node type, such as discovered to assist the user during query composition. Also described is using the type information to optimize the query. |