NoSQL
Graph DataBase(Neo4j)
Yufei Liu(16441834)
Agenda
-
Why & What's NoSQL?
-
NoSQL vs RDBMS
-
Types of NoSQL
-
Graph DataBase-Neo4j on Docker and Java
Why & What's NoSQL?

Why & What's NoSQL?
- NoSQL isn't truly new, What's new are the challenges introduced by Big Data
- 4V of Big Data(velocity, volume, variety and veracity )

A node is a networked computer that offers some kind of service (usually a computer service), local storage, and access to a much larger distributed data or file store.
Talking the NoSQL talk
Node

1.A cluster is a set of nodes that constitute a single unit.
2.Depending on the database, a cluster can be a set of nodes on a particular rack in the data center or nodes that are in the same row as other nodes
Talking the NoSQL talk
Cluster
Sharding

1.Sharding (also called horizontal partitioning) involves partitioning the database on the value of some field.
2.This is done by some NoSQL databases to equalize the amount of data between nodes.
3.You can do sharding directly by hashing the key value or by load balancing directing each node to redistribute its data to another, less heavily loaded node
Talking the NoSQL talk
Talking the NoSQL talk
Replication

1.Replication is the mechanism that provides database availability.
2.Portions of a database are written to multiple nodes so that if one node fails, another node contains a replica of the failed node’s data.
ACID

Talking the NoSQL talk
NoSQL vs RDBMS
- Terms

4 Types of NoSql
4 Most typical NoSQL Product in their field

Key-value(Redis)

Document(MongoDB)

Column (Cassandra)

Graph (Neo4j)



RDBMS vs Grap Modeling

Table-First vs Relation-First

RDBMS vs Grap Query


Neo4j on Docker
- Get Docker Image from https://hub.docker.com/_/neo4j/
2. Start from the image "docker run -d --publish=7474:7474 --publish=7687:7687 --volume=$HOME/neo4j/data:/data neo4j"
3. Access Neo4j from local browser http://localhost:7474/browser/
4. :Play concepts & :Play movie-graph
Neo4j in Java
Demo Code from https://github.com/neo4j-examples/neo4j-ogm-university