Slide 6
Slide 6 text
Creating Relationships
CREATE (x)-[:REL_TYPE]->(y)
CREATE (x)<-[:REL_TYPE]-(y)
❖ Creating Relationship
➢ CREATE (word:WORD {text:’try’} ), (movie:MOVIE {name:’titanic’} )
CREATE (movie) - [:CONTAINS] -> (word)
❖ Creating Relationship with Match
➢ MATCH (word:WORD {text:’try’} ), (movie:MOVIE {name:’titanic’} )
CREATE (movie) - [:CONTAINS] -> (word)
❖ Creating Multiple Relationship
➢ MATCH (word:WORD {text:’try’} ), (movie:MOVIE {name:’titanic’} ), (user: USER{name:’juan’})
CREATE (user) - [:LIKES] -> (movie) - [:contains] -> (word)
RETURN user, movie, word