SlideShare a Scribd company logo
Hello
MongoDB
• open-source
• document-oriented
• json/bson
JSON
> db.users.findOne()
{
"_id" : ObjectId("5099803df3f4948bd2f98391"),
"name" : {
"first" : "Alan",
"last" : "Turing"
},
"birth" : ISODate("1912-06-22T21:00:00Z"),
"death" : ISODate("1954-06-06T21:00:00Z"),
"views" : NumberLong(1250000)
}
_id field
> db.users.findOne({}, {_id: 1, name: 1})
{
"_id" : ObjectId("5099803df3f4948bd2f98391"),
"name" : {
"first" : "Alan",
"last" : "Turing"
}
}
> ObjectId("509..91").getTimestamp()
ISODate("2012-11-06T21:25:17Z")
BSON
• http://bsonspec.org/#/specification
• http://groups.google.com/group/bson
Schemaless
> db.users.update({_id: ObjectId("509..91")},
{ $set: { born: "London, England" }})
> db.users.find({"name.first": "Alan"})
{
"_id" : ObjectId("5099803df3f4948bd2f98391"),
"birth" : ISODate("1912-06-22T21:00:00Z"),
"born" : "London, England",
"death" : ISODate("1954-06-06T21:00:00Z"),
"name" : {
"first" : "Alan",
"last" : "Turing"
},
"views" : NumberLong(1250000)
}
Storage
• mmap
• OS page cache
Journal
• present
• group commit every 100ms, by default (2..300ms)
Fault-tolerance
PRIMARY> rs.conf()
{
"_id" : "rs2",
"version" : 3,
"members" : [
{ "_id" : 0,
"host" : "10.99.41.134:27017" },
{ "_id" : 1,
"host" : "10.28.130.177:27017" },
{ "_id" : 2,
"host" : "10.217.30.225:27017" } ]
}
Sharding
• horizontal partitioning
• multiple nodes
• ‘config‘ servers, 1 or 3, sync. replication
• ‘mongos‘ routers
• db.runCommand(addshard: ... )
• db.runCommand(removeshard: ... )
• chunks, 64M, changeable
• do it once, do it right
• increasing monotonically
• so do not shard by _id
Locks, etc.
• server-wide lock, prior to 2.1
• DB-level lock now
• yield on page fault
• ext3 fallocate, slow
Coursera
“Functional Programming Principles in Scala” by Martin Odersky
https://class.coursera.org/progfun-002/class/index
Mongo DB

More Related Content

KEY
C# Development (Sam Corder)
PDF
PDF
The Ring programming language version 1.7 book - Part 44 of 196
PDF
The Ring programming language version 1.4.1 book - Part 12 of 31
PDF
Building Your First App: An Introduction to MongoDB
PPTX
Building Your First App: An Introduction to MongoDB
PDF
The Ring programming language version 1.7 book - Part 45 of 196
PDF
Latinoware
C# Development (Sam Corder)
The Ring programming language version 1.7 book - Part 44 of 196
The Ring programming language version 1.4.1 book - Part 12 of 31
Building Your First App: An Introduction to MongoDB
Building Your First App: An Introduction to MongoDB
The Ring programming language version 1.7 book - Part 45 of 196
Latinoware

What's hot (16)

PDF
Introduction to jRuby
PDF
The Ring programming language version 1.5.1 book - Part 44 of 180
PDF
The Ring programming language version 1.5.4 book - Part 53 of 185
KEY
MongoDB: How it Works
PDF
Curlin' for Docs
PPTX
Webinaire 2 de la série « Retour aux fondamentaux » : Votre première applicat...
ODP
MySQL vs. PostgreSQL
PDF
Percona Live 4/15/15: Transparent sharding database virtualization engine (DVE)
PDF
The Ring programming language version 1.2 book - Part 29 of 84
PDF
Geospatial technologies
PDF
Chrome拡張開発者のためのFirefox拡張開発
PDF
Getting Started with MongoDB
PDF
Kotlin - Coroutine
PDF
Building Apps with Ember
Introduction to jRuby
The Ring programming language version 1.5.1 book - Part 44 of 180
The Ring programming language version 1.5.4 book - Part 53 of 185
MongoDB: How it Works
Curlin' for Docs
Webinaire 2 de la série « Retour aux fondamentaux » : Votre première applicat...
MySQL vs. PostgreSQL
Percona Live 4/15/15: Transparent sharding database virtualization engine (DVE)
The Ring programming language version 1.2 book - Part 29 of 84
Geospatial technologies
Chrome拡張開発者のためのFirefox拡張開発
Getting Started with MongoDB
Kotlin - Coroutine
Building Apps with Ember
Ad

Similar to Mongo DB (10)

