Graph Database Graph Database This style of NOSQL
Graph Database
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'}
Neo 4 j Data Model Neo 4 j 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 (t 1: TEACHER, {Empid: '1', Lname: 'Nahum', Fname: 'Josh', Job: 'Instructor'}) ◦ CREATE (d 1: 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. Example: ◦ CREATE (t 1) - [: Works. For, {proportion: '1. 0'} ] -> (d 1)
More Neo 4 j Data Model Paths: ◦ 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'}) = [: Works. For ] -> (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.
What does the 'Neo' mean in Neo 4 j? 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")
What does the 'j' mean in Neo 4 j? 1. Jump 2. Justice 3. Jumanji 4. Java
Playing with the Neo 4 j Tutorial Download the Neo 4 j Community Edition and start the built-in tutorial.
- Slides: 7