NEO4J Study Notes

Source: Internet
Author: User
Tags install neo4j neo4j

----Install neo4j----Install Oracle JDK 7, download neo4j-community, enter bin/neo4j start, open http://localhost:7474, and enter neo4j Browser. ----first knowledge of neo4j----
  • neo4j Browser is a web-based shell environment that you can apply cypher to interact with graph database.
  • Neo4j Browser is composed of editor, Stream and sidebar,editor for input, change behavior Shift&enter, execute as Ctrl&enter,stream for output, consisting of a result frame,Sidebar for Functional panels (function panel), providing configuration, templates, and help.
  • There are three useful cypher instructions,: Help to assist,: history to view a list of histories,: Clear to empty the stream.
  • Graph Database contains three concepts of node,relationship(relationship) and Property (attribute), in addition to a the concept of a label (label).
  • Cypheris Neo4j's graph query Language, which provides sql-like clause, here is an example of friends:
    --Note: () Node,ee is a variable, person is label,{} is the property list. CREATE(ee:person{name: "Emil", from: "Sweden", Kclout: About})--2--Note: Match matches, where is conditional, return is returned. MATCH (Ee:person)WHEREEe.name="Emil"RETURNee;--3--Comment:-[:]-> is the direction of relationship, knows is the name of relationship, {} is the property list. CREATE(Js:person {name: "Johan", from: "Sweden", Learn: "surfing"}), (Ir:person {name: "Ian", from: "England", Title: "Author"}), (Rvb:person {name: "Rik", from: "Belgium", Pet: "Orval"}), (Ally:person {name: "Allison", from: "California", Hobby: "Surfing"}), (EE)-[: KNOWS {since:2001}] -(JS), (EE)-[: KNOWS {rating:5}] -(IR), (JS)-[: KNOWS] -(IR), (JS)-[: KNOWS] -(RVB), (IR)-[: KNOWS] -(JS), (IR)-[: KNOWS] -(ally), (RVB)-[: KNOWS] -(ally)--4--Note:-[:]-is relationship bidirectional. MATCH (Ee:person)-[: KNOWS]-(Friends)WHEREEe.name="Emil"RETURNEe,friends--5--Note: () to ignore node,distinct to prevent more than one path matching. MATCH (Js:person)-[: KNOWS]-()-[: KNOWS]-(surfer)WHEREJs.name="Johan" andSurfer.hobby="Surfing"RETURN DISTINCTSurfer
----NEO4J Manual----

NEO4J Study Notes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.