Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
NoSQL & MongoDB
Search
Shuai Liu
June 20, 2014
Programming
200
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
NoSQL & MongoDB
Shuai Liu
June 20, 2014
More Decks by Shuai Liu
See All by Shuai Liu
Auto-Layout.pdf
liushuaikobe
2
140
Python-intro-2
liushuaikobe
0
91
Python-intro-1
liushuaikobe
0
89
GitRadar——毕业论文答辩
liushuaikobe
0
220
Other Decks in Programming
See All in Programming
Loosening the Reins: Go Generics Get More Flexible
kuro_kurorrr
0
330
Discordを用いたラボオートメーション関連情報収集の自動化
noguhiro2002
0
440
VibeCodingからAgenticWorkflowへ
starfish719
0
870
仕様駆動開発の消費期限
watany
20
9k
AI Readyの正体はデータマネジメントだ メダリオン2.0の最前線
freee
PRO
0
390
不幸な GC
chencmd
0
740
人間の目はかわらない、だからJPEGは30年もつ
yuzneri
12
19k
jsmini JavaScript Engine を作ってみた話
yosuke_furukawa
PRO
0
350
源内ハンズオン概要編
hideg
0
210
Go 1.27からのGODEBUG / Go 1.27 リリースパーティ #go127party
mazrean
0
220
Webエンジニアなのにブラウザの仕組みがわからないので、Pythonで自作してみた
tatsuki12
4
1.1k
まだ間に合う!今年の夏こそSchemeのマクロ展開器を完全理解!
omasanori
0
500
Featured
See All Featured
Evolving SEO for Evolving Search Engines
ryanjones
0
260
The Cult of Friendly URLs
andyhume
79
7k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
500
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.4k
Designing for Performance
lara
611
70k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
970
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
790
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
340
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
500
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6.1k
Agile that works and the tools we love
rasmusluckow
331
22k
Transcript
No-SQL & mongoDB @liushuaikobe
What’s No-SQL?
Strozzi NoSQL (1998) RDBMS operator-stream paradigm(PIPE) a set of shell
routines that access normal files of the OS Carlo Strozzi
No-SQL == Not Have SQL
No-SQL == Not Have Structured Query Language SQL
…departs from the relational model altogether; it should therefore have
been called more appropriately 'NoREL'.
A meetup@San Francisco ——"open source, distributed, non relational databases” Organized
by Johan Oskarsson(Last.fm) Google's Bigtable & Amazon's Dynamo Eric Evans(then in RackSpace) reintroduced “No-SQL”
No-SQL == non-relational
Eric Evans My regret however isn't about what the name
says, it's about what it doesn't.
no:sql(east) conference@ Atlanta
> select fun, profit > from real_world > where relational=false;
No-SQL == Not Only SQL
CAP Theorem (Eric Brewer) Consistency Partition Tolerance Availability
BASE neutral A C I D PH S B E
A
asically vailable ventually Consistent oft-state S B E A
Why No-SQL? Traditional RDBMS —— CA Do We really need
Transaction? Horizontal-Scale
List Of NoSQL DBs Wide Column Store Document Store Key
Value / Tuple Store Graph Databases …
mongoDB
10gen established in 2007, @New York originally aimed to build
a Paas architecture released MongoDB, maintaining it
MongoDB Inc. (2013.08) established in 2007, @New York originally aimed
to build a Paas architecture released MongoDB, maintaining it
MongoDB document-oriented(BSON) Storage schema-free high-performance build for scale
Document
Data-Model Design References Embedded
Reference
Embedded
which way is better? No Define answer.
A Instance
{ "actor_attributes" : {
"name" : "Dan Tao", "company" : "Google", ... "email" : "
[email protected]
" }, "repository" : { "fork" : false, "watchers" : 0, "description" : "Oh, nothing, nothing", ... "id" : 13155632, "name" : "breakneck" }, "url" : "https://github.com/dtao/breakneck/compare/dccee09561...38984e5dce", "created_at" : "2013-‐09-‐28T18:00:06-‐07:00", "actor" : "dtao", "public" : true, "type" : "PushEvent", "payload" : { "shas" : [ [ ... ] ], "head" : "38984e5dce1a21b778d4c26bde493270b4625662", "ref" : "refs/heads/master", "size" : 1 } }
RDBMS——ERD Actor Repo Event 1..n 1..1 1..n 1..1
While in mongo… { "_id" : ObjectId("5287d3e947e36f2280584179") "actor_attributes"
: { "name" : "Dan Tao", "company" : "Google", ... "email" : "
[email protected]
" } } { "_id" : ObjectId("5287d3e947e36f22805844b3") "actor_attributes" : { "name" : "Dan Tao", "company" : "Google", ... "email" : "
[email protected]
" } } { "_id" : ObjectId("5287d3e947e36f22805844c9") "actor_attributes" : { "name" : "Dan Tao", "company" : "Google", ... "email" : "
[email protected]
" } } Actor
{ "_id" : ObjectId("5287d41647e36f2280586033"), “repository" : {
"fork" : false, ... "name" : "breakneck" }, "actor" : "Sam", … "payload" : { "shas" : [ [ ... ] ], "ref" : "refs/heads/master", "size" : 1 } } Event { "_id" : ObjectId("5287d41647e36f2280586035"), “repository" : { "fork" : false, ... "name" : "breakneck" }, "actor" : "Tom", … "payload" : { "shas" : [ [ ... ] ], "ref" : "refs/heads/master", "size" : 1 } } { "_id" : ObjectId("5287d41647e36f2280586537"), “repository" : { "fork" : false, ... "name" : "breakneck" }, "actor" : "Mike", … "payload" : { "shas" : [ [ ... ] ], "ref" : "refs/heads/master", "size" : 1 } }
Summary No-SQL => No? No! Why No-SQL? CAP & BASE
MongoDB (Inc.) Schema design
How to Choose? Depending on your needs…
Thanks @liushuaikobe
Q & A http:/ /www.girlsgonestrong.com/video-qa/