Introduction to MongoDB. Kristina Chodorow kristina@mongodb.org

Similar documents
Please ask questions! Have people used non-relational dbs before? MongoDB?

Dr. Chuck Cartledge. 15 Oct. 2015

MongoDB: document-oriented database

Scaling up = getting a better machine. Scaling out = use another server and add it to your cluster.

.NET User Group Bern

The MongoDB Tutorial Introduction for MySQL Users. Stephane Combaudon April 1st, 2014

An Open Source NoSQL solution for Internet Access Logs Analysis

NOSQL INTRODUCTION WITH MONGODB AND RUBY GEOFF

Getting Started with MongoDB

MongoDB Developer and Administrator Certification Course Agenda

MongoDB. The Definitive Guide to. The NoSQL Database for Cloud and Desktop Computing. Apress8. Eelco Plugge, Peter Membrey and Tim Hawkins

Zero Downtime Deployments with Database Migrations. Bob Feldbauer

the missing log collector Treasure Data, Inc. Muga Nishizawa

Data Model Design for MongoDB

SURVEY ON MONGODB: AN OPEN- SOURCE DOCUMENT DATABASE

Document Oriented Database

database abstraction layer database abstraction layers in PHP Lukas Smith BackendMedia

MongoDB. Or how I learned to stop worrying and love the database. Mathias Stearn. N*SQL Berlin October 22th, gen

NoSQL: Going Beyond Structured Data and RDBMS

Building Your First MongoDB Application

Perl & NoSQL Focus on MongoDB. Jean-Marie Gouarné jmgdoc@cpan.org

Databases for text storage

DbSchema Tutorial with Introduction in MongoDB

Installing Booked scheduler on CentOS 6.5

Intro to Databases. ACM Webmonkeys 2011

Big Data. Facebook Wall Data using Graph API. Presented by: Prashant Patel Jaykrushna Patel

Overview of Databases On MacOS. Karl Kuehn Automation Engineer RethinkDB

MONGODB - THE NOSQL DATABASE

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

Python and MongoDB. Why?

Attacking MongoDB. Firstov Mihail

Qsoft Inc

CS 564: DATABASE MANAGEMENT SYSTEMS

Building a RESTful service with MongoDB and Spring MVC

Search and Destroy: ELIMINATING PERFORMANCE BOTTLENECKS

Online shopping store

Big Data & Data Science Course Example using MapReduce. Presented by Juan C. Vega

Introduction to NoSQL and MongoDB. Kathleen Durant Lesson 20 CS 3200 Northeastern University

AJ Matrix V5. Installation Manual

Lecture 10: HBase! Claudia Hauff (Web Information Systems)!

An Approach to Implement Map Reduce with NoSQL Databases

Spring Data, Jongo & Co. Java Persistenz-Frameworks für MongoDB

Usage Tracking for IBM InfoSphere Business Glossary

Using Cacti To Graph MySQL s Metrics

Open source, high performance database

NoSQL - What we ve learned with mongodb. Paul Pedersen, Deputy CTO paul@10gen.com DAMA SF December 15, 2011

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

SCALABLE DATA SERVICES

PHP and MongoDB Web Development Beginners Guide by Rubayeet Islam

Frictionless Persistence in.net with MongoDB. Mogens Heller Grabe Trifork

Websense SQL Queries. David Buyer June 2009

How SourceForge is Using MongoDB

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

Pertino HA Cluster Deployment: Enabling a Multi- Tier Web Application Using Amazon EC2 and Google CE. A Pertino Deployment Guide

Can the Elephants Handle the NoSQL Onslaught?

HowTo. Planning table online

Data Synchronization between Magento and VTiger

MongoDB Security Guide Release 3.0.6

Introduction to Big Data Training

NoSQL Performance Test In-Memory Performance Comparison of SequoiaDB, Cassandra, and MongoDB

Integrating Big Data into the Computing Curricula

Monitoring and Alerting

Open Source Technologies on Microsoft Azure

Benchmarking and monitoring tools

MongoDB Security Guide

UQC103S1 UFCE Systems Development. uqc103s/ufce PHP-mySQL 1

L7_L10. MongoDB. Big Data and Analytics by Seema Acharya and Subhashini Chellappan Copyright 2015, WILEY INDIA PVT. LTD.

Logistics. Database Management Systems. Chapter 1. Project. Goals for This Course. Any Questions So Far? What This Course Cannot Do.

White Paper. Optimizing the Performance Of MySQL Cluster

SECURING APACHE : THE BASICS - III

MongoDB. An introduction and performance analysis. Seminar Thesis

LAMP Quickstart for Red Hat Enterprise Linux 4

CN=Monitor Installation and Configuration v2.0

Hacettepe University Department Of Computer Engineering BBM 471 Database Management Systems Experiment

IT Support Tracking with Request Tracker (RT)

Welcome to Collage (Draft v0.1)

Application note: Connecting the to a Database

YouTube Vitess. Cloud-Native MySQL. Oracle OpenWorld Conference October 26, Anthony Yeh, Software Engineer, YouTube.

ADVANCED DATABASES PROJECT. Juan Manuel Benítez V Gledys Sulbaran

RED HAT SOFTWARE COLLECTIONS BRIDGING DEVELOPMENT AGILITY AND PRODUCTION STABILITY

