Introduction to MongoDB

Slides:



Advertisements
Similar presentations
Data Management in the Cloud Paul Szerlip. The rise of data Think about this o For the past two decades, the largest generator of data was humans -- now.
Advertisements

Jennifer Widom NoSQL Systems Overview (as of November 2011 )
Reporter: Haiping Wang WAMDM Cloud Group
CS 405G: Introduction to Database Systems 24 NoSQL Reuse some slides of Jennifer Widom Chen Qian University of Kentucky.
An introduction to MongoDB Rácz Gábor ELTE IK, febr. 10.
Jeff Lemmerman Matt Chimento Medtronic Confidential 1 9th Annual CodeFreeze Symposium Medtronic Energy and Component Center.
A Social blog using MongoDB ITEC-810 Final Presentation Lucero Soria Supervisor: Dr. Jian Yang.
A Study in NoSQL & Distributed Database Systems John Hawkins.
1 Yasin N. Silva Arizona State University This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Distributed Data Stores and No SQL Databases S. Sudarshan IIT Bombay.
AN INTRODUCTION TO NOSQL DATABASES Karol Rástočný, Eduard Kuric.
Distributed Data Stores and No SQL Databases S. Sudarshan Perry Hoekstra (Perficient) with slides pinched from various sources such as Perry Hoekstra (Perficient)
Getting Biologists off ACID Ryan Verdon 3/13/12. Outline Thesis Idea Specific database Effects of losing ACID What is a NoSQL database Types of NoSQL.
WTT Workshop de Tendências Tecnológicas 2014
© , OrangeScape Technologies Limited. Confidential 1 Write Once. Cloud Anywhere. Building Highly Scalable Web applications BASE gives way to ACID.
Goodbye rows and tables, hello documents and collections.
Modern Databases NoSQL and NewSQL Willem Visser RW334.
Moohanad Hassan Maedeh Pishvaei. Introduction Open Source Apache foundation project Relational DB: SQL Server CouchDB : JSON document-oriented DB (NoSQL)
Apache Cassandra - Distributed Database Management System Presented by Jayesh Kawli.
The Lightning Way XIV Encontro da comunidade SQLPort LX
Changwon Nati Univ. ISIE 2001 CSCI5708 NoSQL looks to become the database of the Internet By Lawrence Latif Wed Dec Nhu Nguyen and Phai Hoang CSCI.
Methodological Foundations of Biomedical Informatics (BMSC-GA 4449) Himanshu Grover.
NoSQL overview 杨振东. An order, which looks like a single aggregate structure in the UI, is split into many rows from many tables in a relational database.
VICTORIA UNIVERSITY OF WELLINGTON Te Whare Wananga o te Upoko o te Ika a Maui SWEN 432 Advanced Database Design and Implementation MongoDB Architecture.
MongoDB is a database management system designed for web applications and internet infrastructure. The data model and persistence strategies are built.
Introduction to MongoDB
Authors Brian F. Cooper, Raghu Ramakrishnan, Utkarsh Srivastava, Adam Silberstein, Philip Bohannon, Hans-Arno Jacobsen, Nick Puz, Daniel Weaver, Ramana.
MongoDB Jer-Shuan Lin.
NOSQL Implementation and examples Maciej Matuszewski.
MongoDB First Light. Mongo DB Basics Mongo is a document based NoSQL. –A document is just a JSON object. –A collection is just a (large) set of documents.
Dynamo: Amazon’s Highly Available Key-value Store DAAS – Database as a service.
NoSQL Or Peles. What is NoSQL A collection of various technologies meant to work around RDBMS limitations (mostly performance) Not much of a definition...
NoSQL Systems Motivation. NoSQL: The Name  “SQL” = Traditional relational DBMS  Recognition over past decade or so: Not every data management/analysis.
NOSQL DATABASE Not Only SQL DATABASE
NoSQL: Graph Databases. Databases Why NoSQL Databases?
Introduction to MongoDB. Database compared.
Data and Information Systems Laboratory University of Illinois Urbana-Champaign Data Mining Meeting Mar, From SQL to NoSQL Xiao Yu Mar 2012.
NoSQL databases A brief introduction NoSQL databases1.
Introduction to Core Database Concepts Getting started with Databases and Structure Query Language (SQL)
Introduction to NoSQL Databases Chyngyz Omurov Osman Tursun Ceng,Middle East Technical University.
Group members: Phạm Hoàng Long Nguyễn Huy Hùng Lê Minh Hiếu Phan Thị Thanh Thảo Nguyễn Đức Trí 1 BIG DATA & NoSQL Topic 1:
Why NO-SQL ?  Three interrelated megatrends  Big Data  Big Users  Cloud Computing are driving the adoption of NoSQL technology.
CSE-291 (Distributed Systems) Winter 2017 Gregory Kesden
CS 405G: Introduction to Database Systems
NO SQL for SQL DBA Dilip Nayak & Dan Hess.
NoSQL: Graph Databases
and Big Data Storage Systems
CS122B: Projects in Databases and Web Applications Winter 2017
Introduction In the computing system (web and business applications), there are enormous data that comes out every day from the web. A large section of.
MongoDB Er. Shiva K. Shrestha ME Computer, NCIT
Learning MongoDB ZhangGang
Modern Databases NoSQL and NewSQL
NOSQL.
CMPE 280 Web UI Design and Development October 17 Class Meeting
Dineesha Suraweera.
Christian Stark and Odbayar Badamjav
NOSQL databases and Big Data Storage Systems
NoSQL Systems Overview (as of November 2011).
1 Demand of your DB is changing Presented By: Ashwani Kumar
MongoDB for the SQL DBA.
NOSQL and CAP Theorem.
آزمايشگاه سيستمهای هوشمند علی کمالی زمستان 95
NoSQL Databases Antonino Virgillito.
another noSql customization for the HDB++ archiving system
NoSQL Not Only SQL University of Kurdistan Faculty of Engineering
CSE 482 Lecture 5: NoSQL.
CMPE 280 Web UI Design and Development March 14 Class Meeting
NoSQL databases An introduction and comparison between Mongodb and Mysql document store.
Server & Tools Business
Presentation transcript:

