Intro to NoSQL and MongoDB

21
Morning with MongoDB Milan Welcome! Wednesday, 24 October 12

description

From A Morning with MongoDB - Milan on October 24, 2012.

Transcript of Intro to NoSQL and MongoDB

Page 1: Intro to NoSQL and MongoDB

Morning with MongoDBMilan

Welcome!

Wednesday, 24 October 12

Page 2: Intro to NoSQL and MongoDB

Morning with MongoDBBill Brooks - 10gen

Norberto Leite - 10genRafaelle Cigni - Byte-Code

And our guests... thank you

Wednesday, 24 October 12

Page 3: Intro to NoSQL and MongoDB

Agenda

09.00 - 09.30 - Reception and Breakfast09.30 - 09.50 - Introduction to NoSQL / MongoDB09.50 - 10:20 - MongoDB Fundamentals and Common Use Cases10:20 - 11:00 - Case Studies: Leroy Merlin, Wellnet11:00 - 11:20 - Coffee Break11:20 - 11:40 - NoSQL / MongoDB in Italian market11:40 - 12:10 - TechCorner: Nicola Iarocci12:10 - 12:30 - MongoDB Roadmap and Futures12:30 - 12:45 - 10gen Support and Services12:45 - 13:00 - Roundtable Q&A13:00 - 13:30 - Networking

Wednesday, 24 October 12

Page 4: Intro to NoSQL and MongoDB

Database Evolution:Store Everything in RDBMs

Wednesday, 24 October 12

Page 5: Intro to NoSQL and MongoDB

Specialized RDBMS for OLAP/BI

Wednesday, 24 October 12

Page 6: Intro to NoSQL and MongoDB

MongoDB = Operational 'Big Data'

Wednesday, 24 October 12

Page 7: Intro to NoSQL and MongoDB

Increasing Complexity & CostDecreasing Productivity

Wednesday, 24 October 12

Page 8: Intro to NoSQL and MongoDB

Data Volume, Type & Use

Agile Development

New Hardware Architectures• Commodity servers• Cloud Computing• Horizontal Scaling

• Trillions of records• 100’s of millions of queries per second

• Real-Time Analytics• Unstructured / semi-structured

• Iterative• Continuous

Forcing Affecting Traditional RDBMS

Wednesday, 24 October 12

Page 9: Intro to NoSQL and MongoDB

NoSQL Really Means...non-relational, next-generation

operational datastores and databases

Wednesday, 24 October 12

Page 10: Intro to NoSQL and MongoDB

NoSQL Really Means...non-relational, next-generation

operational datastores and databases... focus on the “non-relational” bit.

Wednesday, 24 October 12

Page 11: Intro to NoSQL and MongoDB

ColumnKey-Value Document Graph

Cassandra MongoDBRedis Neo4j

NOSQL Categories

Wednesday, 24 October 12

Page 12: Intro to NoSQL and MongoDB

Which one is the best?

Wednesday, 24 October 12

Page 13: Intro to NoSQL and MongoDB

Which one is the best?

Wednesday, 24 October 12

Page 14: Intro to NoSQL and MongoDB

Which one should I use for my use case?

Wednesday, 24 October 12

Page 15: Intro to NoSQL and MongoDB

depth of functionality

scal

abili

ty &

per

form

ance •memcached

•key/value

• RDBMS

Wednesday, 24 October 12

Page 16: Intro to NoSQL and MongoDB

Why use MongoDB?• Easy to start

• Open source• Drivers in every major language

• Easy to develop• Schemaless document model• Flexible query language• Secondary indexes

• Easy to scale• Built in sharding• Asynchronous replication

Wednesday, 24 October 12

Page 17: Intro to NoSQL and MongoDB

Terminology

RDBMS MongoDBTable CollectionRow(s) JSON DocumentIndex IndexJoin Embedding & LinkingPartition ShardPartition Key Shard Key

Wednesday, 24 October 12

Page 18: Intro to NoSQL and MongoDB

RDBMS view of the data

Wednesday, 24 October 12

Page 19: Intro to NoSQL and MongoDB

{ _id : ObjectId("4c4ba5c0672c685e5e8aabf3"), author : "Hergé", date : "Sat Jul 24 2010 19:47:11 GMT-0700 (PDT)", text : "Destination Moon", tags : [ "comic", "adventure" ], comments : [ { author : "Kyle", date : "Sat Jul 24 2010 20:51:03 GMT-0700 (PDT)", text : "great book" } ], comments_count: 1 }

Application view of the data

Wednesday, 24 October 12

Page 20: Intro to NoSQL and MongoDB

Schemas in MongoDB

Design documents that simply map to your application

post = {author: "Hergé", date: new Date(), text: "Destination Moon", tags: ["comic", "adventure"]}

> db.posts.save(post)

Wednesday, 24 October 12

Page 21: Intro to NoSQL and MongoDB

What MongoDB solves

Wednesday, 24 October 12