"Neo4j Tutorial"의 두 판 사이의 차이

hiblue
이동: 둘러보기, 검색
(Cypher, The Graph Query Language)
(Cypher, The Graph Query Language)
29번째 줄: 29번째 줄:
 
==Cypher, The Graph Query Language==
 
==Cypher, The Graph Query Language==
 
[[file:cypher_model.JPG|800px]]
 
[[file:cypher_model.JPG|800px]]
*
+
*SQL과 SPARQL의 패턴에서 영향을 받음.
 +
*[http://dh.aks.ac.kr:7474/browser/ Neo4j 샘플:워커힐 프로젝트]
 +
 
 +
클래스 Actor만 보여라 : match (n:Actor) return n

2018년 1월 17일 (수) 01:33 판

Neo4j 소개

  • Neo4j is the world’s leading graph database.
    그래프 데이터 베이스
  • Cypher, The Graph Query Language를 이용

Neo4j의 기본구조

  • The Labeled Property Graph Model을 기본 데이터 구조로 가짐.

Neo4j model.JPG

노드Nodes

  • 데이터 개체
    Nodes are the main data elements
  • 관계로 다른 노드들과 연결
    Nodes are connected to other nodes via relationships
  • 하나 이상의 속성을 지님
    Nodes can have one or more properties (i.e., attributes stored as key/value pairs)
  • 하나 이상의 라벨을 지님
    Nodes have one or more labels that describes its role in the graph

관계Relationships

  • 두 개의 노드를 연결
    Relationships connect two nodes
  • 직접적으로 연결
    Relationships are directional
  • 하나의 노드가 여러 개의 관계, 재귀적인 관계도 가질 수 있음
    Nodes can have multiple, even recursive relationships
  • 관계는 하나 이상의 속성을 가진다
    Relationships can have one or more properties (i.e., attributes stored as key/value pairs)

속성Properties

  • 문자로 정의된 값
    Properties are named values where the name (or key) is a string
  • 색인화되고, 제한될 수 있다.
    Properties can be indexed and constrained
  • 다양한 속성으로 복합적인 색인을 만들 수 있다
    Composite indexes can be created from multiple properties

라벨Labels

  • 노드를 묶는 단위
    Labels are used to group nodes into sets
  • 하나의 노드는 여러개의 라벨을 가질 수 있다
    A node may have multiple labels
  • 그래프에서 노드를 더 잘 찾을 수 있도록 색인화된다
    Labels are indexed to accelerate finding nodes in the graph
  • 기초 라벨 색인은 속도에 최적화되어 있다
    Native label indexes are optimized for speed

Cypher, The Graph Query Language

Cypher model.JPG

클래스 Actor만 보여라 : match (n:Actor) return n