SlideShare a Scribd company logo
Привет!
NoSQL
   &
CouchDB
      Епифанов Иван
SQL
SQL
  MySQL
PostgreSQL
  Oracle
  MSSQL
NoSQL
Key-Value:
       Redis
    Membased
     Tarantool
Tokyo cabinet (DBM)
key -> ?????
session_id =>
{
  “serialized”:”data”
}
GRAPH:
     Neo4j
 InfiniteGraph
Вася
       ID

            ID


                  ID
                       ID

Петя   ID



       ID

                 Коля
Document-oriented:
     MongoDB
     CouchDB
{
    "_id": "5b8c0893e90316c578af172e073ed132",
    "type": "speech",
    "title": "Hello NoSQL",
    "author" "iSage",
    "text": "$this",
    "tags": [ "nosql",
               "mongo",
               "couch",
               "whisky",
               "boring"
            ],
    "listeners": [    {
                          "name": "Dmitry",
                          "position": "manager"
                      },
                      {
                          "name": "Sergey",
                          "position": "team lead"
                      },
                      ...
                  ]
}
MapReduce!
[
    document, => map()
    document, => map()
    document, => map()
    document, => map()
]
map = function(document) {
   for (tag in document.tags)
   {
      emit(tag, 1 );
   }
};
[
    “tagname1”: 1,
    “tagname2”: 1,
    “tagname3”: 1,
    ...
    “tagnameN”: 1
]
reduce = function( key , value ) {
   var total = 0;
   for (var i = 0;i < values.length;i++) {
      total += values[i];
   }
   return total;
};
[
    “tagname1”: 56,
    “tagname2”: 42,
    “tagname3”: 13,
    ...
    “tagnameN”: 4
]
36




                           21




    15             5                16




2        13   4        1        5        11
Couchdb
CouchDB
CouchDB
 C + Erlang
CouchDB
 C + Erlang
   ACID
CouchDB
 C + Erlang
    ACID
master-master
CouchDB
 C + Erlang
    ACID
master-master
   JSON
CouchDB
 C + Erlang
    ACID
master-master
   JSON
   HTTP
CouchDB
 C + Erlang
    ACID
master-master
   JSON
   HTTP
  RESTful
POST http://couchdb/database/
{
  “name”: “oh hai”,
  “text”: “well, hello there”
}



<= 5b8c0893e90316c578af172e073ed132
GET
http://couchdb/database/5b8c0893e90316c578af
172e073ed132

<=
{
  “_id”: “5b8c0893e90316c578af172e073ed132”
  “name”: “oh hai”,
  “text”: “well, hello there”
}
PUT
http://couchdb/database/5b8c0893e90316c578af
172e073ed132
{
   “name”: “oh hai”,
   “text”: “well, hello there!”
}



<= 5b8c0893e90316c578af172e073ed132
DELETE
http://couchdb/database/5b8c0893e90316c578af
172e073ed132


<= 200 OK
{
    "_id": "_design/users",
    "language": "javascript",
    "views": {
      "by_mail": {
        "map":
          "function(doc) {
            if (doc.type=='user')
              emit(doc.email,doc);
          }"
      },
      "by_oauth2_id": {
        ...
      },
      "by_oauth1_id": {
        ...
      }
    }
}
+ Прост
+ Понятен
+ JSON
+ Гибкая авторизация
+ ACID
+ full master replication, sharding
+ HTTP/Erlang Server
+ cp -r /my/database/ ~/couch_backups/
+ no structure – no versions!
+ Прост
+ Понятен
+ JSON
+ Гибкая авторизация
+ ACID
+ full master replication, sharding
+ HTTP/Erlang Server
+ cp -r /my/database/ ~/couch_backups/
+ no structure – no versions!

- медленнее mongo, redis, etc.
- http = slow
- MapReduce(MapReduce(MapReduce()))
BONUS
Couchdb
??????

More Related Content

PDF
Groovy ネタ NGK 忘年会2009 ライトニングトーク
PDF
はじめてのGroovy
PDF
MongoDB a document store that won't let you down.
KEY
PostgreSQLからMongoDBへ
PPTX
ORM in Go. Internals, tips & tricks
TXT
Fcontratos
PDF
Productive Programming in Groovy
PDF
San Francisco Java User Group
Groovy ネタ NGK 忘年会2009 ライトニングトーク
はじめてのGroovy
MongoDB a document store that won't let you down.
PostgreSQLからMongoDBへ
ORM in Go. Internals, tips & tricks
Fcontratos
Productive Programming in Groovy
San Francisco Java User Group

What's hot (19)

