SlideShare a Scribd company logo
NOSQL & JSON 
2014/10/12 WU TIEN YANG
JSON
JSON 
JAVASCRIPT OBJECT NOTATION 
• serializing data objects 
• Human-readable,useful for data interchange 
• useful for storing semistructured data
JSON 
• Basic value 
• number,string,boolean 
• Objects{} 
• label-value pairs 
• Arrays[] 
• list of value
LIVE DEMO 
JSON EDITOR ONLINE
JSON 
Relational JSON 
Structure Tables Nest,label-value, 
array 
Schema Fix Flexible 
Queries simple expressive language XD,widely use 
Ordering None Arrays 
Implementation Native system NOSQL system
JSON 
JAVASCRIPT OBJECT NOTATION 
• Sets of label-value pairs 
• Arrays of values 
• Base values from predefined types 
JSON file JSON 
parse program objects 
syntactic error
WHEN JSON MEET PYTHON!
JSON 
JSON PYTHON 
Object dict 
array list,tuple 
str unicode 
null none 
number int,long,float 
encoding: python -> json 
json.dumps() 
decoding: json -> python 
json.loads()
LIVE DEMO
NOSQL
WHY WE CHOOSE NOSQL?
Relational DBMS face the problem! 
problem: semi-structure data 
poor performance 
problem: scaling 
difficult / expensive / impossible ->BIG DATA
NOSQL 
• SQL : Traditional relational DBMS 
• NOSQL = not only SQL 
• MASSIVE!
NOSQL 
NOSQL system V.S Traditional relational DBMS 
• Flexibles schema 
• Quicker / Cheaper to set up 
• Massive scalability 
• Relaxed consistency -high performance,availability
NOSQL 
NOSQL system V.S Traditional relational DBMS 
• Flexibles schema 
• Quicker / Cheaper to set up 
• Massive scalability 
• Relaxed consistency -high performance,availability 
no declarative query language -> more programming 
Relaxed consistency ->fewer guarantees
NOSQL 
MAPREDUCE FRAMEWORK 
• no data model,data stored in files 
• specific function 
• map(),reduce(),read(),write() 
• system provides fault-tolerance,scability
NOSQL 
MAPREDUCE FRAMEWORK 
• Map: divide problem into subproblems 
• map(item) -> <key,value>pairs 
• Reduce: do work on subproblems,combine result 
• reduce(key,lists of value) -> result
NOSQL 
MAPREDUCE EXAMPLE 
Web log analysis 
• record: User ID,URL,timestamp,additional-info 
• task: Count number of accesses for each domain 
• map(record) -> <domain,value> 
• reduce(domain,lists of value) -> <domain,sum>
NOSQL 
KEY-VALUE STORES 
• extremely simple interface 
• Data model: {key,value} pairs 
• Operation : insert , update , delete 
• implement : efficiency,scalability,fault-tolerance 
• record distributed to nodes base on key 
• eventual consistency
MONGODB
MONGODB 
NOSQL DATABASE 
RDBMS MongoDB 
Database Database 
Table collection 
Record/Row Document 
Column Field 
Primary Key _id 
a record = a document 
many documents = a collection
LIVE DOME 
TRY IT OUT !
REFERENCES 
• Stanford University -DB introduction to Databases 
• python library - storing json 
• mongoDB

More Related Content

PDF
“N1QL” a Rich Query Language for Couchbase: Presented by Don Pinto, Couchbase
PPT
Streamlining assessment, feedback, and archival with auto-multiple-choice
PPT
Json - ideal for data interchange
PDF
Evolution of Spark APIs
PPT
The NoSQL Way in Postgres
 
KEY
MongoDB at CodeMash 2.0.1.0
PDF
Redis: REmote DIctionary Server
PPTX
Performant applications in Plone
“N1QL” a Rich Query Language for Couchbase: Presented by Don Pinto, Couchbase
Streamlining assessment, feedback, and archival with auto-multiple-choice
Json - ideal for data interchange
Evolution of Spark APIs
The NoSQL Way in Postgres
 
MongoDB at CodeMash 2.0.1.0
Redis: REmote DIctionary Server
Performant applications in Plone

What's hot (20)

PPTX
F# type providers
PDF
NoSQL on ACID - Meet Unstructured Postgres
 
