Introduction to NoSQL



Similar documents
extensible record stores document stores key-value stores Rick Cattel s clustering from Scalable SQL and NoSQL Data Stores SIGMOD Record, 2010

Slave. Master. Research Scholar, Bharathiar University

Introduction to NOSQL

SQL VS. NO-SQL. Adapted Slides from Dr. Jennifer Widom from Stanford

Lecture Data Warehouse Systems

NoSQL Databases. Institute of Computer Science Databases and Information Systems (DBIS) DB 2, WS 2014/2015


Cloud Scale Distributed Data Storage. Jürmo Mehine

The Cloud Trade Off IBM Haifa Research Storage Systems

Why NoSQL? Your database options in the new non- relational world IBM Cloudant 1

Advanced Data Management Technologies

Structured Data Storage

NoSQL Data Base Basics

A COMPARATIVE STUDY OF NOSQL DATA STORAGE MODELS FOR BIG DATA

NoSQL Databases. Nikos Parlavantzas

nosql and Non Relational Databases

Analytics March 2015 White paper. Why NoSQL? Your database options in the new non-relational world

Databases 2 (VU) ( )

The NoSQL Ecosystem, Relaxed Consistency, and Snoop Dogg. Adam Marcus MIT CSAIL

MongoDB in the NoSQL and SQL world. Horst Rechner Berlin,

Although research on distributed database systems. Consistency Tradeoffs in Modern Distributed Database System Design COVER FEATURE

NoSQL Systems for Big Data Management

The Quest for Extreme Scalability

Composite Data Virtualization Composite Data Virtualization And NOSQL Data Stores

NoSQL Database Options

multiparadigm programming Multiparadigm Data Storage for Enterprise Applications

Cassandra A Decentralized Structured Storage System

NoSQL Evaluation. A Use Case Oriented Survey

CS 4604: Introduc0on to Database Management Systems. B. Aditya Prakash Lecture #13: NoSQL and MapReduce

Preparing Your Data For Cloud

Big Data & Scripting storage networks and distributed file systems

these three NoSQL databases because I wanted to see a the two different sides of the CAP

The evolution of database technology (II) Huibert Aalbers Senior Certified Executive IT Architect

Can the Elephants Handle the NoSQL Onslaught?

BRAC. Investigating Cloud Data Storage UNIVERSITY SCHOOL OF ENGINEERING. SUPERVISOR: Dr. Mumit Khan DEPARTMENT OF COMPUTER SCIENCE AND ENGEENIRING

Joining Cassandra. Luiz Fernando M. Schlindwein Computer Science Department University of Crete Heraklion, Greece

Distributed Data Stores

Cloud Data Management: A Short Overview and Comparison of Current Approaches

Big Data and Hadoop with Components like Flume, Pig, Hive and Jaql

Challenges for Data Driven Systems

Hands-on Cassandra. OSCON July 20, Eric

NoSQL in der Cloud Why? Andreas Hartmann

NoSQL systems: introduction and data models. Riccardo Torlone Università Roma Tre

NoSQL. What Is NoSQL? Why NoSQL?

Comparison of the Frontier Distributed Database Caching System with NoSQL Databases

A Novel Cloud Computing Data Fragmentation Service Design for Distributed Systems

Applications for Big Data Analytics

Which NoSQL Database? A Performance Overview

Benchmarking and Analysis of NoSQL Technologies

Introduction to NoSQL

How To Write A Database Program

Overview of Databases On MacOS. Karl Kuehn Automation Engineer RethinkDB

A Survey of Distributed Database Management Systems

Study and Comparison of Elastic Cloud Databases : Myth or Reality?

High Throughput Computing on P2P Networks. Carlos Pérez Miguel

Not Relational Models For The Management of Large Amount of Astronomical Data. Bruno Martino (IASI/CNR), Memmo Federici (IAPS/INAF)

The CAP theorem and the design of large scale distributed systems: Part I

