Summary
In this chapter, we made our initial attempts at using GQL by learning how to create and manage graph data using intuitive pattern-based queries. We explored GQL Playground and constructed our own graph model called StoryGraph
, which introduced us to the process of defining nodes and edges. Through examples, we practiced retrieving data using the MATCH
statement, learning how to identify specific nodes, edges, and paths based on labels, properties, and relationships.
We also learned how to handle updates in the graph by modifying node and edge properties with the SET
statement, demonstrated through scenarios such as updating the score of clubs or adding new friendships between people. Additionally, we practiced managing data life cycle operations by using the DELETE
and DETACH DELETE
statements to safely remove edges and nodes, while understanding the constraints around connected nodes. Finally, we saw how to conclude graph operations entirely by dropping the graph structure...