Your SlideShare is downloading. ×

No sql

2,900

Published on

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,900
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
133
Comments
0
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. What is NoSQL Database Management System Various Data Models Type of NoSQL DBMS Why NoSQL DBMS? Beyond NoSQL Bibliography NoSQL Database Sparsa Roychowdhury IIEST,Shibpur March 19, 2014 Sparsa Roychowdhury NoSQL Database
  • 2. What is NoSQL Database Management System Various Data Models Type of NoSQL DBMS Why NoSQL DBMS? Beyond NoSQL Bibliography Outline 1 What is NoSQL Database Management System 2 Various Data Models 3 Type of NoSQL DBMS 4 Why NoSQL DBMS? 5 Beyond NoSQL 6 Bibliography Sparsa Roychowdhury NoSQL Database
  • 3. What is NoSQL Database Management System Various Data Models Type of NoSQL DBMS Why NoSQL DBMS? Beyond NoSQL Bibliography What is NoSQL? NoSQL NoSQL encompasses a wide variety of different database technologies and were developed in response to a rise in the volume of data stored about users, objects and products, the frequency in which this data is accessed, and performance and processing needs. Next Generation Databases mostly addressing some of the points: 1 non-relational 2 distributed 3 open-source 4 horizontally scalable Sparsa Roychowdhury NoSQL Database
  • 4. What is NoSQL Database Management System Various Data Models Type of NoSQL DBMS Why NoSQL DBMS? Beyond NoSQL Bibliography Various Data Models I Data Model A data model is the model through which we perceive and manipulate our data. For people using a database, the data model describes how we interact with the data in the database. Relational Data Model The relational model takes the information that we want to store and divides it into tuples. Tuple being a limited Data Structure it captures a set of values and can’t be nested. This gives Relational Model a space of development. Sparsa Roychowdhury NoSQL Database
  • 5. What is NoSQL Database Management System Various Data Models Type of NoSQL DBMS Why NoSQL DBMS? Beyond NoSQL Bibliography Various Data Models II Aggregate Model Aggregate is a term that comes from Domain-Driven Design, an aggregate is a collection of related objects that we wish to treat as a unit, it is a unit for data manipulation and management of consistency. 1 Atomic property holds within an aggregate 2 Communication with data storage happens in unit of aggregate 3 Dealing with aggregate is much more efficient in clusters 4 It is often easier for application programmers to work with aggregates Sparsa Roychowdhury NoSQL Database
  • 6. What is NoSQL Database Management System Various Data Models Type of NoSQL DBMS Why NoSQL DBMS? Beyond NoSQL Bibliography Key-Value Databases Document Databases Column-family stores Graph Stores Type of NoSQL DBMS There are mainly four types of NoSQL Database systems these are: 1 Key-value Stores 2 Document Databases 3 Wide Column Stores 4 Graph Stores Sparsa Roychowdhury NoSQL Database
  • 7. What is NoSQL Database Management System Various Data Models Type of NoSQL DBMS Why NoSQL DBMS? Beyond NoSQL Bibliography Key-Value Databases Document Databases Column-family stores Graph Stores Key-Value Databases Key-value store A key-value store is a simple hash table, primary used when all access to the database is via primary key. 1 Key-value stores are the simplest NoSQL data stores to use from an API perspective 2 The client can either get the value, put the value or delete a key from the data store. 3 The value is just a blob that the data just stores 4 Application has the responsibility to understand what is stored 5 Have great performance and easily scaled Sparsa Roychowdhury NoSQL Database
  • 8. What is NoSQL Database Management System Various Data Models Type of NoSQL DBMS Why NoSQL DBMS? Beyond NoSQL Bibliography Key-Value Databases Document Databases Column-family stores Graph Stores Example: I There are many available key-value stores available in the market some of them are: 1 Riak 2 Redis 3 Memcached DB 4 Berkeley DB 5 Hamster DB (especially suited for embedded use) 6 Amazon Dynamo DB (not open source) 7 Project Voldemort (Open Source Implementation of Dynamo DB) Sparsa Roychowdhury NoSQL Database
  • 9. What is NoSQL Database Management System Various Data Models Type of NoSQL DBMS Why NoSQL DBMS? Beyond NoSQL Bibliography Key-Value Databases Document Databases Column-family stores Graph Stores Example: II The basic comparison between the terminology between Oracle and Riak is given below. Difference between the terminology of Oracle and Riak Oracle Riak Database instance Riak cluster table bucket row key-value rowid key Sparsa Roychowdhury NoSQL Database
  • 10. What is NoSQL Database Management System Various Data Models Type of NoSQL DBMS Why NoSQL DBMS? Beyond NoSQL Bibliography Key-Value Databases Document Databases Column-family stores Graph Stores Document Databases Document Stores Documents are the main concept in document databases. The database stores and retrieves documents, which can be XML, JSON, BSON, and so on. The documents stored are similar to each other but do not have to be exactly the same. Document databases store documents in the value parts of the key Document stores can be thought as key-value stores where the value is examinable Sparsa Roychowdhury NoSQL Database
  • 11. What is NoSQL Database Management System Various Data Models Type of NoSQL DBMS Why NoSQL DBMS? Beyond NoSQL Bibliography Key-Value Databases Document Databases Column-family stores Graph Stores Example: I There are many available Document Databases available in the market some of them are: 1 MongoDB 2 CouchDB 3 Terrastore 4 OrientDB 5 RavenDB Sparsa Roychowdhury NoSQL Database
  • 12. What is NoSQL Database Management System Various Data Models Type of NoSQL DBMS Why NoSQL DBMS? Beyond NoSQL Bibliography Key-Value Databases Document Databases Column-family stores Graph Stores Example: II The basic comparison between the terminology between Oracle and MongoDB is given below. Difference between the terminology of Oracle and MongoDB Oracle MongoDB Database instance MongoDB instance Schema Database table Collection row Document rowid id Join DBref Sparsa Roychowdhury NoSQL Database
  • 13. What is NoSQL Database Management System Various Data Models Type of NoSQL DBMS Why NoSQL DBMS? Beyond NoSQL Bibliography Key-Value Databases Document Databases Column-family stores Graph Stores Column-family stores Column-family stores Column-family stores allow you to store data with keys mapped to values and the values grouped into multiple column families, where each column family being a map of data. Column-family databases store data in column families as rows They have many columns associated with a row key Column families are groups of related data that is often accessed together The basic unit of storage in Column-family databases is a column Sparsa Roychowdhury NoSQL Database
  • 14. What is NoSQL Database Management System Various Data Models Type of NoSQL DBMS Why NoSQL DBMS? Beyond NoSQL Bibliography Key-Value Databases Document Databases Column-family stores Graph Stores Example: I There are many available Column-family Databases available in the market some of them are: 1 Cassandra 2 HBase 3 Hypertable 4 Amazon Simple DB Sparsa Roychowdhury NoSQL Database
  • 15. What is NoSQL Database Management System Various Data Models Type of NoSQL DBMS Why NoSQL DBMS? Beyond NoSQL Bibliography Key-Value Databases Document Databases Column-family stores Graph Stores Example: II The basic comparison between the terminology between RDBMS and Cassandra is given below. Difference between the terminology of RDBMS and Cassandra RDBMS Cassandra Database instance cluster Database Keyspace table Column Family row row Column (same for all rows) Column (can be different per row) Sparsa Roychowdhury NoSQL Database
  • 16. What is NoSQL Database Management System Various Data Models Type of NoSQL DBMS Why NoSQL DBMS? Beyond NoSQL Bibliography Key-Value Databases Document Databases Column-family stores Graph Stores Graph Stores Graph Store Database Graph databases are one style of NoSQL databases that uses a distribution model similar to relational databases but offers a different data model that makes it better at handling data with complex relationships. Entities are also known as nodes, which have properties Nodes are organized by relationships which allows to find interesting patterns between the nodes The organization of the graph lets the data to be stored once and then interpreted in different ways based on relationships Sparsa Roychowdhury NoSQL Database
  • 17. What is NoSQL Database Management System Various Data Models Type of NoSQL DBMS Why NoSQL DBMS? Beyond NoSQL Bibliography Key-Value Databases Document Databases Column-family stores Graph Stores Example: I Sparsa Roychowdhury NoSQL Database
  • 18. What is NoSQL Database Management System Various Data Models Type of NoSQL DBMS Why NoSQL DBMS? Beyond NoSQL Bibliography Key-Value Databases Document Databases Column-family stores Graph Stores Example: II There are many available graph Databases available in the market some of them are: 1 Neo4J 2 Infinite Graph 3 OrientDB 4 FlockDB Sparsa Roychowdhury NoSQL Database
  • 19. What is NoSQL Database Management System Various Data Models Type of NoSQL DBMS Why NoSQL DBMS? Beyond NoSQL Bibliography Schema Migrations Polyglot Persistence Impedance Mismatch Auto Sharding Why NoSQL DBMS? Why NoSQL When compared to relational databases, NoSQL databases are more scalable and provide superior performance, and their data model addresses several issues that the relational model is not designed to address: 1 Schema Migrations 2 Polyglot Persistence 3 Impedance Mismatch 4 Auto Sharding architecture Sparsa Roychowdhury NoSQL Database
  • 20. What is NoSQL Database Management System Various Data Models Type of NoSQL DBMS Why NoSQL DBMS? Beyond NoSQL Bibliography Schema Migrations Polyglot Persistence Impedance Mismatch Auto Sharding Schema Migration Schemaless nature The recent trend in discussing NoSQL databases is to highlight their schemaless nature, it is a popular feature that allows developers to concentrate on the domain design without worrying about schema changes. with NoSQL databases, in some cases the schema does not have to be thought about beforehand The claim that NoSQL databases are entirely schemaless is misleading they store the data without regard to the schema the data adheres to, that schema has to be defined by the application Sparsa Roychowdhury NoSQL Database
  • 21. What is NoSQL Database Management System Various Data Models Type of NoSQL DBMS Why NoSQL DBMS? Beyond NoSQL Bibliography Schema Migrations Polyglot Persistence Impedance Mismatch Auto Sharding Polyglot Persistence The point of view of using different data stores in different circumstances is known as Polyglot Persistence Most organization has mix of storage technologies for different circumstances Using a single database engine for all of the requirements usually leads to non- performant solutions Storing transactional data, caching session information, traversing graph of customers and the products their friends bought are essentially different problems Sparsa Roychowdhury NoSQL Database
  • 22. What is NoSQL Database Management System Various Data Models Type of NoSQL DBMS Why NoSQL DBMS? Beyond NoSQL Bibliography Schema Migrations Polyglot Persistence Impedance Mismatch Auto Sharding Impedance Mismatch Impedance Mismatch Impedance Mismatch means the difference between data model and in memory data structures. The impedance mismatch is a major source of frustration to application developers Many people believed that it would lead to relational databases being replaced with databases that replicate the in-memory data structures to disk Object-Oriented Database failed to show the potential to reduce the gap Sparsa Roychowdhury NoSQL Database
  • 23. What is NoSQL Database Management System Various Data Models Type of NoSQL DBMS Why NoSQL DBMS? Beyond NoSQL Bibliography Schema Migrations Polyglot Persistence Impedance Mismatch Auto Sharding Auto Sharding Auto Sharding NoSQL databases usually support auto-sharding, meaning that they natively and automatically spread data across an arbitrary number of servers, without requiring the application to even be aware of the composition of the server pool Because of the way they are structured, relational databases usually scale vertically This gets expensive quickly, places limits on scale, and creates a relatively small number of failure points for database infrastructure The solution is to scale horizontally, by adding servers instead of concentrating more capacity in a single server. Sparsa Roychowdhury NoSQL Database
  • 24. What is NoSQL Database Management System Various Data Models Type of NoSQL DBMS Why NoSQL DBMS? Beyond NoSQL Bibliography Beyond NoSQL NoSQL databases we have discussed here is only part of the picture of polyglot persistence. Recent attention to clustered environments has seen a rise of distributed file systems. Technologies like the Google File System and Hadoop We think of XML databases as document databases where the documents are stored in a data model compatible with XML NoSQL is just one set of data storage technologies, we should consider other data storage technologies whether or not they bear the NoSQL label. Sparsa Roychowdhury NoSQL Database
  • 25. What is NoSQL Database Management System Various Data Models Type of NoSQL DBMS Why NoSQL DBMS? Beyond NoSQL Bibliography Bibliography Pramod J. Sadalage, Martin Fowler NoSQL Distilled: A Brief Guide to the Emerging World of Polyglot Persistence Addison Wesley, Massachusetts, 2013 http://www.mongodb.com/learn/nosql http://www.wikipedia.org Sparsa Roychowdhury NoSQL Database
  • 26. What is NoSQL Database Management System Various Data Models Type of NoSQL DBMS Why NoSQL DBMS? Beyond NoSQL Bibliography Thank You! Sparsa Roychowdhury NoSQL Database

×