PPT
Building Your First App with MongoDB
PPTX
Introduction to MongoDB and Hadoop
PPTX
Building Your First App with MongoDB
PPTX
Building Your First App with MongoDB
PPTX
Building Your First App: An Introduction to MongoDB
PPTX
Building Your First App: An Introduction to MongoDB
PPTX
Building Your First App with MongoDB
PDF
buildyourfirstmongodbappberlin2013thomas-130313104259-phpapp02.pdf
PPTX
Basic crud operation
PPTX
ETL for Pros: Getting Data Into MongoDB
Building Your First App with MongoDB
Introduction to MongoDB and Hadoop
Building Your First App with MongoDB
Building Your First App with MongoDB
Building Your First App: An Introduction to MongoDB
Building Your First App: An Introduction to MongoDB
Building Your First App with MongoDB
buildyourfirstmongodbappberlin2013thomas-130313104259-phpapp02.pdf
Basic crud operation
ETL for Pros: Getting Data Into MongoDB
Ad

More from Minsk Linux User Group (20)

PDF
Vladimir ’mend0za’ Shakhov — Linux firmware for iRMC controller on Fujitsu P...
PDF
Андрэй Захарэвіч — Hack the Hackpad: Першая спроба публічнага кіравання задач...
PDF
Святлана Ермаковіч — Вікі-дапаможнік. Як узмацніць беларускую вікі-супольнасць
PDF
Тимофей Титовец — Elastic+Logstash+Kibana: Архитектура и опыт использования
PDF
Андрэй Захарэвіч - Як мы ставілі KDE пад FreeBSD
PDF
Vitaly ̈_Vi ̈ Shukela - My FOSS projects
PDF
Vitaly ̈_Vi ̈ Shukela - Dive
PDF
Alexander Lomov - Cloud Foundry и BOSH: истории из жизни
PDF
Vikentsi Lapa — How does software testing become software development?
PDF
Михаил Волчек — Свободные лицензии. быть или не быть? Продолжение
PDF
Максим Мельников — IPv6 at Home: NAT64, DNS64, OpenVPN
PDF
Слава Машканов — “Wubuntu”: Построение гетерогенной среды Windows+Linux на н...
PDF
MajorDoMo: Открытая платформа Умного Дома
PDF
Максим Салов - Отладочный монитор
PDF
Максим Мельников - FOSDEM 2014 overview
PDF
Константин Шевцов - Пара слов о Jenkins
PDF
Ермакович Света - Операция «Пингвин»
PDF
Михаил Волчек - Смогут ли беларусы вкусить плоды Творческих Общин? Creative C...
PDF
Vikentsi Lapa - Tools for testing
PDF
Алексей Туля - А нужен ли вам erlang?
Vladimir ’mend0za’ Shakhov — Linux firmware for iRMC controller on Fujitsu P...
Андрэй Захарэвіч — Hack the Hackpad: Першая спроба публічнага кіравання задач...
Святлана Ермаковіч — Вікі-дапаможнік. Як узмацніць беларускую вікі-супольнасць
Тимофей Титовец — Elastic+Logstash+Kibana: Архитектура и опыт использования
Андрэй Захарэвіч - Як мы ставілі KDE пад FreeBSD
Vitaly ̈_Vi ̈ Shukela - My FOSS projects
Vitaly ̈_Vi ̈ Shukela - Dive
Alexander Lomov - Cloud Foundry и BOSH: истории из жизни
Vikentsi Lapa — How does software testing become software development?
Михаил Волчек — Свободные лицензии. быть или не быть? Продолжение
Максим Мельников — IPv6 at Home: NAT64, DNS64, OpenVPN
Слава Машканов — “Wubuntu”: Построение гетерогенной среды Windows+Linux на н...
MajorDoMo: Открытая платформа Умного Дома
Максим Салов - Отладочный монитор
Максим Мельников - FOSDEM 2014 overview
Константин Шевцов - Пара слов о Jenkins
Ермакович Света - Операция «Пингвин»
Михаил Волчек - Смогут ли беларусы вкусить плоды Творческих Общин? Creative C...
Vikentsi Lapa - Tools for testing
Алексей Туля - А нужен ли вам erlang?

Recently uploaded (20)

PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPT
Teaching material agriculture food technology
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
Spectroscopy.pptx food analysis technology
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
NewMind AI Weekly Chronicles - August'25 Week I
Machine learning based COVID-19 study performance prediction
Programs and apps: productivity, graphics, security and other tools
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Mobile App Security Testing_ A Comprehensive Guide.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Encapsulation_ Review paper, used for researhc scholars
Unlocking AI with Model Context Protocol (MCP)
Advanced methodologies resolving dimensionality complications for autism neur...
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Teaching material agriculture food technology
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
Empathic Computing: Creating Shared Understanding
Diabetes mellitus diagnosis method based random forest with bat algorithm
Agricultural_Statistics_at_a_Glance_2022_0.pdf
The AUB Centre for AI in Media Proposal.docx
Spectroscopy.pptx food analysis technology

Mongo DB