Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
No SQL
Search
Andy Cheng
August 08, 2013
Programming
84
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
No SQL
Andy Cheng
August 08, 2013
More Decks by Andy Cheng
See All by Andy Cheng
第一次自建雲端服務就上手
ccjeng
0
82
The Clean Coder
ccjeng
0
4.5k
Android Backup
ccjeng
0
58
Android Backup Demo
ccjeng
0
48
.NET Framework update
ccjeng
0
66
Book Sharing 2013
ccjeng
0
68
MS SQL 2012 BI Update
ccjeng
0
53
Other Decks in Programming
See All in Programming
AI主導のプログラミング学習アプリを作ってみた
econanringo
0
180
半永久的に提供し続けられるプライベートクラウドを目指して ― 利用者の認知負荷を抑えるAPI抽象化とハードウェア世代交代の基盤設計
tomokon
0
520
Event is what happens
moro
2
1.2k
Findy - エンジニア向け会社紹介/Findy Company Deck
findyinc
6
400k
現場と育てるRailsモデリング 〜Spreadsheetから始めたモデル設計〜
siroemk
2
850
[Dev Group Paris Octobre 26] Agentforce, SIforce, Claudeforce, Slackbot… on s'y retrouve ?
nabondance
0
120
[2026-10-14](C)Re:ゼロから始める異世界生活〜始まりの終わりと終わりの始まり〜
tosite
0
140
golang-bob.pdf
iwatsukayura
0
130
Long Living Tokens, Die, Die, Die! (or: The One Ring is Banned in Modern)
sylph01
0
350
Atomic Design, Enforced: Scaling Mobile Design Systems (next.app devCon / droidCon Berlin 2026)
steliosf
PRO
0
180
Lambda durable functionsでHuman in the Loopを楽に…楽に……
har1101
1
180
ActionController meets Protocol Buffers
sorah
0
670
Featured
See All Featured
Accessibility Awareness
sabderemane
1
250
Tell your own story through comics
letsgokoyo
1
1.1k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
30 Presentation Tips
portentint
PRO
1
430
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.4k
Paper Plane (Part 1)
katiecoart
PRO
2
12k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
2.9k
How Software Deployment tools have changed in the past 20 years
geshan
2
35k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
3.5k
My Coaching Mixtape
mlcsv
0
360
Testing 201, or: Great Expectations
jmmastey
46
8.3k
Transcript
NOSQL Andy Cheng 2013.08.08
彈性!
HR Ad-Hoc Query
User Experience Developer Experience
1.資料量的成長 2.連線裝置的增加 3.半結構化資料分析的需求 Why NOSQL?
Trend 1: 資料量的成長
Trend 1: 資料量的成長 Twitter at 400M Tweets Per Day in
Jun’ 12 Facebook at 1B Users in Oct’ 12 1億用戶數4.5年(1665天)
Trend 2: 連線裝置的增加
Trend 3: “半結構化資料”分析的需求 • Semi-structured data o Data that does
not reside in fixed fields but use tags or other markers to capture elements of the data • 例如: Logs、GPS 座標、XML、JSON、網頁 內容(HTTP Tagged text)
Case Study:復仇者聯盟 • 2012年上映,票房超過10億美金 • 針對觀眾對預告片的評價,分析了11億條推 特推文、570萬篇部落格以及論壇貼文、350 萬條相關訊息,即時建議片商做出因應對策
SQL的限制 • Table Lock (Transaction) • Join, Join, Join (正規化)
• Schema Change (資料型態/長度) • Operational Maintenance(備份…) • Disaster Recovery(Cluster/Log shipping) • Scaleout
SPRAIN http://blogs.the451group.com/information_management/2012/11/02/updated-database-landscape-graphic/
http://db-engines.com/en/ranking DB Engine Ranking
Not Only SQL
• 不是Relational Database • 沒有Schema (Schema-free) • 沒有Join • 沒有正規化
• 是另一種的資料儲存方式 • 分散式架構 • Open Source • 最終一致性 Eventually Consistency No SQL
CAP定律 • Consistency: 一致性 所有節點在同一時間都具有相同的數據 • Availability: 可用性 保證每個請求不管成功或者失敗都有響應 •
Partition Tolerance: 分隔容忍 系統中任意訊息的失敗不會影響系統的繼續運作 理論上無法同時兼顧CAP三種特性, NoSQL資料庫通常會選擇其中兩種特 性來設計,通常是選擇CP或AP
http://blog.nahurst.com/visual-guide-to-nosql-systems
Key Value Document Column Family Graph
None
NOSQL Data Model
{ “_id” : 1001, “customer_id”: 98234 } { “_id” :
1002, “customer_id”: 98311, “discount”: “Y” } _id: 1001 _id: 1002 Key Value Table: Customer
{ “_id” : 1001, “customer_id”: 7231, “line_items” : [ {“product_id”:
4555, “quantity”: 8}, {“product_id”: 7655, “quantity”: 4}, {“product_id”: 8755, “quantity”: 3}] } { “_id” : 1002, “customer_id”: 98311, “line_items” : [ {“product_id”: 4555, “quantity”: 3}, {“product_id”: 2155, “quantity”: 4}], “discount”: “Y” } Key Document _id: 1001 _id: 1002 Table: Customer
Column Family
Column Family
Graph Connie Ma Max Cheng Mahendra Negi Eva Chen Report
To Report To IS Function Function Jo Ma Claudia Wu Terry Huang Alex Kuo Report To Report To Report To Report To Report To HR
參考資料 • Martin Fowler: NoSQL Distilled to an Hour http://vimeo.com/66052102
• http://nosql.org.tw/ • http://blog.nosqlfan.com/ • http://www.csdn.net/article/tag/nosql
Demo
MongoDB • JSON like document store (BSON) • Embeded, Referenced
• Sharding:將數據水平切分到不同物理節點 • Replica Set:數據同步 • Mongo Query Language • HTTP / REST API • GridFS:文件存儲API • MapReduce:可以進行複雜的統計和並行計算
Replica Set
Neo4J • Graph Database • A powerful traversal framework •
Cypher Query Language