Upload
farzin-bagheri
View
222
Download
0
Embed Size (px)
Citation preview
Table of Contents
Database
Relational Databases
NOSQL
● NOSQL Categories
Neo4j● Cypher● Example● Usage
Relational Database
● Relational Database : SQL Server , MySQL , Oracle,...● Concepts : Table , Row, Column,…
But,is it enough?
4 Type of NoSQL Databases :
● Key-Value : ○ Data mode : Key and value! for example : Set A 20○ Example : Redis , Riak , Dynamodb (Amazon) ,...○ Use Case : Task Queue (Celery) , Cashing ,...
● Document : ○ Data model : collection of Key - value : { FName : “Farzin” , LName : ”Bagheri” , City : “Khoy” }
○ Example : MongoDB , couchDB○ Use Case : Inserting a Log Record (Nginx or Apache)
● Column Family or BigTable : ○ Data model : big table! each rows has their own Schema.○ Example : Hbase , Cassandra○ Use Case : like Relational Databases but more flexible
● Graph Databases ○ Data mode : Node (Vertices) , Relationship (Edge) and Properties○ Example : Neo4j , OrientDB , ArangoDB ,... ○ Use Case : Social network , Recommendation , Graph-Based Search,...
4 Type of NoSQL Databases :
● Key-Value : ○ Data mode : Key and value! for example : Set A 20○ Example : Redis , Riak , Dynamodb (Amazon) ,...○ Use Case : Task Queue (Celery) , Cashing ,...
● Document : ○ Data model : collection of Key - value : { FName : “Farzin” , LName : ”Bagheri” , City : “Khoy” }
○ Example : MongoDB , couchDB○ Use Case : Inserting a Log Record (Nginx or Apache)
● Column Family or BigTable : ○ Data model : big table! each rows has their own Schema.○ Example : Hbase , Cassandra○ Use Case : like Relational Databases but more flexible
● Graph Databases ○ Data mode : Node (Vertices) , Relationship (Edge) and Properties○ Example : Neo4j , OrientDB , ArangoDB ,... ○ Use Case : Social network , Recommendation , Graph-Based Search,...
4 Type of NoSQL Databases :
● Key-Value : ○ Data mode : Key and value! for example : Set A 20○ Example : Redis , Riak , Dynamodb (Amazon) ,...○ Use Case : Task Queue (Celery) , Cashing ,...
● Document : ○ Data model : collection of Key - value : { FName : “Farzin” , LName : ”Bagheri” , City : “Khoy” }
○ Example : MongoDB , couchDB○ Use Case : Inserting a Log Record (Nginx or Apache)
● Column Family or BigTable : ○ Data model : big table! each rows has their own Schema.○ Example : Hbase , Cassandra○ Use Case : like Relational Databases but more flexible
● Graph Databases○ Data mode : Node (Vertices) , Relationship (Edge) and Properties○ Example : Neo4j , OrientDB , ArangoDB ,... ○ Use Case : Social network , Recommendation , Graph-Based Search,...
4 Type of NoSQL Databases :
● Key-Value : ○ Data mode : Key and value! for example : Set A 20○ Example : Redis , Riak , Dynamodb (Amazon) ,...○ Use Case : Task Queue (Celery) , Cashing ,...
● Document : ○ Data model : collection of Key - value : { FName : “Farzin” , LName : ”Bagheri” , City : “Khoy” }
○ Example : MongoDB , couchDB○ Use Case : Inserting a Log Record (Nginx or Apache)
● Column Family or BigTable : ○ Data model : big table! each rows has their own Schema.○ Example : Hbase , Cassandra○ Use Case : like Relational Databases but more flexible
● Graph Databases○ Data mode : Node (Vertices) , Relationship (Edge) and Properties○ Example : Neo4j , OrientDB , ArangoDB ,... ○ Use Case : Social network , Recommendation , Graph-Based Search,...
Creating other Nodes
CREATE ( :Person { Fname : "Arash" , Lname : "Milani" } ) ,
( :Person { Fname : "Masoud" , Lname : "Sadri" } )
Getting All
MATCH ( p:person { name:"B" } ) -[ :Has ]-> ( o1:Order )-[ :include ]->( b:Book )
<-[ :include ] - ( o2:Order )
-[:include]-> ( otherBook )
where not o1-[:include]->(otherBook)
return distinct ( otherBook.name)
Usage
● Social network● Network Analysis● Recommendation systems● Fraud Detection
● Path Finding (Shortest path , simple path ,...)● Digital Marketing