Kaifeng Zhang & Yuheng Wang
Agenda
 Why NoSQL?
 NoSQL Overview
 MongoDB vs. Riak




5/18/2012            2
NoSQL History
 1998, Carlo Strozzi, “NoREL”
 2009, Eric Evans, “NoSQL”
 2011, UnQL, superset of SQL




            No SQL vs. Not Only SQL

5/18/2012                             3
Why NoSQL Happened
 Web scale
 Data changes over time
 NoSQL becomes commodity




5/18/2012                   4
NoSQL Features
 Not require fixed table schema
 Not use SQL as query language
 Usually avoid join operation
 Not give full ACID guarantees
 Distributed, fault-tolerant architecture




5/18/2012                                    5
Scenarios for NoSQL
 Performance and real-time nature over
  consistency
 High scalability
 Store and retrieve huge quantity of data
 Not require a relational model




5/18/2012                                    6
NoSQL Taxonomy
     Document Store
        Collections (Table)
        Document (Row)
 Key-value Store
 Graph
 Column Family




5/18/2012                      7
Some Concepts
 CAP Theorem
 Distribution Model
 ACID
 Eventual Consistency




5/18/2012                8
5/18/2012   9
5/18/2012   10
5/18/2012   11
Setup
            Mongo         Riak

 All major OS      • No official support
 Stable and          of Windows
  experimental      • Robust support of
                      Linux
                    • Nature cluster



5/18/2012                                   13
Tooling
            Mongo            Riak

• Cmd line tool         • Poor
• Web interface
• 3rd party solutions




5/18/2012                           14
Driver Support
            Mongo          Riak

• C/C++, Java,        • C/C++, Java
• Erlang              • Erlang
• PHP, Python,        • PHP, Python,
  Ruby                  Ruby
• Perl, Scala, .NET
• Node.js, JS

5/18/2012                              15
CRUD(.NET)
            Mongo          Riak

• Excellent drivers   • Corrugated Iron
  support             • RESTful API
• Straightforward




5/18/2012                                 16
Query Complexity
            Mongo        Riak

• Secondary index   • Corrugated Iron
• MapReduce in        query broken
  JavaScript        • RESTful API to
                      test




5/18/2012                               17
ID Generation
            Mongo         Riak

• Incremental       • No viable solution
  document field




5/18/2012                                  18

NoSQL Overview

  • 1.
    Kaifeng Zhang &Yuheng Wang
  • 2.
    Agenda  Why NoSQL? NoSQL Overview  MongoDB vs. Riak 5/18/2012 2
  • 3.
    NoSQL History  1998,Carlo Strozzi, “NoREL”  2009, Eric Evans, “NoSQL”  2011, UnQL, superset of SQL No SQL vs. Not Only SQL 5/18/2012 3
  • 4.
    Why NoSQL Happened Web scale  Data changes over time  NoSQL becomes commodity 5/18/2012 4
  • 5.
    NoSQL Features  Notrequire fixed table schema  Not use SQL as query language  Usually avoid join operation  Not give full ACID guarantees  Distributed, fault-tolerant architecture 5/18/2012 5
  • 6.
    Scenarios for NoSQL Performance and real-time nature over consistency  High scalability  Store and retrieve huge quantity of data  Not require a relational model 5/18/2012 6
  • 7.
    NoSQL Taxonomy  Document Store  Collections (Table)  Document (Row)  Key-value Store  Graph  Column Family 5/18/2012 7
  • 8.
    Some Concepts  CAPTheorem  Distribution Model  ACID  Eventual Consistency 5/18/2012 8
  • 9.
  • 10.
  • 11.
  • 13.
    Setup Mongo Riak  All major OS • No official support  Stable and of Windows experimental • Robust support of Linux • Nature cluster 5/18/2012 13
  • 14.
    Tooling Mongo Riak • Cmd line tool • Poor • Web interface • 3rd party solutions 5/18/2012 14
  • 15.
    Driver Support Mongo Riak • C/C++, Java, • C/C++, Java • Erlang • Erlang • PHP, Python, • PHP, Python, Ruby Ruby • Perl, Scala, .NET • Node.js, JS 5/18/2012 15
  • 16.
    CRUD(.NET) Mongo Riak • Excellent drivers • Corrugated Iron support • RESTful API • Straightforward 5/18/2012 16
  • 17.
    Query Complexity Mongo Riak • Secondary index • Corrugated Iron • MapReduce in query broken JavaScript • RESTful API to test 5/18/2012 17
  • 18.
    ID Generation Mongo Riak • Incremental • No viable solution document field 5/18/2012 18

Editor's Notes

  • #5 Typical modern relational database show poor performance on data-intensive app: - indexing a large number of document - serving pages on high-traffic websites - delivering streaming media