慕课网 《MongoDB 2014北京大会》视频笔记
2015-02-11 19:24
309 查看
学习地址:MongoDB 2014北京大会
Document database
Open-source
Create Applications — Never Before Possible
MongoDB Business Value:
- Enabiling New Apps
- BetterCustomer Experience
- Faster Time to Marker
- Lower TCO
What we sell?
MongoDB Enterprise Advanced
Management platform, advanced security, proactive support, and more.
MongoDB Management Service(MMS)
Automated deployment, upgrades, backup and monitoring in the cloud.
Production Support
Support for production deployments.
Development Support
Support, on-demand training and health check for teams in development.
Consulting
Packaged service offerings for critical points in the project lifecycle.
Training
Certification and training in development and ops - online & in-person.
THE LARGEST ECOSYSTEM
- 9,000,000+
MongoDB Downloads
- 250,000+
Online Education Registrants
- 35,000+
MongoDB User Group Members
- 40,000+
MongoDB Management Service(MMS) Users
- 600+
Technology and Services Partners
- 1,000+
Custormers Across All Industries
Document Level Locking
( Coming early 2015 )
pluggable : In-memory, RocksDB, TokuKV, FusionIO
What is the storage engine today?
MMAP & WiredTiger
Automation
(Matias Cas callares
Senior Solutions Architect, MongoB Inc.
matias@mongodb.com)
RDBMs
Relational databases are made up of tables
Tables are made up of rows:
All rows have identical structure
Each row has the same number of columns
Every cell in a column stores the same type of data
MongoDB is a Document Oriented database
Document Model
MongoDB is made up of collections
Collections are composed of documents
Each document is a set of key-value pairs
No predefined schema
Keys are always strings
Values can be any(supported) data type
Values can also be an array
Values can also be a document
document inside documents
Benifits of these document model….?
Flexibility
Each document can have different fields
No need of long migrations, easier to be agile
Common structure enforced at application level
Arrays
Documents can have field with array values
Ability to query and index array elements
We can model relationships with no need of different tables or collections
Embedded documents
Documents can have field with document values
Ability to query and index nested documents
Semantic closer to Object Oriented Programming
Relational Schema Design:
Focus on data storage.
Document Schema Design:
Focus on data usage.
SCHEMA DESIGN IS AN ART
A task tracking app
Requirement #1
“We need to store user information” like name, email and their addresses…yes they can have mort than one.”
—Bill, a project manager, contemporary
Requirement #2
“We have to be able to store tasks, assign them to users and track their progress…”
—Bill, a project manager, contemporary
Embedding tasks
Tasks are unbounded items: initially we do not know how many tasks we are going to have
A user along time can end with thousands of tasks
Maximum document size in MongoDB: 16MB!
It is harder to access task information without a user context
Array update operators
pop
push
pull
pullAll
Why is expensive to move a document?
We need to write the document in another locaion($$)
We need to mark the original position as free for new documents($)
We need to update all those index entries pointing to the moved document to the new location($$$)
Considerations with arrays
Limited number of items
Avoid document movements
Document movements can be delayed with padding factor
Document movement can be mitigated with preallocation
RECIPE #4
USE DATA MODELS THAT MINIMIZE THE NEED FOR DOCUMENT GROWTH
RECIPE #5
DENORMALIZE TO AVOID APP-LEVEL JOINS
RECIPI #6
DENORMALIZE ONLY WHEN YOU HAVE A HIGH READ TO WRITE RATIO
Bucketing
What’s th idea?
Reduce number of documents to be retrieved
Less documents to retrieve mean less disk seeks
Using arrays we can store more than one entity per document
We group things that are accessed together
第一章 MongoDB欢迎致辞及MongoDB简介
General purposeDocument database
Open-source
Create Applications — Never Before Possible
MongoDB Business Value:
- Enabiling New Apps
- BetterCustomer Experience
- Faster Time to Marker
- Lower TCO
What we sell?
MongoDB Enterprise Advanced
Management platform, advanced security, proactive support, and more.
MongoDB Management Service(MMS)
Automated deployment, upgrades, backup and monitoring in the cloud.
Production Support
Support for production deployments.
Development Support
Support, on-demand training and health check for teams in development.
Consulting
Packaged service offerings for critical points in the project lifecycle.
Training
Certification and training in development and ops - online & in-person.
THE LARGEST ECOSYSTEM
- 9,000,000+
MongoDB Downloads
- 250,000+
Online Education Registrants
- 35,000+
MongoDB User Group Members
- 40,000+
MongoDB Management Service(MMS) Users
- 600+
Technology and Services Partners
- 1,000+
Custormers Across All Industries
Document Level Locking
( Coming early 2015 )
pluggable : In-memory, RocksDB, TokuKV, FusionIO
What is the storage engine today?
MMAP & WiredTiger
Automation
第2章 MongoDB模式设计的艺术:该做的与不该做的
The Fine Art of Schema Design: Dos and Don’ts(Matias Cas callares
Senior Solutions Architect, MongoB Inc.
matias@mongodb.com)
RDBMs
Relational databases are made up of tables
Tables are made up of rows:
All rows have identical structure
Each row has the same number of columns
Every cell in a column stores the same type of data
MongoDB is a Document Oriented database
Document Model
MongoDB is made up of collections
Collections are composed of documents
Each document is a set of key-value pairs
No predefined schema
Keys are always strings
Values can be any(supported) data type
Values can also be an array
Values can also be a document
document inside documents
Benifits of these document model….?
Flexibility
Each document can have different fields
No need of long migrations, easier to be agile
Common structure enforced at application level
Arrays
Documents can have field with array values
Ability to query and index array elements
We can model relationships with no need of different tables or collections
Embedded documents
Documents can have field with document values
Ability to query and index nested documents
Semantic closer to Object Oriented Programming
Relational Schema Design:
Focus on data storage.
Document Schema Design:
Focus on data usage.
SCHEMA DESIGN IS AN ART
A task tracking app
Requirement #1
“We need to store user information” like name, email and their addresses…yes they can have mort than one.”
—Bill, a project manager, contemporary
Requirement #2
“We have to be able to store tasks, assign them to users and track their progress…”
—Bill, a project manager, contemporary
Embedding tasks
Tasks are unbounded items: initially we do not know how many tasks we are going to have
A user along time can end with thousands of tasks
Maximum document size in MongoDB: 16MB!
It is harder to access task information without a user context
Array update operators
pop
push
pull
pullAll
Why is expensive to move a document?
We need to write the document in another locaion($$)
We need to mark the original position as free for new documents($)
We need to update all those index entries pointing to the moved document to the new location($$$)
Considerations with arrays
Limited number of items
Avoid document movements
Document movements can be delayed with padding factor
Document movement can be mitigated with preallocation
RECIPE #4
USE DATA MODELS THAT MINIMIZE THE NEED FOR DOCUMENT GROWTH
RECIPE #5
DENORMALIZE TO AVOID APP-LEVEL JOINS
RECIPI #6
DENORMALIZE ONLY WHEN YOU HAVE A HIGH READ TO WRITE RATIO
Bucketing
What’s th idea?
Reduce number of documents to be retrieved
Less documents to retrieve mean less disk seeks
Using arrays we can store more than one entity per document
We group things that are accessed together
相关文章推荐
- 2014 北京 DevFest 大会可以报名啦,小伙伴们还在等什么
- 慕课网《如何用CSS进行网页布局》视频学习笔记
- 北京圣思园张龙Java教学视频学习笔记1
- Yii2学习笔记(二):慕课网视频教程笔记
- 【云周刊】第152期:北京云栖大会的技术红利:视频服务降价34%,基础设施降价25%
- [视频] 开放物联网大会2014
- 慕课网AngularJS实战讲解视频笔记
- 慕课网《Python遇见数据采集》学习过程笔记【1】(这个视频不适合我,终断)
- Unite2014大会的一些笔记
- 2014 北京 DevFest 大会能够报名啦,小伙伴们还在等什么
- 孙鑫教学视频笔记(18)ActiveX 控件
- 中山大学c++视频笔记(一)
- 孙鑫VC++视频笔记(15)多线程与聊天室的创建
- flv视频转换和flash播放的解决方案笔记
- VC视频教程笔记(第一课)
- 孙鑫VC++视频教程笔记之---Lesson 7 对话框
- 看孙鑫老师VC++视频教程笔记 之 多线程编程(一)
- 孙鑫教学视频笔记 (16)线程同步与异步套接字编程
- 孙鑫教学视频笔记(20)Hook
- 视频捕获笔记