Introduction to NoSQL

Document Sample
Introduction to NoSQL Powered By Docstoc
					Introductiton to NoSQL
              What is NoSQL?
•   None-relational
•   Schema-free
•   Distributed
•   Modern
       CAP / Brewer's theorem
• It is impossible for a distributed computer
  system to simultaneously provide all 3
  guarantees (2 out of 3 at most?):
• 1) Consistency – all nodes see the same data
  at the same time
• 2) Availability – node failures do not prevent
  survivors from continuing to operation
• 3) Partition Tolerance – system continues to
  operate despite arbitrary message loss
               ACID compliancy
•   Atomicity : all or nothing state change
•   Consistency : one state to the next (roll back)
•   Isolation : clean / dirty data
•   Durability: protection from system failures
      Different type of NoSQL DBs
•   Wide Column Store / Column DB
•   Key Value Store / Tuple DB
•   Document DB
•   Object DB
•   XML DB
•   Graph DB
    Relational/Row vs Column Store
• 1,Smith,Joe,40000
• 2,Jones,Mary,50000
• 3,Johnson,Cathy,44000

•   1,2,3
•   Smith,Jones,Johnson
•   Joe,Mary,Cathy
•   40000,50000,44000
    Row Oriented DB Advantages
• Efficient when most or all columns in the row
  are needed (single disk seek)
• Relational mapping is more efficient hence
  most relational db are row oriented
• Structure integrity
     Why Column oriented DBs?
• Huge number of columns does not degrade
  performance
• Efficient with column base aggregate
  computations & modifications (1 seek per
  column)
• Jagged columns tables
• As CPU/Memory get faster, permanent
  storage trails on seek speed
               Column DBs
•   Google BigTable
•   Hadoop/Hbase
•   Cassandra
•   Amazon SimpleDB
           Row vs Document DBs
•   Id,Last,First,Age,Title
•   1,Smith,Joe,30,null
•   2,Jones,Mary,25,null
•   3,null,null,45,”Big Boss”

• {Id:1,Last:”Smith”,First:”Joe”,Age:30}
• {Id:2,Last:”Jones”,Fisrt:”Mary”,Age:25}
• {Id:3,Title:”Big Boss”,Age:45}
         Why Document DB?
• Direct mapping to “Model” in MVC paradigm
• Can include child documents
• Fast hierarchy operations (no scan)
• Jagged data fields (columns can be added &
  removed at will)
• Efficient use of space (memory)
• “De-Normalized” by default for speed
                 Document DB
•   CouchDB
•   MongoDB
•   Terrastore
•   RavenDB
          Key Value / Tuple Store
•   Azure Table Storage
•   Membase
•   Redis
•   Tokyo Cabinet / Tyrant
•   Berkeley DB
              Other DBs
• Neo4J (Graph DB)
• Db40 (Object Database)
• EMC Documentum xDB (XML Database)

				
DOCUMENT INFO
Shared By:
Stats:
views:123
posted:11/16/2010
language:English
pages:14
Description: 101 of NoSQL concepts