Introduction to MongoDB Wang Bo

Background Creator: 10gen, former doublick Name: short for humongous (芒果) Language: C++

What is MongoDB? Defination: MongoDB is an open source, document- oriented database designed with both scalability and developer agility in mind. Instead of storing your data in tables and rows as you would with a relational database, in MongoDB you store JSON-like documents with dynamic schemas(schema-free, schemaless).

What is MongoDB? Goal: bridge the gap between key-value stores (which are fast and scalable) and relational databases (which have rich functionality).

What is MongoDB? Data model: Using BSON (binary JSON), developers can easily map to modern object-oriented languages without a complicated ORM layer. BSON is a binary format in which zero or more key/value pairs are stored as a single entity. lightweight, traversable, efficient

Four Categories Key-value: Amazon’s Dynamo paper, Voldemort project by LinkedIn BigTable: Google’s BigTable paper, Cassandra developed by Facebook, now Apache project Graph: Mathematical Graph Theorys, FlockDB twitter Document Store: JSON, XML format, CouchDB , MongoDB

Term mapping

Schema design RDBMS: join

Schema design MongoDB: embed and link Embedding is the nesting of objects and arrays inside a BSON document(prejoined). Links are references between documents(client-side follow-up query). "contains" relationships, one to many; duplication of data, many to many

Schema design

Schema design

Replication Replica Sets and Master-Slave replica sets are a functional superset of master/slave and are handled by much newer, more robust code.

Replication Only one server is active for writes (the primary, or master) at a given time – this is to allow strong consistent (atomic) operations. One can optionally send read operations to the secondaries when eventual consistency semantics are acceptable.

Why Replica Sets Data Redundancy Automated Failover Read Scaling Maintenance Disaster Recovery(delayed secondary)

Replica Sets experiment bin/mongod --dbpath data/db --logpath data/log/hengtian.log --logappend --rest --replSet hengtian rs.initiate({ _id : "hengtian", members : [ {_id : 0, host : "lab3:27017"}, {_id : 1, host : "cms1:27017"}, {_id : 2, host : "cms2:27017"} ] })

Sharding Sharding is the partitioning of data among multiple machines in an order-preserving manner.(horizontal scaling ) Machine 1 Machine 2 Machine 3 Alabama → Arizona Colorado → Florida Arkansas → California Indiana → Kansas Idaho → Illinois Georgia → Hawaii Maryland → Michigan Kentucky → Maine Minnesota → Missouri Montana → Montana Nebraska → New Jersey Ohio → Pennsylvania New Mexico → North Dakota Rhode Island → South Dakota Tennessee → Utah   Vermont → West Virgina Wisconsin → Wyoming

Shard Keys Key patern: { state : 1 }, { name : 1 } must be of high enough cardinality (granular enough) that data can be broken into many chunks, and thus distribute-able. A BSON document (which may have significant amounts of embedding) resides on one and only one shard.

Sharding The set of servers/mongod process within the shard comprise a replica set

Actual Sharding

Replication & Sharding conclusion sharding is the tool for scaling a system, and replication is the tool for data safety, high availability, and disaster recovery. The two work in tandem yet are orthogonal concepts in the design.

Map reduce Often, in a situation where you would have used GROUP BY in SQL, map/reduce is the right tool in MongoDB. experiment

Install $ wget http://downloads.mongodb.org/osx/mongodb- osx-x86_64-1.4.2.tgz $ tar -xf mongodb-osx-x86_64-1.4.2.tgz mkdir -p /data/db mongodb-osx-x86_64-1.4.2/bin/mongod

Who uses?

Supported languages

Thank you