MongoDB and Couchbase

CS5331 Web Security - Assignment 0

Short notes on webpage programming languages

Application of NoSQL Database in Web Crawling

Data Discovery and Systems Diagnostics with the ELK stack. Rittman Mead - BI Forum 2015, Brighton. Robin Moffatt, Principal Consultant Rittman Mead

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

by Pearson Education, Inc. All Rights Reserved.

Replicating to everything

Practical Cassandra. Vitalii

Transcription:

Introduction to MongoDB Kristina Chodorow kristina@mongodb.org

Application PHP Apache Database Linux

Application PHP IIS Windows

Application PHP Apache Linux

Application PHP Apache Linux

Application PHP Apache Linux

Application PHP The world's most popular open source database Apache Linux

Application PHP Apache Linux The world's most advanced open source database

server databases contain tables contain rows

server schema databases contain tables contain rows

server schema databases contain tables contain rows joins

server schema databases contain tables contain rows joins

Application Perl Apache Linux

getting started

www.mongodb.org

$ mysqld

$ mongod

$ mysql

$ mongo

$ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help" for help >

$ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help" for help > db

$ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help" for help > db test >

$ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help" for help > db test >

$ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help" for help > db test > table = db.foo

server

databases server

server databases contain tables

server databases contain tables

server databases contain tables

server databases contain tables contain rows

server databases contain tables contain rows

server databases contain tables contain rows

server schema databases contain tables contain rows

server schema databases contain tables contain rows joins

server databases contain collections contain documents

$ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help" for help > db test > collection = db.foo

$ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help" for help > db test > collection = db.foo

> doc = {... "name" : "kristina",... "contact info" : {... "twitter" : "@kchodorow",... "email" : "kristina@10gen.com"... },... "friends" : 400232,... "pic" : BinData(...)... "member since" : new Date()}

> db.foo.insert(doc)

> db.foo.findone({"name" : "kristina"});

> db.foo.findone({"name" : "kristina"}) > db.foo.findone({... "contact.twitter" : "@kchodorow"})

> db.foo.findone({"name" : "kristina"}) > db.foo.findone({... "contact.twitter" : "@kchodorow"}) > db.foo.find({... "member since" : {... "$gt" : yesterday,... "$lt" : today... }})

> db.foo.findone({"name" : "kristina"}) > db.foo.findone({... "contact.twitter" : "@kchodorow"}) > db.foo.find({... "member since" : {... "$gt" : yesterday,... "$lt" : today... }}).sort({friends : 1}).limit(10).... skip(100)

db.people.update( {name : "kristina"},

db.people.update( {name : "kristina"}, {$set :

db.people.update( {name : "kristina"}, {$set : {"contact.website" : "snailinaturtleneck.com" }});

> db.pageviews.update( {url : "example.com"}, {$inc : {pageviews : 1}}, true)

some features

I suddenly have a deep love for stored procedures

I suddenly have a deep love for stored procedures

> db.system.js.insert({ "_id" : "x", "value" : 3}); > db.system.js.insert({ "_id" : "y", "value" : 4}); > db.eval("return x+y")

> db.system.js.insert({_id : "log",... value : function(msg, level) {... var date = "[" + new Date() + "] ";... var lvl = level? level+" " : "";... print(date + lvl + msg);... }})

> db.eval("log('all your base are belong to us', 'FATAL');");

> db.eval("log('all your base are belong to us', 'FATAL');"); [Fri May 19 18:34:57] FATAL all your base are belong to us

J J J J J J J J J

capped collections

indexes

geospatial indexes

MapReduce

what did we leave out?

I say, we should get a mainframe, old chap. Harumph.

are you practicing safe data storage?

Insert this. Okay, got it. Phew, my data's safe.

Write this to disk All over it! I know better than he does, I'll just let this sit in a buffer for a while.

? I have no idea what you're talking about.

trust no one!...trust a bunch of ones. Mostly.

prod1.example.com prod2.example.com

prod1.example.com prod2.example.com

prod1.example.com prod2.example.com

prod1.example.com prod2.example.com

prod1.example.com prod2.example.com

prod1.example.com prod2.example.com

prod1.example.com? prod2.example.com

prod1.example.com prod2.example.com

? prod1.example.com prod2.example.com

prod1.example.com prod2.example.com

prod1.example.com prod2.example.com

primary secondary secondary passive

My priority is 2 My priority is 1 secondary secondary passive

primary secondary passive

I'm 5 minutes behind the master secondary secondary I'm 3 seconds behind the master passive

secondary primary passive

I'll still take reads. passive

okay

?

make sure two slaves have this

all set

scaling

(rdbms)

A - E F - J K - O P - T U - Z

A - E F - J K - O P - T U - Z I want Mark through Sarah.

A - E F - J K - O P - T U - Z

A - E F - J K - O P - T U - Z

A - E F - J K - O P - T U - Z Insert Linus

A - E F - J K - O P - T U - Z Insert Linus

A - E F - J K - O P - T U - Z

$ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help" for help >

$ mongo MongoDB shell version 1.5.5 url: test connecting to: test type "help" for help > db.foo.insert({x:1})

thank you! @kchodorow http://www.snailinaturtleneck.com