)-[:acted_in]->(movie)
WHERE Tom.name="Tom Hanks" and
kevin.name="Kevin Bacon "
RETURN DISTINCT movie; 6 Cluster operations Count (x)//count the number of occurrences
//get the lowest value
//get the highest value
c6>//Get The average of a numeric value
//Sum of Values
//Collect all the values to an Collection eq MATCH (A:person)-[:acted_in]->(m)
RETURN a.name, collect (m.title); Eq2 MATCH (A:person)-[:acted_in]->(m)
RETURN A.name, COUNT (m)
ORDER by Count (m) DESC
Ten; Query we
"})
CREATE (Me)-[:reviewed {rating:summary:" Tragic character movie"}]-> (movie); 4merge: If this side is not present, increase the relationship: MATCH (Clint:person), (Mystic:movie)
WHERE clint.name="Clint Eastwood" and mystic.title="mystic River "
MERGE (Clint)-[:D irected]->(mystic)
RETURN Clint, mystic; A more complicated example: Increased understanding knows relationship: A film actor and actor, actor or director, or director and Director may know: MATCH (a)-[:acted_in|:D
Hanks"}) RETURN Tom;4 Path: transitive relationshipFind out which actor is in the movie, and the director diagram of the film:MATCH (actor)-[:acted_in]-> (movie) (director) RETURN Actor.name, Movie.title, Director.name;Another notation for the above statement:MATCH (actor)-[:acted_in]->(movie), (director) RETURN Actor.name, Movie.title, director.name; One more equivalent notation:MATCH (actor)-[:acted_in]-> ( Director)-[:D irected]->(movie) RETURN Actor.name, Movie.title, director.
vertex layers such as 'test.
curl -d "layer=test" http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/addSimplePointLayer
3:
Figure 3 add a vertex Layer
You can see the attributes of the data formation, including the layer class, layer name, geometric encoding type, and creation time. Then add three vertices in Well-Konw text format
# Creating three points from Well-known text formatcurl -v http://localhost:7474/db/data/ext/SpatialPlugin/
://github.com/neo4j/spatial.gitcd ./spatialmvn clean package -DskipTests
Decompress the file, copy all the jar packages to the lib folder of neo4j, and restart the neo4j server.2.2 Neo4j Server spatial operations
The curl [20] tool can be used to read and write spatial data to Neo4j in the command line, including query, layer creation, and point creation. These operations are performed on Graph databases in JSON format using the http protocol.
curl http://localhost:7474/db/data/
The overall info
1/** 2 * use cypherparser language 3 * @ author 4 * @ since 2014-8-4 3:22:25 5 */6 Public void usercypherparser () {7 // execute a cypher query 8 graphdatabaseservice graphdb = new graphdatabasefactory (). newembeddeddatabase ("DB/music. DB "); 9 try (transaction Tx = graphdb. begintx () {10/* API Org. neo4j. cypher. javacompat. executionengine: To run a cypher query, use this class. 11 executionengine (gra
support for the Windows platform. The latest version of MongoDB is 1.6.0, which is currently used by many large Web sites. For more information about MongoDB Windows, see here. The corresponding version can be downloaded from here.
Sones GraphDB
Sones GraphDB is an enterprise graphics data storage engine. It is developed in C # And is open-source. It can be downloaded for non-commercial purposes for free.
, records the relationship of all file system images to each other through GRAPHDB. Graph's schema 4.3.
Figure 4.3 Graph Schema
Among them, Graphdb is a small graph database built on SQLite, which realizes the naming of nodes and the records of the relationship between nodes. It only implements a small subset of the majority of the graph databases, but provides a simple interface to repre
acquires a container image file, it must access the Docker hub via the internet At the same time, Docker also allows users to build local private Docker Registry, which ensures that the capture of the container image is completed.4.4 GraphGraph plays the custodian of the downloaded container image in the Docker architecture and the record of the relationship between the downloaded container images. On the one hand, graph stores the local file system image with version information and, on the ot
;
Import Org.neo4j.graphdb.RelationshipType;
Import org.neo4j.graphdb.Transaction;
Import Org.neo4j.graphdb.factory.GraphDatabaseFactory;
Import Org.neo4j.io.fs.FileUtils; public class Test {public enum Reltypes implements relationshiptype{KNOWS} private static void R Egistershutdownhook (Final Graphdatabaseservice graphdb) {//registers a shutdown hook for the neo4j Instanc e so this it//shuts nicely when the VM exits (even if you "ctrl-c" the//runni
","Mongodb://master:20000,slave1:20000,slave2:20000/yang.relation2") Mongoconfig.set ("Mongo.input.split_size"," the")//size of inputMongoconfig.set ("Mongo.input.split.read_shard_chunks","true")//Read ShardsMongoconfig.set ("mongo.input.fields{\" srcid\ ": \" 1\ ", \" dstid\ ": \" 1\ "}")//Read only the column you need to read 1 to read out, 0 means that does not need to resemble MongoDB inside the projecttionMongoconfig.set ("Mongo.input.query","{\" dstid\ ": {\" $gt \ ": \" 0\ "}}")ValReadFil
NEO4J connection Java currently has embedded, JDBC, and rest APIs.Embedded: Using the Lib package in the neo4j download package lib (for Windows, not recommended to download the EXE version, because does not contain the code required LIB package)To create nodes and relationships:FinalString Db_path = "E:/neo4jdb";//Database PathGraphdatabaseservice graphdb =NewGraphdatabasefactory (). Newembeddeddatabase (Db_path);//more time-consuming connectionsTran
represents a graph, to gracefully render any type of data in a very convenient manner. Survival database now generally has 3 classes,neo4j database,graphdb Survival database,orientdb, Survival database query will mimic the traversal of the graph to find, through friends to find friends, and finally find a goal. nosql 4 Span style= "Font-family:times New Roman" >2 l.z algorithm series, now it should have been many versions of it, is based on th
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.