PDF
Extbase object to xml mapping
PDF
Painless OO XML with XML::Pastor
PPSX
Introduction to Vertica (Architecture & More)
PDF
MWLUG Session- AD112 - Take a Trip Into the Forest - A Java Primer on Maps, ...
PDF
PgREST: Node.js in the Database
PDF
Building a spa_in_30min
PDF
Scalding @ Coursera
PDF
Rupy2012 ArangoDB Workshop Part2
PDF
Cassandra@Coursera: AWS deploy and MySQL transition
PDF
Cassandra Explained
PDF
Replacing ActiveRecord With DataMapper
PDF
Document Oriented Access to Graphs
PPTX
Alfresco Reporting & Analytics
PPTX
Introduction to NoSql
PDF
Xephon K A Time series database with multiple backends
PPTX
Hadoop for the Absolute Beginner
PDF
esProc introduction
PPTX
An Introduction To NoSQL & MongoDB
F# type providers
NoSQL on ACID - Meet Unstructured Postgres
 
Extbase object to xml mapping
Painless OO XML with XML::Pastor
Introduction to Vertica (Architecture & More)
MWLUG Session- AD112 - Take a Trip Into the Forest - A Java Primer on Maps, ...
PgREST: Node.js in the Database
Building a spa_in_30min
Scalding @ Coursera
Rupy2012 ArangoDB Workshop Part2
Cassandra@Coursera: AWS deploy and MySQL transition
Cassandra Explained
Replacing ActiveRecord With DataMapper
Document Oriented Access to Graphs
Alfresco Reporting & Analytics
Introduction to NoSql
Xephon K A Time series database with multiple backends
Hadoop for the Absolute Beginner
esProc introduction
An Introduction To NoSQL & MongoDB
Ad

Viewers also liked (9)

PDF
Collaborative Filtering Recommendation Algorithm based on Hadoop
PDF
Weebly上手教學
PDF
Semantic ui教學
PDF
沒有想像中簡單的簡單分類器 Knn
PDF
Collaborative filtering
PDF
Python簡介和多版本虛擬環境架設
PDF
響應式網頁教學
PDF
Python 起步走
Collaborative Filtering Recommendation Algorithm based on Hadoop
Weebly上手教學
Semantic ui教學
沒有想像中簡單的簡單分類器 Knn
Collaborative filtering
Python簡介和多版本虛擬環境架設
響應式網頁教學
Python 起步走
Ad

Similar to NoSQL & JSON (20)

PPTX
PDF
PostgreSQL, your NoSQL database
PDF
Nosql part1 8th December
PDF
What is NoSQL ?
PPTX
Back to Basics Webinar 1 - Introduction to NoSQL
PPTX
Back to Basics Webinar 1: Introduction to NoSQL
PDF
the rising no sql technology
PPTX
UNIT-2.pptx
PPTX
unit2-ppt1.pptx
PDF
No sql bigdata and postgresql
PPTX
cours database pour etudiant NoSQL (1).pptx
PPTX
I say NoSQL you say what
PDF
NOSQL in big data is the not only structure langua.pdf
PDF
NOSQL- Presentation on NoSQL
DOCX
Unit II -BIG DATA ANALYTICS.docx
PPTX
Introduction to Data Science NoSQL.pptx
PPTX
NoSQL.pptx
PPTX
PostgreSQL, your NoSQL database
Nosql part1 8th December
What is NoSQL ?
Back to Basics Webinar 1 - Introduction to NoSQL
Back to Basics Webinar 1: Introduction to NoSQL
the rising no sql technology
UNIT-2.pptx
unit2-ppt1.pptx
No sql bigdata and postgresql
cours database pour etudiant NoSQL (1).pptx
I say NoSQL you say what
NOSQL in big data is the not only structure langua.pdf
NOSQL- Presentation on NoSQL
Unit II -BIG DATA ANALYTICS.docx
Introduction to Data Science NoSQL.pptx
NoSQL.pptx

More from Tien-Yang (Aiden) Wu (6)

PDF
Hidden markov model
PDF
Scalable machine learning
PDF
Scalable sentiment classification for big data analysis using naive bayes cla...
PDF
Parallel-kmeans
PDF
簡易爬蟲製作和Pttcrawler
Hidden markov model
Scalable machine learning
Scalable sentiment classification for big data analysis using naive bayes cla...
Parallel-kmeans
簡易爬蟲製作和Pttcrawler

Recently uploaded (20)