INTERNATIONAL JOURNAL of RESEARCH GRANTHAALAYAH A knowledge Repository

So What s the Big Deal?

A Review of Column-Oriented Datastores. By: Zach Pratt. Independent Study Dr. Maskarinec Spring 2011

Introduction to NoSQL Databases. Tore Risch Information Technology Uppsala University

Evaluating NoSQL for Enterprise Applications. Dirk Bartels VP Strategy & Marketing

NoSQL Databases: a step to database scalability in Web environment

Cassandra A Decentralized, Structured Storage System

Big Systems, Big Data

Eventually Consistent

An Open Source NoSQL solution for Internet Access Logs Analysis

X4-2 Exadata announced (well actually around Jan 1) OEM/Grid control 12c R4 just released

Hosting Transaction Based Applications on Cloud

Integrating Big Data into the Computing Curricula

Making Sense ofnosql A GUIDE FOR MANAGERS AND THE REST OF US DAN MCCREARY MANNING ANN KELLY. Shelter Island

Do Relational Databases Belong in the Cloud? Michael Stiefel

Review of Query Processing Techniques of Cloud Databases Ruchi Nanda Assistant Professor, IIS University Jaipur.

NewSQL: Towards Next-Generation Scalable RDBMS for Online Transaction Processing (OLTP) for Big Data Management

Transactions and ACID in MongoDB

NoSQL Databases. Polyglot Persistence

NoSQL replacement for SQLite (for Beatstream) Antti-Jussi Kovalainen Seminar OHJ-1860: NoSQL databases

Choosing the right NoSQL database for the job: a quality attribute evaluation

How To Scale Out Of A Nosql Database

Big Data Management and NoSQL Databases

Distributed Data Parallel Computing: The Sector Perspective on Big Data

Making Sense of NoSQL Dan McCreary Wednesday, Nov. 13 th 2014

Big Data Technology Literature Review

A survey of big data architectures for handling massive data

Big Data Technologies. Prof. Dr. Uta Störl Hochschule Darmstadt Fachbereich Informatik Sommersemester 2015

A Comparison of a Graph Database and a Relational Database

EXPERIMENTAL EVALUATION OF NOSQL DATABASES

Communication System Design Projects

Transcription:

Introduction to NoSQL NoSQL Seminar 2012 @ TUT Arto Salminen

What is NoSQL? Class of database management systems (DBMS) "Not only SQL" Does not use SQL as querying language Distributed, fault-tolerant architecture No fixed schema (formally described structure) No joins (typical in databases operated with SQL) Expensive operation for combining records from two or more tables into one set Joins require strong consistency and fixed schemas Lack of these makes NoSQL databases more flexible It's not a replacement for a RDBMS but compliments it

Database Scaling RDBMS are "scaled up" by adding hardware processing power NoSQL is "scaled out" by spreading the load Partitioning (sharding) / replication App App Load balancer Load balancer Users A-K Users L-O Users P-S Users T-Z Users A-Z Users A-Z Users A-Z Users A-Z

Relational DB Scaling At certain point relational database won't scale

NoSQL DB Scaling Scaling horizontally is possible with NoSQL Scaling up / down is easy Supports rapid production-ready prototyping Better handling of traffic spikes

Where NoSQL Is Used? Google (BigTable, LevelDB) LinkedIn (Voldemort) Facebook (Cassandra) Twitter (Hadoop/Hbase, FlockDB, Cassandra) Netflix (SimpleDB, Hadoop/HBase, Cassandra) CERN (CouchDB)

History of NoSQL MultiValue databases at TRW in 1965. DBM is released by AT&T in 1979. Lotus Domino released in 1989. Carlo Strozzi used the term NoSQL in 1998 to name his lightweight, open-source relational database that did not expose the standard SQL interface. Graph database Neo4j is started in 2000. Google BigTable is started in 2004. Paper published in 2006. CouchDB is started in 2005. The research paper on Amazon Dynamo is released in 2007. The document database MongoDB is started in 2007 as a part of a open source cloud computing stack and first standalone release in 2009. Facebooks open sources the Cassandra project in 2008. Project Voldemort started in 2008. The term NoSQL was reintroduced in early 2009. Some NoSQL conferences NoSQL Matters, NoSQL Now!, INOSA

