Documentation   >   Network database   >   Network Query Language
 
Overview
Manipulation
Modification
NQL Extension
Java Client


Network Query Language Tutorial
Network Query Language (NQL) is similar to SQL and have similar operators for data modification (insert, update, delete) and data manipulation (select). So, if you familiar with SQL it will be easier to you.
The most of the 'select' queries return network (vs table in SQL) and output results are represented as graph.

To be more practical this tutorial provides ability to run queries in-line and see result with online demo database.
So, by clicking on green triangle near a query your are executing the query in demo database and can see how results look like. Let's run following query which select John Smith and his friends:
SELECT 
  (first_name='John' AND last_name='Smith') 
  / (name='friends') 
  / ()
Execute NQL command

Pseudo code and update statements are not executable and look like following:

SELECT (...) / [ depth='X']  / (...) 

Usually, there are executable examples right after each pseudo code. Like following example for pseudo code above (ability to get relations between entities): Let's check if John's dog Roger related somehow to HP:

SELECT 
  (name='Dog Roger' AND breed='terrier')
  / [ depth='5'] 
  / (name='HP Company' AND address='USA, Idaho, Boise')
Execute NQL command

Or how Roman Empire were connected to other Empires ...

SELECT (name like 'Roman*Empire*') 
/ [  
    depth='5' 
    USEONLY (CHN_TYPE='COUNTRY' name='country-previous-next') 
  ]
/ (name like '*Empire*') 
LIMIT 100
Execute NQL command

Powered by ESG