PPTX
Weekly report ppt - harsh dattuprasad patel.pptx
PPTX
"Secure File Sharing Solutions on AWS".pptx
PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
PPTX
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
DOCX
Greta — No-Code AI for Building Full-Stack Web & Mobile Apps
PPTX
Why Generative AI is the Future of Content, Code & Creativity?
PDF
Digital Systems & Binary Numbers (comprehensive )
PDF
AI/ML Infra Meetup | LLM Agents and Implementation Challenges
PPTX
Cybersecurity: Protecting the Digital World
PDF
Cost to Outsource Software Development in 2025
PDF
Designing Intelligence for the Shop Floor.pdf
DOCX
How to Use SharePoint as an ISO-Compliant Document Management System
PDF
iTop VPN Crack Latest Version Full Key 2025
PDF
Wondershare Recoverit Full Crack New Version (Latest 2025)
PPTX
Introduction to Windows Operating System
PPTX
Trending Python Topics for Data Visualization in 2025
PPTX
chapter 5 systemdesign2008.pptx for cimputer science students
PDF
Salesforce Agentforce AI Implementation.pdf
PDF
How AI/LLM recommend to you ? GDG meetup 16 Aug by Fariman Guliev
PDF
Complete Guide to Website Development in Malaysia for SMEs
Weekly report ppt - harsh dattuprasad patel.pptx
"Secure File Sharing Solutions on AWS".pptx
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
Greta — No-Code AI for Building Full-Stack Web & Mobile Apps
Why Generative AI is the Future of Content, Code & Creativity?
Digital Systems & Binary Numbers (comprehensive )
AI/ML Infra Meetup | LLM Agents and Implementation Challenges
Cybersecurity: Protecting the Digital World
Cost to Outsource Software Development in 2025
Designing Intelligence for the Shop Floor.pdf
How to Use SharePoint as an ISO-Compliant Document Management System
iTop VPN Crack Latest Version Full Key 2025
Wondershare Recoverit Full Crack New Version (Latest 2025)
Introduction to Windows Operating System
Trending Python Topics for Data Visualization in 2025
chapter 5 systemdesign2008.pptx for cimputer science students
Salesforce Agentforce AI Implementation.pdf
How AI/LLM recommend to you ? GDG meetup 16 Aug by Fariman Guliev
Complete Guide to Website Development in Malaysia for SMEs

NoSQL & JSON

  • 1. NOSQL & JSON 2014/10/12 WU TIEN YANG
  • 3. JSON JAVASCRIPT OBJECT NOTATION • serializing data objects • Human-readable,useful for data interchange • useful for storing semistructured data
  • 4. JSON • Basic value • number,string,boolean • Objects{} • label-value pairs • Arrays[] • list of value
  • 5. LIVE DEMO JSON EDITOR ONLINE
  • 6. JSON Relational JSON Structure Tables Nest,label-value, array Schema Fix Flexible Queries simple expressive language XD,widely use Ordering None Arrays Implementation Native system NOSQL system
  • 7. JSON JAVASCRIPT OBJECT NOTATION • Sets of label-value pairs • Arrays of values • Base values from predefined types JSON file JSON parse program objects syntactic error
  • 8. WHEN JSON MEET PYTHON!
  • 9. JSON JSON PYTHON Object dict array list,tuple str unicode null none number int,long,float encoding: python -> json json.dumps() decoding: json -> python json.loads()
  • 11. NOSQL
  • 12. WHY WE CHOOSE NOSQL?
  • 13. Relational DBMS face the problem! problem: semi-structure data poor performance problem: scaling difficult / expensive / impossible ->BIG DATA
  • 14. NOSQL • SQL : Traditional relational DBMS • NOSQL = not only SQL • MASSIVE!
  • 15. NOSQL NOSQL system V.S Traditional relational DBMS • Flexibles schema • Quicker / Cheaper to set up • Massive scalability • Relaxed consistency -high performance,availability
  • 16. NOSQL NOSQL system V.S Traditional relational DBMS • Flexibles schema • Quicker / Cheaper to set up • Massive scalability • Relaxed consistency -high performance,availability no declarative query language -> more programming Relaxed consistency ->fewer guarantees
  • 17. NOSQL MAPREDUCE FRAMEWORK • no data model,data stored in files • specific function • map(),reduce(),read(),write() • system provides fault-tolerance,scability
  • 18. NOSQL MAPREDUCE FRAMEWORK • Map: divide problem into subproblems • map(item) -> <key,value>pairs • Reduce: do work on subproblems,combine result • reduce(key,lists of value) -> result
  • 19. NOSQL MAPREDUCE EXAMPLE Web log analysis • record: User ID,URL,timestamp,additional-info • task: Count number of accesses for each domain • map(record) -> <domain,value> • reduce(domain,lists of value) -> <domain,sum>
  • 20. NOSQL KEY-VALUE STORES • extremely simple interface • Data model: {key,value} pairs • Operation : insert , update , delete • implement : efficiency,scalability,fault-tolerance • record distributed to nodes base on key • eventual consistency
  • 22. MONGODB NOSQL DATABASE RDBMS MongoDB Database Database Table collection Record/Row Document Column Field Primary Key _id a record = a document many documents = a collection
  • 23. LIVE DOME TRY IT OUT !
  • 24. REFERENCES • Stanford University -DB introduction to Databases • python library - storing json • mongoDB