CAP Theorem 1/2 It is impossible for a distributed computer system to simultaneously provide all three of the following guarantees: Consistency (all nodes see the same data at the same time) Availability (a guarantee that every request receives a response about whether it was successful or failed) Partition tolerance (the system continues to operate despite arbitrary message loss or failure of part of the system) A distributed system can satisfy any two of these guarantees at the same time, but not all three. Gilbert and Lynch, Brewer's conjecture and the feasibility of consistent, available, partition-tolerant web services, 2002

CAP Theorem 2/2 In other words, CAP can be expressed as "If the network is broken, your database won t work" "won't work" = down OR inconsistent In RDBMS we do not have P (network partitions) Consistency and Availability are achieved In NoSQL we want to have P Need to select either C or A Drop A -> Accept waiting until data is consistent Drop C -> Accept getting inconsistent data sometimes

NoSQL Systems and CAP http://blog.nahurst.com/visual-guide-to-nosql-systems

ACID vs BASE Scalability and better performance of NoSQL is achieved by sacrificing ACID compatibility. Atomic, Consistent, Isolated, Durable NoSQL is having BASE compatibility instead. Basically Available, Soft state, Eventual consistency

ACID -- Requirement for SQL DBs Atomicity. All of the operations in the transaction will complete, or none will. Consistency. Transactions never observe or result in inconsistent data. Isolation. The transaction will behave as if it is the only operation being performed upon the database (i.e. uncommitted transactions are isolated) Durability. Upon completion of the transaction, the operation will not be reversed (i.e. committed transactions are permanent)

BASE -- Basically Available Use replication and sharding to reduce the likelihood of data unavailability and use sharding, or partitioning the data among many different storage servers, to make any remaining failures partial. The result is a system that is always available, even if subsets of the data become unavailable for short periods of time.

BASE and Availability The availability of BASE is achieved through supporting partial failures without total system failure. Example. If users are partitioned across five database servers, BASE design encourages crafting operations in such a way that a user database failure impacts only the 20 percent of the users on that particular host. This leads to higher perceived availability of the system. Even though a single node is failing, the interface is still operational.

BASE -- Eventually Consistent Although applications must deal with instantaneous consistency, NoSQL systems ensure that at some future point in time the data assumes a consistent state. In contrast to ACID systems that enforce consistency at transaction commit, NoSQL guarantees consistency only at some undefined future time. Where ACID is pessimistic and forces consistency at the end of every operation, BASE is optimistic and accepts that the database consistency will be in a state of flux.

BASE and Consistency As DB nodes are added while scaling up, need for synchronization arises If absolute consistency is required, nodes need to communicate when read/write operations are performed on a node Consistency over availability -> bottleneck As a trade-off, "eventual consistency" is used Consistency is maintained later Numerous approaches for keeping up "distributed consistency" are available Amazon Dynamo - consistent hashing CouchDB - asynchronous master-master replication MongoDB - auto-sharding+replication cluster with a master server

BASE -- Soft State While ACID systems assume that data consistency is a hard requirement, NoSQL systems allow data to be inconsistent and relegate designing around such inconsistencies to application developers. In other words, soft state indicates that the state of the system may change over time, even without input. This is because of the eventual consistency model (the acronym is a bit contrived).

Some breeds of NoSQL solutions Key-Value Stores Column Family Stores Document Databases Graph Databases In addition: Object and RDF databases as well as Tuple stores

Key-Value Stores Dynamo, Voldemort, Rhino DHT... DeCandia et al. "Dynamo: Amazon s Highly Available Key-value Store", 2007 Key-Value is based on a hash table where there is a unique key and a pointer to a particular item of data. Mappings are usually accompanied by cache mechanisms to maximize performance. API is typically simple -- implementation is often complex.

