MONGODB NOSQL SERIES Karol Rástočný 1. Prominent Users 2  AppScale, bit.ly, Business Insider, CERN LHC, craigslist, diaspora, Disney Interactive Media.

Slides:



Advertisements
Similar presentations
Introduction to MongoDB
Advertisements

Com Jean Carlo Nascimento aka SUISSA. github.com/suissa about.me/suissa
1.866.iQmetrix MongoDB on Azure Agenda Me / iQmetrix Architecture NoSQL databases MongoDB 10gen Running MongoDB in Azure History, Issues.
NoSQL Databases: MongoDB vs Cassandra
In 10 minutes Mohannad El Dafrawy Sara Rodriguez Lino Valdivia Jr.
Multiple Tiers in Action
Mastering Redis A Primer Data Masters. Special Thanks To… Planet Linux Caffe
Graph databases …the other end of the NoSQL spectrum. Material taken from NoSQL Distilled and Seven Databases in Seven Weeks.
An introduction to MongoDB Rácz Gábor ELTE IK, febr. 10.
Building applications with MongoDB – An introduction Roger
Jeff Lemmerman Matt Chimento Medtronic Confidential 1 9th Annual CodeFreeze Symposium Medtronic Energy and Component Center.
VICTORIA UNIVERSITY OF WELLINGTON Te Whare Wananga o te Upoko o te Ika a Maui SWEN 432 Advanced Database Design and Implementation MongoDB Read Lecturer.
VICTORIA UNIVERSITY OF WELLINGTON Te Whare Wananga o te Upoko o te Ika a Maui SWEN 432 Advanced Database Design and Implementation MongoDB Data Modeling.
AN INTRODUCTION TO NOSQL DATABASES Karol Rástočný, Eduard Kuric.
Irwin/McGraw-Hill Copyright © 2000 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS5th Edition.
MEAN Stack c0nrad. Overview Day 1: – MEAN Stack – NodeJS Mini Cat Fact Spammer – MongoDB Cat Profiles – Express Catbook API (Facebook for cats) Day 2:
JSON The Fat Free Alternative to XML. Data Interchange The key idea in Ajax. An alternative to page replacement. Applications delivered as pages. How.
MongoDB An introduction. What is MongoDB? The name Mongo is derived from Humongous To say that MongoDB can handle a humongous amount of data Document.
NoSQL continued CMSC 461 Michael Wilson. MongoDB  MongoDB is another NoSQL solution  Provides a bit more structure than a solution like Accumulo  Data.
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
Lecture 19 Web Application Frameworks Boriana Koleva Room: C54
Goodbye rows and tables, hello documents and collections.
WEEK 1, DAY 2 STEVE CHENOWETH CSSE DEPT CSSE 533 –INTRO TO MONGODB.
CERN-PH-SFT-SPI August Ernesto Rivera Contents Context Automation Results To Do…
VICTORIA UNIVERSITY OF WELLINGTON Te Whare Wananga o te Upoko o te Ika a Maui SWEN 432 Advanced Database Design and Implementation MongoDB Architecture.
DAT602 Database Application Development Lecture 2 Review of Relational Database.
Today we’re gonna talk about… therightabstractions.com.
MongoDB Jer-Shuan Lin.
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.
03 | Express and Databases
NoSQL Or Peles. What is NoSQL A collection of various technologies meant to work around RDBMS limitations (mostly performance) Not much of a definition...
HDB++: High Availability with
Azure databases 1. Azure storage possibilities Azure offers several storage possibilities Microsoft SQL Server database MySQL database Azure Document.
Intro REST service using MongoDB as backend Two basic operations (to simplify) – Update attributes in entities (e.g. update the “speed” attribute in the.
POSTGRESQL 13 TH MARCH HISTORY DESIGNED BY MICHAEL STONEBRAKER ( ANDREW YU, JOLLY CHEN) AT UCLA (1999) COMMUNITY DEVELOPED 15 YEARS ACTIVE DEVELOPMENT.
Introduction to MongoDB. Database compared.
(Part 2) Josh Wells. Topics  Quick Review  Aggregation  Sharding  MongoDB Users.
Distributed databases A brief introduction with emphasis on NoSQL databases Distributed databases1.
COMP 430 Intro. to Database Systems MongoDB. What is MongoDB? “Humongous” DB NoSQL, no schemas DB Lots of similarities with SQL RDBMs, but with more flexibility.
1 Gaurav Kohli Xebia Breaking with DBMS and Dating with Relational Hbase.
Data Management in the Cloud
IKT437 Knowledge Engineering and Representation
Plan for Final Lecture What you may expect to be asked in the Exam?
Mongo Database (Intermediate)
NO SQL for SQL DBA Dilip Nayak & Dan Hess.
and Big Data Storage Systems
Cloud Computing and Architecuture
Outline Introduction Programming in eclipse Debugging in eclipse
Outline Introduction Programming in eclipse Debugging in eclipse
Lecturer : Dr. Pavle Mogin
MongoDB Distributed Write and Read
Learning MongoDB ZhangGang
NOSQL.
Christian Stark and Odbayar Badamjav
MongoDB CRUD Operations
javascript for your data
Special types Objects and operators built into the language but used only in modules: Ellipsis (also “…”): used chiefly in slices in modules like numpy.
Relational databases, and more …
NoSQL CPSC 4670/5670.
MongoDB Introduction, Installation & Execution
CMPE 280 Web UI Design and Development October 18 Class Meeting
CSE 482 Lecture 5: NoSQL.
CS5220 Advanced Topics in Web Programming Introduction to MongoDB
Building applications with MongoDB – An introduction
Azure Cosmos DB with SQL API .Net SDK
NoSQL & Document Stores
NoSQL databases An introduction and comparison between Mongodb and Mysql document store.
Server & Tools Business
Presentation transcript:

MONGODB NOSQL SERIES Karol Rástočný 1

Prominent Users 2  AppScale, bit.ly, Business Insider, CERN LHC, craigslist, diaspora, Disney Interactive Media Group, EA, foursquare, GitHub, MTV Networks, SAP, Shutterfly, SourceForge, The Guardian, The New York Times, Etsy, Thumbtack, Uber, Wordnik

Internal Structure  Databases  Collections  Equivalent to relational database tables  Documents  BSON objects  Attributes’ data types: object, object id, string, integer, boolean, double, null, array, date, timestamp, binary data, regular expression, code 3

Architecture  Single node/database  Single database replicated over several nodes  Shared (partitioned) database Clientmongod Clientmongod 4

Architecture - Partitioned database 5 mongod Client mongos mongod Config Servers mongos Shards … …

Replication  Master slave  1 mongod is initialized as master – allows writing  ≥ 1 mongods are initialized as slaves – replicated directly from master  Replica set  Type of Master slave  Master (primary node) is elected 6

Consistency  Managed by drivers  Strong consistency  Reading from the primary node  E.g. updating of source code  Eventual consistency  Reading from any live node  E.g. wiki page 7 Primary Driver Replica Read Write Read

Querying  Indexing  Querying objects’ attributes  Logic expressions, mathematical operations, regexes, …  Sort, skip, limit  Result: Array of queried objects  db.foo.find( { name : "bob", $or : [ { a : 1 }, { b : 2 } ] })  MapReduce + Finalize  Result: View 8

Updating  Several confirmation techniques  No transactions  Atomic operations  db.shapes.update( { type: "square" }, { $inc: { x: 5 } } )  Blocking – does not support sharding  db.students.update({score: {$gt: 60}, $atomic: true}, {$set: {pass: true}}, false, true)  Find and Modify 9

Connectors  Drivers  mongodb.org: C, C++, Erlang, Haskell, Java, Javascript,.NET (C#, PowerShell, etc), Perl, PHP, Python, Ruby, Scala  Community: ActionScript3, Clojure, ColdFusion, D, Delphi, Entity, Factor, Go, Groovy, Lisp, Lua, MatLab, node.js, Objective C, Opa, Prolog, R, REST, Racket, Smalltalk  REST add-on  JavaScript console 10

Drivers - C# MongoServer server = MongoServer.Create(connectionString); MongoDatabase database = server.GetDatabase(databaseName); var annotations = database.GetCollection (collectionName); Annotation annotation = new Annotation() {…}; annotations.Insert(annotation); annotation = annotations.FindOneById(uri); class Annotation { [BsonId] public string Uri { get; set; } public DateTime Created { get; set; } public ITarget[] HasTarget { get; set; }... } 11

JavaScript Console 12 > use Test switched to db Test > db.Annotations.save({ _id: " false }) > db.Annotations.find().forEach(printjson) { "_id" : " "IsDeleted" : true} { "_id" : " "IsDeleted" : false } > annot = db.Annotations.findOne({_id: " { "_id" : " "IsDeleted" : false } > annot.IsDeleted = true true > db.Annotations.save(annot) > db.Annotations.find().forEach(printjson) { "_id" : " "IsDeleted" : true} { "_id" : " "IsDeleted" : true} JavaScript Console

Resources  Website:   SQL to Mongo  ngo+Mapping+Chart ngo+Mapping+Chart  Practical Replication Video  /a-mongodb-replication-primer-replica-sets-in- practice /a-mongodb-replication-primer-replica-sets-in- practice 13