PDF
高性能かつスケールアウト可能なHPCクラウド AIST Super Green Cloud
PDF
The Ring programming language version 1.5.4 book - Part 40 of 185
KEY
MongoDB
PPTX
Grails queries
PDF
PuppetCamp SEA @ Blk 71 - Nagios in under 10 mins with Puppet
PDF
PuppetCamp SEA @ Blk 71 - Nagios in under 10 mins with Puppet
PDF
Redis the better NoSQL
PDF
Introduction to jRuby
PDF
CGI.pm - 3ло?!
TXT
Tipo virus espia con esto aprenderan a espiar a personas etc jeropas de mrd :v
PDF
名古屋SGGAE/J勉強会 Grails、Gaelykでハンズオン
PDF
Realm to Json & Royal
PDF
Trimming The Cruft
PDF
Python and rust 2018 pythonkorea jihun
PDF
Testing Web Applications with GEB
PDF
Great BigTable and my toys
PPTX
Nancy & Simple.Data from ProgNet 11
KEY
C# Development (Sam Corder)
PDF
RESTing with the new Yandex.Disk API, Clemens Аuer
高性能かつスケールアウト可能なHPCクラウド AIST Super Green Cloud
The Ring programming language version 1.5.4 book - Part 40 of 185
MongoDB
Grails queries
PuppetCamp SEA @ Blk 71 - Nagios in under 10 mins with Puppet
PuppetCamp SEA @ Blk 71 - Nagios in under 10 mins with Puppet
Redis the better NoSQL
Introduction to jRuby
CGI.pm - 3ло?!
Tipo virus espia con esto aprenderan a espiar a personas etc jeropas de mrd :v
名古屋SGGAE/J勉強会 Grails、Gaelykでハンズオン
Realm to Json & Royal
Trimming The Cruft
Python and rust 2018 pythonkorea jihun
Testing Web Applications with GEB
Great BigTable and my toys
Nancy & Simple.Data from ProgNet 11
C# Development (Sam Corder)
RESTing with the new Yandex.Disk API, Clemens Аuer
Ad

Viewers also liked (12)

PDF
2006 scale development and construct clarification of servant leadership
PDF
2002 servant leadership it s origin, development, and application in organiza...
PPT
ประวัติส่วนตัว
PDF
2005 dissertation-servant leadership theory-application of the construct of s...
PDF
ศึกษาการพัฒนาภาวะผู้นำตามแนวพระพุทธศาสนา
PPTX
Servant leadership
PPTX
Servant leadership
PDF
การสร้างเครื่องมือวัดทักษะหรือการปฏิบัติ
 
PPTX
Servant leadership
PPTX
Servant leadership presentation
PDF
Lead Humbly: The Path of Servant Leadership
PPTX
Seven Pillars Of Servant Leadership (Leader Serve, Model)
2006 scale development and construct clarification of servant leadership
2002 servant leadership it s origin, development, and application in organiza...
ประวัติส่วนตัว
2005 dissertation-servant leadership theory-application of the construct of s...
ศึกษาการพัฒนาภาวะผู้นำตามแนวพระพุทธศาสนา
Servant leadership
Servant leadership
การสร้างเครื่องมือวัดทักษะหรือการปฏิบัติ
 
Servant leadership
Servant leadership presentation
Lead Humbly: The Path of Servant Leadership
Seven Pillars Of Servant Leadership (Leader Serve, Model)
Ad

Similar to Couchdb (20)

PDF
CouchDB Mobile - From Couch to 5K in 1 Hour
PDF
CouchDB in The Room
KEY
An introduction to CouchDB
KEY
Couchdb: No SQL? No driver? No problem
PDF
Advanced CouchDB Rotterdam.rb July 2010
PDF
Vidoop CouchDB Talk
KEY
Perform Like a frAg Star
PPT
No sql Database
PDF
Advanced CouchDB
PDF
Advanced CouchDB phpday.it
PDF
CouchDB
PPTX
No sql solutions - 공개용
PDF
Couchdb
PPT
NoSQL - "simple" web monitoring
KEY
MongoDB - Ruby document store that doesn't rhyme with ouch
ODP
Intro to CouchDB
PPTX
Introduction to NOSQL And MongoDB
KEY
Mongodb intro
PDF
CouchDB at JAOO Århus 2009
PDF
Hands on with Ruby & MongoDB
CouchDB Mobile - From Couch to 5K in 1 Hour
CouchDB in The Room
An introduction to CouchDB
Couchdb: No SQL? No driver? No problem
Advanced CouchDB Rotterdam.rb July 2010
Vidoop CouchDB Talk
Perform Like a frAg Star
No sql Database
Advanced CouchDB
Advanced CouchDB phpday.it
CouchDB
No sql solutions - 공개용
Couchdb
NoSQL - "simple" web monitoring
MongoDB - Ruby document store that doesn't rhyme with ouch
Intro to CouchDB
Introduction to NOSQL And MongoDB
Mongodb intro
CouchDB at JAOO Århus 2009
Hands on with Ruby & MongoDB

Recently uploaded (20)

PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Mushroom cultivation and it's methods.pdf
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PDF
project resource management chapter-09.pdf
PDF
WOOl fibre morphology and structure.pdf for textiles
PDF
Hybrid model detection and classification of lung cancer
PPTX
A Presentation on Artificial Intelligence
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
DP Operators-handbook-extract for the Mautical Institute
PPTX
Tartificialntelligence_presentation.pptx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
Getting Started with Data Integration: FME Form 101
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PPTX
Chapter 5: Probability Theory and Statistics
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
Group 1 Presentation -Planning and Decision Making .pptx
Mushroom cultivation and it's methods.pdf
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
project resource management chapter-09.pdf
WOOl fibre morphology and structure.pdf for textiles
Hybrid model detection and classification of lung cancer
A Presentation on Artificial Intelligence
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
Univ-Connecticut-ChatGPT-Presentaion.pdf
DP Operators-handbook-extract for the Mautical Institute
Tartificialntelligence_presentation.pptx
Digital-Transformation-Roadmap-for-Companies.pptx
SOPHOS-XG Firewall Administrator PPT.pptx
Getting Started with Data Integration: FME Form 101
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
NewMind AI Weekly Chronicles - August'25-Week II
Chapter 5: Probability Theory and Statistics
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf

Couchdb