Download presentation
Presentation is loading. Please wait.
1
NoSQL Not Only SQL University of Kurdistan Faculty of Engineering
Department of Computer & IT Engineering NoSQL Not Only SQL Asoo Mafakheri Moslem Parvizpour
2
Contents Introduction Comparison Challenges Property Application
CAP Theorem Categories Implementation 2/2/2019 NoSQL
3
Introduction NOSQL stands for History Not only SQL No Relational
No RDBMS Not Use SQL Carlo Strozzi Eric Evans History 1998: Carlo Strozzi : Neo4j ,… 2009: Eric Evans 2/2/2019 NoSQL
4
Popularity 2/2/2019 NoSQL
5
Question? NoSQL 2/2/2019 NoSQL
6
Challenges with traditional RDBMS
Not optimized for horizontal scaling out Scalability Vertically (or Scale Up) Horizontally (or Scale Out) High velocity of data ingestion Schema-Less data Document database Cost ? 2/2/2019 NOSQL
7
Property Non Relational Schema Free Distributed Web Scale
Design to store Volome Varied BASE Basically Available Soft State Eventually Consistent ACID Atomicity Consistency Isolation Durability 2/2/2019 NoSQL
8
Application × × Company SQL NOSQL Google BigTable, LevelDB Amazon
Dynamo Facebook Cassandra Twitter HBase, FlockDB, Cassandra LinkedIn Voldemort Netflix SimpleDB, HBase, Cassandra Company SQL NOSQL Google × Amazon Facebook Twitter LinkedIn Netflix Company SQL NOSQL Google Amazon Facebook Twitter LinkedIn Netflix 2/2/2019 NoSQL
9
Question? 30% 70% SQL NoSQL 2/2/2019 NoSQL
10
CAP Theorem Availability Consistency Partition Tolerance Pick 2
همهی کاربران همیشه میتوانند درج کنند و بخوانند. دادههایی که نمایش داده میشوند، برای تمام کاربران یکسان میباشند. سیستم روی سرورهای مختلف در مکانهای جغرافیایی دور از هم کار میکند. Pick 2 2/2/2019 NoSQL
11
CAP Theorem A C P Pick 2 CA AP CP RDBMSs: Oracle, Postgre) (MySQL,
SQL Server, Vertica AP Dynamo Voldemort Cassandra SimpleDB CouchDB Riak CP BigTable HyperTable HBase MongoDB Terrastore Redis Pick 2 2/2/2019 NoSQL
12
Categories DBMS SQL(Relational DBMS) NoSQL Key-value Document-Based
Column-Based Graph-Based 2/2/2019 NoSQL
13
Categories NOSQL Flock DB Column Key-Value Document Graph Dynamo
Voldemort Flock DB 2/2/2019 NoSQL
14
Categories NOSQL Graph Column Key-Value Document HyperTable Dynamo
Neo4j Column HBase Key-Value Voldemort Dynamo Document CouchDB MongoDB NOSQL HyperTable Cassandra Redis FlockDB Riak name Ali Key Value age 68 OrientDB 2/2/2019 NoSQL
15
Categories NOSQL Graph Column Key-Value Document HyperTable Dynamo
Neo4j Column HBase Key-Value Voldemort Dynamo Document CouchDB MongoDB NOSQL HyperTable Cassandra Redis FlockDB Riak <Document> { { "Title": "", "Author": "", "Date": “2012" } } Key OrientDB 2/2/2019 NoSQL
16
Comment 1 2 Title Articles 3 4 Relational Title 1 Comment Document
2/2/2019 NoSQL
17
Categories NOSQL Graph Column Key-Value Document Neo4j HBase Voldemort
Dynamo Document CouchDB MongoDB NOSQL HyperTable Cassandra Redis FlockDB Riak 101 Name Age Reza 39 104 Name Tel Ali OrientDB 2/2/2019 NoSQL
18
Categories NOSQL Graph Column Key-Value Document HyperTable Dynamo
Neo4j Column HBase Key-Value Voldemort Dynamo Document CouchDB MongoDB NOSQL HyperTable Cassandra Redis FlockDB Riak OrientDB 2/2/2019 NoSQL
19
CAP Theorem A C P Pick 2 CA AP CP Data Models: RDBMSs: Oracle,
Postgre) (MySQL, SQL Server, Vertica AP Dynamo Voldemort Cassandra SimpleDB CouchDB Riak CP BigTable HyperTable H Base MongoDB Terrastore Redis Pick 2 Data Models: Relational Key-Value Column-Oriented Document-Oriented 2/2/2019 NoSQL
20
CAP Theorem A C P Pick 2 CA AP CP Data Models: RDBMSs: Oracle,
Postgre) (MySQL, SQL Server, Vertica AP Dynamo Voldemort Cassandra SimpleDB CouchDB Riak A Pick 2 C P CP BigTable HyperTable H Base MongoDB Terrastore Redis Data Models: Relational Key-Value Column-Oriented Document-Oriented 2/2/2019 NoSQL
21
Rated different categories
Functionality Complexity Flexibility Scalability Performance Variable (none) none high Key-value minimal low moderate High Column Variable (low) Variable (high) Document Graph theory variable Graph Relational algebra Relational 2/2/2019 NoSQL
22
Question? Are you Google? What about Facebook?
Do you have a social Graph? Are you twitter? Embedded? Bad Network? Device cluster? Is your data Structured? Do you need high Availability? Do you need Web Scale? No you don’t? RDBMS HBase Mongo Couch Riak FlockDB Neo4j Yes No 2/2/2019 NoSQL
23
ORM vs ODM Object-relational mapping (ORM)
Converting data between Provide CRUD operation Object-document mapping (ODM) 2/2/2019 NoSQL
24
Differences RDBMS vs NoSQL (MongoDB) Data base >> Table,View
Collection Row Document(BSON) Column Field Index Join Embedded Document Foreign Key Reference Partition Shard 2/2/2019 NoSQL
25
JSON JavaScript Object Notation (JSON)
A lightweight text based data-interchange format Completely language independent A subset of JavaScript Not a document format Using for Data Modeling in NoSQL document-based databases CouchDB OrientDB MongoDB 2/2/2019 NoSQL
26
JSON JSON XML { "Book": { "Title": "A Man Called Ove", "Author": "Fredrik Backman", "Date": “2012" }, { "Title": "Der Engel schwieg", "Author": "Heinrich Böll", "Date": “1992" } } <books> <book> <title>A Man Called Ove</title> <author>Fredrik Backman</author> <date>2012</date> </book> <title>Der Engel schwieg</title> <author>Heinrich Böll</author> <date>1992</date> </books> 2/2/2019 NoSQL
27
CouchDB CouchDB is easy to use Document-Based HTTP-Based REST API
Download from: 2/2/2019 NoSQL
28
CouchDB Futon Control Panel http://localhost:5984/_utils/ HTTP: cURL
2/2/2019 NoSQL
29
cURL Command line tool for transferring data with URLs Supports:
DICT, FILE, FTP, FTPS, Gopher, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, Telnet and TFTP. curl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload, proxies, HTTP/2, cookies, user+password authentication (Basic, Plain, Digest, CRAM-MD5, NTLM, Negotiate and Kerberos), file transfer resume, proxy tunneling and more. 2/2/2019 NoSQL
30
cURL Flags -X Flag -H Flag -d Flag -O Flag 2/2/2019 NoSQL
31
HTTP Request Verbs POST - upload file GET - reads records
PUT – creates & updates a record DELETE - deletes a record 2/2/2019 NoSQL
32
Create & Delete Database using cURL
Hello CouchDB Creating a Database Deleting a Database List of All Databases curl curl -X PUT curl -X DELETE curl -X GET 2/2/2019 NoSQL
33
Document CRUD using cURL
Creating a Document: curl -X PUT -d ' { document} ' Get a Document: curl -X GET Updating Documents: curl -X PUT -d '{ "field" : "value", "_rev" : "revision id" } Deleting Documents: curl -X DELETE 2/2/2019 NoSQL
34
Attaching Files using cURL
curl -vX PUT /filename?rev=document rev_id -H "Content-Type:type of the content" 2/2/2019 NoSQL
35
Reference 2/2/2019 NoSQL
36
Thank You
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.