NEW
Declarative graph query language for expressing and executing pattern matching and updates on property graphs.
DESCRIPTION
Cypher provides an ASCII-art–like syntax to describe nodes, relationships, and properties. It supports pattern matching with MATCH, data creation with CREATE/MERGE, and projection with RETURN. Aggregation, filtering, and path functions enable expressive analytics. Originally created by Neo4j, Cypher influenced openCypher and GQL standardization efforts. It targets property graphs rather than RDF-based graphs.
ALTERNATIVE DEFINITIONS
Neo4j
Cypher is a declarative graph query language that allows you to store and retrieve data from the graph.
Highlights declarative nature and data retrieval/creation in graphs.
Wikipedia
Cypher is a declarative graph query language created by Neo4j.
Concise origin and language classification.
openCypher
openCypher is an open community project to make Cypher available to everyone.
Emphasizes community-driven availability of the language.
RELATED TERMS
Neo4j Graph Database Property Graph Pattern Matching MATCH Clause CREATE Return OpenCypher
COMPETING TERMS
KNOWLEDGE AREAS
Programming Languages Data Storage & Operations Semantic & Knowledge Modeling
TARGET AUDIENCE
Data Engineer Software Developer Data Scientist Data Architect
EXTERNAL SOURCES
- Wikipedia - Cypher (query language)
- Neo4j - Official Cypher language manual
- ISO GQL - Context for graph query language standardization
- Apache TinkerPop - Gremlin graph traversal counterpart
TOP QUESTIONS
What makes Cypher declarative?
You specify what graph pattern to find or create, not how to traverse, leaving optimization to the engine.
Category: Understanding
How does Cypher compare to Gremlin?
Cypher is declarative and pattern-centric, while Gremlin is imperative and traversal-oriented. Choice depends on tooling and query style preference.
Category: Comparison
What is MERGE in Cypher?
MERGE matches an existing pattern or creates it if absent, providing upsert-like semantics.
Category: HowTo
Can Cypher update graph data?
Yes. CREATE, MERGE, SET, and DELETE clauses support inserting and modifying nodes, relationships, and properties.
Category: Capabilities
Is Cypher standardized?
Cypher inspired openCypher and contributed to ISO GQL efforts, but Cypher itself is not an ISO standard.
Category: Standards
Does Cypher work with RDF graphs?
Cypher targets property graphs. RDF graphs typically use SPARQL for querying.
Category: Scope
How to optimize Cypher queries?
Create appropriate indexes, use EXPLAIN/PROFILE, limit expansions, and avoid Cartesian products.
Category: BestPractice
What is a common mistake in Cypher pattern matching?
Accidentally generating Cartesian products by matching unconnected patterns without predicates.
Category: Mistakes
Can I parameterize Cypher queries?
Yes. Use parameters to avoid injection, improve caching, and simplify query reuse.
Category: Security