Cogito Knowledge Center
 
 

The Cogito Graph Query Language, or GQL, allows users to create query statements that can be executed in either the Cogito Knowledge Center UI or in conjunction with its APIs. GQL gives users the ability to query for links, patterns, and relationships in networked data sets where entities or elements are represented as nodes and relationships between entities are represented as arcs.

GQL can be created using a programmatic style or visual style using Cogito’s GQ Builder. GQL statements can include multiple criteria (specifications) that define nodes and relationships between them. The basic structure is:

PATTERN <name/pattern identifier> BEGIN
  SPEC <name/pattern identifier> BEGIN
     <node-or-arc specification>
  END SPEC <name/pattern identifier>
END PATTERN

For example, a simple search in the IMDB for Tom Cruise would be represented as:

PATTERN a BEGIN
  SPEC a BEGIN
    NodeClass = “actor” and
    MainValue = “Cruise, Tom”
  END SPEC a
END PATTERN

A more complex query to identify the degree of separation of Tom Cruise and Katie Holmes based on their movies would look like this:

PATTERN b-a BEGIN
  SPEC b BEGIN
    NodeClass = “actor” and
    MainValue = “Cruise, Tom”
  END SPEC b
  SPEC a BEGIN
    NodeClass = “actor” and
    MainValue = “Holmes, Katie”
  END SPEC a
  SPEC b-a BEGIN
    HopLimit = 4 and
    ArcClassList = “actorToMovie”, “movieToActor”
  END SPEC b-a
END PATTERN

Result set: 2005 MTV Movie Awards

GQL can also be used to filter data based on node attributes, link types with the ability to define specific or fuzzy searches.

Key Benefits:

  • Provides unique methods for data mining not possible with traditional relational queries
  • Ability to search for links, patterns and specific nodes with filters
  • Queries can be executed through APIs or Cogito Knowledge Center UI
  • Provides a standard query method
Top Features:
  • Query can be constructed graphically or with command text
  • Graphic query and text are automatically linked
  • Command set and structure are simple yet powerful