Column Family Stores BigTable, Cassandra, HBase, Hadoop... Chang et al. "Bigtable: A Distributed Storage System for Structured Data", 2006 Store and process very large amounts of data distributed over many machines. "Petabytes of data across thousands of servers" Keys point to multiple columns jim_87 jill_90 Age Name Gender Phone 25 Jim M 123456 Age Name Gender Phone 22 Jill F 654321 Cassandra example

Document Databases (Stores) CouchDB, MongoDB, Lotus Notes, Redis... Documents are addressed in the database via a unique key that represents that document. Semi-structured documents can be XML or JSON formatted, for instance. In addition to the key, documents can be retrieved with queries. Redis is sometimes referred to as data structure server since keys can contain strings, hashes, lists, sets and sorted sets.

Graph Databases Neo4J, FlockDB, GraphBase, InfoGrip,... Graph Databases are built with nodes, relationships between nodes (edges) and the properties of nodes. Nodes represent entities (e.g. "Bob" or "Alice"). Similar in nature to the objects as in object-oriented programming. Properties are pertinent information related to nodes (e. g. age: 18). Edges connect nodes to nodes or nodes to properties. Represent the relationship between the two. Scaling graph DBs is problematic Neo4J: cache sharding, sharding strategy heuristics

Some NoSQL Challenges Lack of maturity -- numerous solutions still in their beta stages Lack of commercial support for enterprise users Lack of support for data analysis Maintenance efforts and skills are required -- experts are hard to find

References and Material Michael Stonebraker, Samuel Madden, Daniel J. Abadi, Stavros Harizopoulos, Nabil Hachem, and Pat Helland. 2007. The end of an architectural era: (it's time for a complete rewrite). InProceedings of the 33rd international conference on Very large data bases (VLDB '07). VLDB Endowment 1150-1160. Werner Vogels. 2008. Eventually Consistent. Queue 6, 6 (October 2008), 14-19. DOI=10. 1145/1466443.1466448 Dan Pritchett. 2008. BASE: An Acid Alternative. Queue 6, 3 (May 2008), 48-55. DOI=10.1145/1394127. 1394128 Seth Gilbert and Nancy Lynch. 2002. Brewer's conjecture and the feasibility of consistent, available, partition-tolerant web services. SIGACT News 33, 2 (June 2002), 51-59. DOI=10.1145/564585.564601 Fay Chang, Jeffrey Dean, Sanjay Ghemawat, Wilson C. Hsieh, Deborah A. Wallach, Mike Burrows, Tushar Chandra, Andrew Fikes, and Robert E. Gruber. 2006. Bigtable: a distributed storage system for structured data. In Proceedings of the 7th USENIX Symposium on Operating Systems Design and Implementation - Volume 7 (OSDI '06), Vol. 7. USENIX Association, Berkeley, CA, USA, 15-15. Avinash Lakshman and Prashant Malik. 2010. Cassandra: a decentralized structured storage system. SIGOPS Oper. Syst. Rev. 44, 2 (April 2010), 35-40. DOI=10.1145/1773912.1773922 Couch DB - The Definitive Guide, http://guide.couchdb.org/index.html HP whitepaper: There is no free lunch with distributed data Long list of NoSQL papers: http://nosqlsummer.org/papers

Possible Presentation Topics NoSQL architectures Key-Value Store Graph Big Table (Columnar) Document Store... Implementations MongoDB HBase Cassandra CouchDB Google App Engine Datastore Hadoop BigData Redis Riak Neo4j Hosted services Freebase OpenLink Virtuoso Datastore on Google Appengine Amazon DynamoDB Cloudant Data Layer (CouchDB)... Technologies / misc MapReduce Fault tolerance Taxonomy Challenges / Limitations Tools Use Cases Distributed databases Parallel systems...