NEO4J简单介绍
NEO4J数据图数据库,多用户NLP知识图谱,大数据,社交网站等领域。Cypher是Neo4j的查询语句,类似于关系型数据库的sql,不过更接近于自然语言,语义更清晰易懂。
Neo4j的版本区别
数据库的删除方式
3.5
3.5的data下面有个graph.db的文件夹,可以直接删除。
4.0
4.0有三个文件夹。分别删除第一个databases文件夹里面的全部内容和第三个transactions里面的全部内容。
MATCH
The MATCH
clause allows you to specify the patterns Neo4j will search for in the database. This is the primary way of getting data into the current set of bindings. It is worth reading up more on the specification of the patterns themselves in Section 2.9, “Patterns”.
MATCH
is often coupled to a WHERE part which adds restrictions, or predicates, to the MATCH
patterns, making them more specific. The predicates are part of the pattern description, and should not be considered a filter applied only after the matching is done. This means that WHERE should always be put together with the MATCH clause it belongs to.
MATCH
can occur at the beginning of the query or later, possibly after a WITH. If it is the first clause, nothing will have been bound yet, and Neo4j will design a search to find the results matching the clause and any associated predicates specified in any WHERE part. This could involve a scan of the database, a search for nodes having a certain label, or a search of an index to find starting points for the pattern matching. Nodes and relationships found by this search are available as bound pattern elements, and can be used for pattern matching of sub-graphs. They can also be used in any further MATCH clauses, where Neo4j will use the known elements, and from there find further unknown elements.
Cypher is declarative, and so usually the query itself does not specify