1 / 17

Neo4j

Neo4j. План. Cypher Создание Запросы Neo4j embedded in Java Немного о релизации ( Neo4j Internals) Native Graph Processing Native Graph Storage. Neo4j. Cypher : Создание .

nerice
Download Presentation

Neo4j

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Neo4j

  2. План • Cypher • Создание • Запросы • Neo4j embedded in Java • Немного о релизации (Neo4j Internals) • Native Graph Processing • Native Graph Storage

  3. Neo4j

  4. Cypher: Создание CREATE: Creates nodes and relationships.MERGE: Creates nodes uniquely.CREATE UNIQUE: Creates relationships uniquely.DELETE: Removes nodes, relationships.SET: Updates properties and labels.REMOVE: Removes properties and labels.FOREACH: Performs updating actions once per element in a list.WITH: Divides a query into multiple, distinct parts and passes results from one to the next.

  5. Cypher: запросы MATCH: Matches the given graph pattern in the graph data.WHERE: Filters using predicates or anchors pattern elements.RETURN: Returns and projects result data, also handles aggregation.ORDER BY: Sorts the query result.SKIP/LIMIT: Paginates the query result.

  6. Paths • ()-[]->() • ()<-[]-() • ()-[:RelationshipType*N]->() • ()-[]->()<-[]-()

  7. Aggregates count(x) Count the number of occurrencesmin(x) Get the lowest valuemax(x) Get the highest valueavg(x) Get the average of a numeric valuesum(x) Sum up valuescollect(x) Collect all the values into an collection

  8. Native Graph Storage • Store files: • Nodes • Relationships • Properties • etc • Fixed-sized records (node 9 bytes, rel 33 bytes,…) -> быстрый поиск по ID: • node {id:90} - > в store file его запись начинается с 900 байта - > поиск нода за O(1)

  9. Движение по store files Node (9 bytes)

  10. Native Graph Processing • Index-free adjacency

  11. O(log n)

  12. O(1)

  13. Источники • http://www.neo4j.org/ • http://docs.neo4j.org/chunked/milestone/ • Ian Robinson, Jim Webber, and Emil EifrémGraph DatabasesThe Definitive Book onGraph Databases

More Related