Databases/Neo4j
Queries
- Display database schema
- Basically displaying all types of nodes and relationships between each type of node
CALL db.schema.visualization();
- Data import
- See the stackoverflow sample dataset for JSON import from url
- Data Import - Developer Guides (neo4j.com)
Basic Queries
Find labels and their frequencies
Label is basically node name/type.
Find all relationship types and their frequencies
()-[r]->()
is used to express relationship. The middle term is relationship.
Left and right of the relationship are both nodes.
(A)-[reads]->(B)
means A reads B. The relation is the same as the direction of the arrow.
Sorting by Attribute Count
What are the most popular tags?
Find all question tags, and count question for each tag.
Path Finding
Find all shortest paths between 2 users with whatever relationships in between.
Reference
How is this guide?