Download presentation
Presentation is loading. Please wait.
1
Graph Database
2
Graph Database This style of NOSQL database uses the concepts of nodes and relationships. Both nodes and relationships can have properties which store the associated data items. Nodes can also have labels. Nodes with the same label are grouped into a collection and can be accessed as a group. A Node can have zero or more labels. Each relationship has a start node and end node (hence they are directional). Each relationship can have a relationship type, which is similar to a label in that it can be used to group relationships together. Properties are specified via a map pattern, one or more (name: value) pairs enclosed in curly brackets. Example: {Fname: 'John', Lname:'Cena'}
3
Neo4j Data Model Neo4j is the most commonly used graphing database.
It use a high-level declarative language named Cypher to interact with it. When a node is created, the labels associated with that node can be specified. Properties can be included as well. Example: CREATE (t1: TEACHER, {Empid: '1', Lname: 'Nahum', Fname: 'Josh', Job: 'Instructor'}) CREATE (d1: DEPARTMENT, {Dname: 'Computer Science', Dshort: 'CSE'}) Relationships are specified using arrows, relationship types, and properties. Although relationships are directional, they can be traversed in either direction. CREATE (t1) - [: WorksFor, {proportion: '1.0'} ] -> (d1)
4
More Neo4j Data Model Paths: Optional schema
A path is a traversal of the graph. A path is typically used as part of a query where the start node is specified and all of the end nodes that match a traversal pattern are returned. MATCH (t: TEACHER {Fname: 'Josh'}) = [: WorksFor ] -> (d) RETURN d.Dname Optional schema Schema for nodes and relationships are optional. But if provided they can enforce constraints on both nodes and relationships, as well as allow indices.
5
What does the 'Neo' mean in Neo4j?
1. New (It is a improvement over RDBMSs) 2. Not Every Object (It can handle queries with minimal accesses) 3. Near Earth Orbit (They are space nerds) 4. Neo (a.k.a. "The One")
6
What does the 'j' mean in Neo4j?
1. Jump 2. Justice 3. Jumanji 4. Java
7
Playing with the Neo4j Tutorial
Download the Neo4j Community Edition and start the built-in tutorial.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.