SlideShare a Scribd company logo
1 of 18
Using MongoDB for BigData
May, 2017
... In 20 minutes
Agenda
• What is MongoDB?
• Replica Sets
• Sharding and Sharded Cluster
• MapReduce
• Spark and MongoDB
What is MongoDB?
• Open-source
• NoSQL
• Community / Enterprise versions
• Developed by MongoDB Inc. (formerly 10gen) in C++, C and JavaScript
• Cross-platform: Windows, Linux, OS X, Solaris, FreeBSD
• Document-oriented: stores extended binary JSON = BSON documents
• Stores any binary data like videos, pictures ... in GridFS
• Database development in JavaScript (standard libraries and user defined functions)
• Deploy, monitor, back up and scale MongoDB: Ops Manager
• Use MongoDB as a data source for your SQL-based BI: MongoDB Connector for BI,
SlamData
• Cross-platform UI for development: Robomongo
• Hosted MongoDB as a service: MongoDB Atlas
• Hosted platform for managing MongoDB: MongoDB Cloud Manager
• An another cloud provider: mLab
Some Organizations Rely on MongoDB
DB-Engines.com Top 10
Most popular NoSQL database
Terminology
RDBMS MongoDB
Database Database
Table Collection
Row Document
Index Index
Join Embedding
Partition Shard
Partition Key Shard Key
use blogdb
db.blog.insert({
"title" : "My Blog Post",
"content" : "Here's my blog post.",
"date" : ISODate("2016-08-24T21:12:09.982Z")
});
db.blog.find()
{ "_id" : ObjectId("591be0f4c79fa21e08c2e24e"), "title" : "My Blog Post", "content" :
"Here's my blog post.", "date" : ISODate("2016-08-24T21:12:09.982Z") }
Some Examples
collection object
method
current database object
generated universally unique primary key
db.blog.update(
{"_id" : ObjectId("591be0f4c79fa21e08c2e24e")},
{$push:
{"comments":
{"user":"usr1", "date":ISODate("2016-08-24T22:12:09.982Z"), text:"first comment"}
}})
db.blog.find().pretty()
{
"_id" : ObjectId("591be0f4c79fa21e08c2e24e"),
"title" : "My Blog Post",
"content" : "Here's my blog post.",
"date" : ISODate("2016-08-24T21:12:09.982Z"),
"comments" : [
{
"user" : "usr1",
"date" : ISODate("2016-08-24T22:12:09.982Z"),
"text" : "first comment"
}
]
}
Some Examples
embedding
orders collection:
MapReduce Example
{
_id: ObjectId("50a8240b927d5d8b5891743c"),
cust_id: "abc123",
ord_date: new Date("Oct 04, 2012"),
status: 'A',
price: 25,
items: [ { sku: "mmm", qty: 5, price: 2.5 },
{ sku: "nnn", qty: 5, price: 2.5 } ]
}
var mapFunction1 = function() {
emit(this.cust_id, this.price);
};
var reduceFunction1 = function(keyCustId, valuesPrices) {
return Array.sum(valuesPrices);
};
db.orders.mapReduce(
mapFunction1,
reduceFunction1,
{ out: "map_reduce_example" }
)
Replica Sets: high availability
Read (optional) Read (optional)
Replication
Replica sets: automatic failover
Sharded Cluster
Shards are replica sets
Sharding
Ranged
Hashed
Zone
Manually associate shard key ranges to zones (groups of shards)
MongoDB connector to Apache Spark
Can be sharded
clusters too!
Data can be filtered,
aggregated at MongoDB
level
• Speedy
• Highly available
• Flexible data model
• Simple to use
• Infinite data size
BUT
• Sharded Cluster deployment requires planning!
Summary
• Install a MongoDB server / sign up to a free hosted MongoDB service like mLab sandbox
• Load the postcodes.zip data file using the mongoimport utility. If you use a MongoDB service, you will
need to install MongoDB client on your machine first.
• Create a Btree index on place.name, postal_code, place.name + place.country and
place.country fields
• Create a 2dsphere index on place.loc
• Add the {"postal_code" : "38116", "place" : { "name" : "Graceland", "country"
:"US", "state" : "Memphis", "loc" : [ 19.0419, 47.5328 ] } } document to the
collection
• Change the place.loc field of the same document to [-90.02604930000001, 35.0476912]
• Add the field owner: Lisa Marie Presley to the same document. Observe that the structure of
the document is different from the other documents of the collection.
Send me the queries that answer to the following questions:
• What is the value of the postal code of Graceland/Memphis? We need only the {"postal_code" :
"38116"} document, fields other than postal_code are not acceptable!
• How many postal_codes are in Budapest/Hungary?
• When was the "59199cdff0269ea12235e9dc" ObjectId created?
• Top 5 countries by number of documents in descending order
• Which places are within 20km around longitude -90.02604930000001 and latitude 35.0476912
(Graceland)? The result must be sorted in alphabetical order and each place appear in the result only
once (distinct).
Homework
Questions
?
Thank You!

More Related Content

What's hot

An Introduction to Big Data, NoSQL and MongoDB
An Introduction to Big Data, NoSQL and MongoDBAn Introduction to Big Data, NoSQL and MongoDB
An Introduction to Big Data, NoSQL and MongoDB
William LaForest
 
Mongo presentation conf
Mongo presentation confMongo presentation conf
Mongo presentation conf
Shridhar Joshi
 

What's hot (20)

MongoDB World 2016: Poster Sessions eBook
MongoDB World 2016: Poster Sessions eBookMongoDB World 2016: Poster Sessions eBook
MongoDB World 2016: Poster Sessions eBook
 
An Introduction to Big Data, NoSQL and MongoDB
An Introduction to Big Data, NoSQL and MongoDBAn Introduction to Big Data, NoSQL and MongoDB
An Introduction to Big Data, NoSQL and MongoDB
 
MongoDB for Spatio-Behavioral Data Analysis and Visualization
MongoDB for Spatio-Behavioral Data Analysis and VisualizationMongoDB for Spatio-Behavioral Data Analysis and Visualization
MongoDB for Spatio-Behavioral Data Analysis and Visualization
 
Redis & MongoDB: Stop Big Data Indigestion Before It Starts
Redis & MongoDB: Stop Big Data Indigestion Before It StartsRedis & MongoDB: Stop Big Data Indigestion Before It Starts
Redis & MongoDB: Stop Big Data Indigestion Before It Starts
 
Introduction to mongoDB
Introduction to mongoDBIntroduction to mongoDB
Introduction to mongoDB
 
The Hive Think Tank: Rocking the Database World with RocksDB
The Hive Think Tank: Rocking the Database World with RocksDBThe Hive Think Tank: Rocking the Database World with RocksDB
The Hive Think Tank: Rocking the Database World with RocksDB
 
MongoDB NYC Python
MongoDB NYC PythonMongoDB NYC Python
MongoDB NYC Python
 
Mongodb
MongodbMongodb
Mongodb
 
Mongo db transcript
Mongo db transcriptMongo db transcript
Mongo db transcript
 
Back to Basics 2017 - Introduction to NoSQL
Back to Basics 2017 - Introduction to NoSQLBack to Basics 2017 - Introduction to NoSQL
Back to Basics 2017 - Introduction to NoSQL
 
Mongo presentation conf
Mongo presentation confMongo presentation conf
Mongo presentation conf
 
Why Your MongoDB Needs Redis
Why Your MongoDB Needs RedisWhy Your MongoDB Needs Redis
Why Your MongoDB Needs Redis
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
MongoDB Hadoop DC
MongoDB Hadoop DCMongoDB Hadoop DC
MongoDB Hadoop DC
 
Monogo db in-action
Monogo db in-actionMonogo db in-action
Monogo db in-action
 
MongoDB : Scaling, Security & Performance
MongoDB : Scaling, Security & PerformanceMongoDB : Scaling, Security & Performance
MongoDB : Scaling, Security & Performance
 
Mongodb
MongodbMongodb
Mongodb
 
MongoDB vs Mysql. A devops point of view
MongoDB vs Mysql. A devops point of viewMongoDB vs Mysql. A devops point of view
MongoDB vs Mysql. A devops point of view
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
Introduction to MongoDB (Webinar Jan 2011)
Introduction to MongoDB (Webinar Jan 2011)Introduction to MongoDB (Webinar Jan 2011)
Introduction to MongoDB (Webinar Jan 2011)
 

Similar to Using MongoDB For BigData in 20 Minutes

Mongo db first steps with csharp
Mongo db first steps with csharpMongo db first steps with csharp
Mongo db first steps with csharp
Serdar Buyuktemiz
 
MongoDB and Ruby on Rails
MongoDB and Ruby on RailsMongoDB and Ruby on Rails
MongoDB and Ruby on Rails
rfischer20
 

Similar to Using MongoDB For BigData in 20 Minutes (20)

Mongo db and hadoop driving business insights - final
Mongo db and hadoop   driving business insights - finalMongo db and hadoop   driving business insights - final
Mongo db and hadoop driving business insights - final
 
Mongo db first steps with csharp
Mongo db first steps with csharpMongo db first steps with csharp
Mongo db first steps with csharp
 
Dev Jumpstart: Build Your First App with MongoDB
Dev Jumpstart: Build Your First App with MongoDBDev Jumpstart: Build Your First App with MongoDB
Dev Jumpstart: Build Your First App with MongoDB
 
Big Data and NoSQL for Database and BI Pros
Big Data and NoSQL for Database and BI ProsBig Data and NoSQL for Database and BI Pros
Big Data and NoSQL for Database and BI Pros
 
Big Data, NoSQL with MongoDB and Cassasdra
Big Data, NoSQL with MongoDB and CassasdraBig Data, NoSQL with MongoDB and Cassasdra
Big Data, NoSQL with MongoDB and Cassasdra
 
Node Js, AngularJs and Express Js Tutorial
Node Js, AngularJs and Express Js TutorialNode Js, AngularJs and Express Js Tutorial
Node Js, AngularJs and Express Js Tutorial
 
MongoDB
MongoDBMongoDB
MongoDB
 
Building your first app with MongoDB
Building your first app with MongoDBBuilding your first app with MongoDB
Building your first app with MongoDB
 
MongoDB
MongoDBMongoDB
MongoDB
 
MongoDB 2.4 and spring data
MongoDB 2.4 and spring dataMongoDB 2.4 and spring data
MongoDB 2.4 and spring data
 
MongoDB presentation
MongoDB presentationMongoDB presentation
MongoDB presentation
 
Webinar: When to Use MongoDB
Webinar: When to Use MongoDBWebinar: When to Use MongoDB
Webinar: When to Use MongoDB
 
Dev Jumpstart: Build Your First App with MongoDB
Dev Jumpstart: Build Your First App with MongoDBDev Jumpstart: Build Your First App with MongoDB
Dev Jumpstart: Build Your First App with MongoDB
 
Introduction to MongoDB Basics from SQL to NoSQL
Introduction to MongoDB Basics from SQL to NoSQLIntroduction to MongoDB Basics from SQL to NoSQL
Introduction to MongoDB Basics from SQL to NoSQL
 
Back to Basics German 3: Einführung ins Sharding
Back to Basics German 3: Einführung ins ShardingBack to Basics German 3: Einführung ins Sharding
Back to Basics German 3: Einführung ins Sharding
 
MongoDB and Ruby on Rails
MongoDB and Ruby on RailsMongoDB and Ruby on Rails
MongoDB and Ruby on Rails
 
Basics of MongoDB
Basics of MongoDB Basics of MongoDB
Basics of MongoDB
 
2016 feb-23 pyugre-py_mongo
2016 feb-23 pyugre-py_mongo2016 feb-23 pyugre-py_mongo
2016 feb-23 pyugre-py_mongo
 
Using MongoDB and Python
Using MongoDB and PythonUsing MongoDB and Python
Using MongoDB and Python
 
When to Use MongoDB
When to Use MongoDBWhen to Use MongoDB
When to Use MongoDB
 

Recently uploaded

一比一原版(曼大毕业证书)曼尼托巴大学毕业证成绩单留信学历认证一手价格
一比一原版(曼大毕业证书)曼尼托巴大学毕业证成绩单留信学历认证一手价格一比一原版(曼大毕业证书)曼尼托巴大学毕业证成绩单留信学历认证一手价格
一比一原版(曼大毕业证书)曼尼托巴大学毕业证成绩单留信学历认证一手价格
q6pzkpark
 
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Bertram Ludäscher
 
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Klinik kandungan
 
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
wsppdmt
 
如何办理澳洲拉筹伯大学毕业证(LaTrobe毕业证书)成绩单原件一模一样
如何办理澳洲拉筹伯大学毕业证(LaTrobe毕业证书)成绩单原件一模一样如何办理澳洲拉筹伯大学毕业证(LaTrobe毕业证书)成绩单原件一模一样
如何办理澳洲拉筹伯大学毕业证(LaTrobe毕业证书)成绩单原件一模一样
wsppdmt
 
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get CytotecAbortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
Displacement, Velocity, Acceleration, and Second Derivatives
Displacement, Velocity, Acceleration, and Second DerivativesDisplacement, Velocity, Acceleration, and Second Derivatives
Displacement, Velocity, Acceleration, and Second Derivatives
23050636
 
Abortion pills in Jeddah |+966572737505 | get cytotec
Abortion pills in Jeddah |+966572737505 | get cytotecAbortion pills in Jeddah |+966572737505 | get cytotec
Abortion pills in Jeddah |+966572737505 | get cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证
原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证
原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证
pwgnohujw
 

Recently uploaded (20)

一比一原版(曼大毕业证书)曼尼托巴大学毕业证成绩单留信学历认证一手价格
一比一原版(曼大毕业证书)曼尼托巴大学毕业证成绩单留信学历认证一手价格一比一原版(曼大毕业证书)曼尼托巴大学毕业证成绩单留信学历认证一手价格
一比一原版(曼大毕业证书)曼尼托巴大学毕业证成绩单留信学历认证一手价格
 
Bios of leading Astrologers & Researchers
Bios of leading Astrologers & ResearchersBios of leading Astrologers & Researchers
Bios of leading Astrologers & Researchers
 
Harnessing the Power of GenAI for BI and Reporting.pptx
Harnessing the Power of GenAI for BI and Reporting.pptxHarnessing the Power of GenAI for BI and Reporting.pptx
Harnessing the Power of GenAI for BI and Reporting.pptx
 
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
 
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
 
Capstone in Interprofessional Informatic // IMPACT OF COVID 19 ON EDUCATION
Capstone in Interprofessional Informatic  // IMPACT OF COVID 19 ON EDUCATIONCapstone in Interprofessional Informatic  // IMPACT OF COVID 19 ON EDUCATION
Capstone in Interprofessional Informatic // IMPACT OF COVID 19 ON EDUCATION
 
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptxRESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
 
Introduction to Statistics Presentation.pptx
Introduction to Statistics Presentation.pptxIntroduction to Statistics Presentation.pptx
Introduction to Statistics Presentation.pptx
 
Ranking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRanking and Scoring Exercises for Research
Ranking and Scoring Exercises for Research
 
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
 
jll-asia-pacific-capital-tracker-1q24.pdf
jll-asia-pacific-capital-tracker-1q24.pdfjll-asia-pacific-capital-tracker-1q24.pdf
jll-asia-pacific-capital-tracker-1q24.pdf
 
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
 
如何办理澳洲拉筹伯大学毕业证(LaTrobe毕业证书)成绩单原件一模一样
如何办理澳洲拉筹伯大学毕业证(LaTrobe毕业证书)成绩单原件一模一样如何办理澳洲拉筹伯大学毕业证(LaTrobe毕业证书)成绩单原件一模一样
如何办理澳洲拉筹伯大学毕业证(LaTrobe毕业证书)成绩单原件一模一样
 
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get CytotecAbortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get Cytotec
 
Displacement, Velocity, Acceleration, and Second Derivatives
Displacement, Velocity, Acceleration, and Second DerivativesDisplacement, Velocity, Acceleration, and Second Derivatives
Displacement, Velocity, Acceleration, and Second Derivatives
 
DBMS UNIT 5 46 CONTAINS NOTES FOR THE STUDENTS
DBMS UNIT 5 46 CONTAINS NOTES FOR THE STUDENTSDBMS UNIT 5 46 CONTAINS NOTES FOR THE STUDENTS
DBMS UNIT 5 46 CONTAINS NOTES FOR THE STUDENTS
 
Abortion pills in Jeddah |+966572737505 | get cytotec
Abortion pills in Jeddah |+966572737505 | get cytotecAbortion pills in Jeddah |+966572737505 | get cytotec
Abortion pills in Jeddah |+966572737505 | get cytotec
 
Digital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham WareDigital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham Ware
 
DAA Assignment Solution.pdf is the best1
DAA Assignment Solution.pdf is the best1DAA Assignment Solution.pdf is the best1
DAA Assignment Solution.pdf is the best1
 
原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证
原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证
原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证
 

Using MongoDB For BigData in 20 Minutes

  • 1. Using MongoDB for BigData May, 2017 ... In 20 minutes
  • 2. Agenda • What is MongoDB? • Replica Sets • Sharding and Sharded Cluster • MapReduce • Spark and MongoDB
  • 3. What is MongoDB? • Open-source • NoSQL • Community / Enterprise versions • Developed by MongoDB Inc. (formerly 10gen) in C++, C and JavaScript • Cross-platform: Windows, Linux, OS X, Solaris, FreeBSD • Document-oriented: stores extended binary JSON = BSON documents • Stores any binary data like videos, pictures ... in GridFS • Database development in JavaScript (standard libraries and user defined functions) • Deploy, monitor, back up and scale MongoDB: Ops Manager • Use MongoDB as a data source for your SQL-based BI: MongoDB Connector for BI, SlamData • Cross-platform UI for development: Robomongo • Hosted MongoDB as a service: MongoDB Atlas • Hosted platform for managing MongoDB: MongoDB Cloud Manager • An another cloud provider: mLab
  • 5. DB-Engines.com Top 10 Most popular NoSQL database
  • 6. Terminology RDBMS MongoDB Database Database Table Collection Row Document Index Index Join Embedding Partition Shard Partition Key Shard Key
  • 7. use blogdb db.blog.insert({ "title" : "My Blog Post", "content" : "Here's my blog post.", "date" : ISODate("2016-08-24T21:12:09.982Z") }); db.blog.find() { "_id" : ObjectId("591be0f4c79fa21e08c2e24e"), "title" : "My Blog Post", "content" : "Here's my blog post.", "date" : ISODate("2016-08-24T21:12:09.982Z") } Some Examples collection object method current database object generated universally unique primary key
  • 8. db.blog.update( {"_id" : ObjectId("591be0f4c79fa21e08c2e24e")}, {$push: {"comments": {"user":"usr1", "date":ISODate("2016-08-24T22:12:09.982Z"), text:"first comment"} }}) db.blog.find().pretty() { "_id" : ObjectId("591be0f4c79fa21e08c2e24e"), "title" : "My Blog Post", "content" : "Here's my blog post.", "date" : ISODate("2016-08-24T21:12:09.982Z"), "comments" : [ { "user" : "usr1", "date" : ISODate("2016-08-24T22:12:09.982Z"), "text" : "first comment" } ] } Some Examples embedding
  • 9. orders collection: MapReduce Example { _id: ObjectId("50a8240b927d5d8b5891743c"), cust_id: "abc123", ord_date: new Date("Oct 04, 2012"), status: 'A', price: 25, items: [ { sku: "mmm", qty: 5, price: 2.5 }, { sku: "nnn", qty: 5, price: 2.5 } ] } var mapFunction1 = function() { emit(this.cust_id, this.price); }; var reduceFunction1 = function(keyCustId, valuesPrices) { return Array.sum(valuesPrices); }; db.orders.mapReduce( mapFunction1, reduceFunction1, { out: "map_reduce_example" } )
  • 10. Replica Sets: high availability Read (optional) Read (optional) Replication
  • 13. Sharding Ranged Hashed Zone Manually associate shard key ranges to zones (groups of shards)
  • 14. MongoDB connector to Apache Spark Can be sharded clusters too! Data can be filtered, aggregated at MongoDB level
  • 15. • Speedy • Highly available • Flexible data model • Simple to use • Infinite data size BUT • Sharded Cluster deployment requires planning! Summary
  • 16. • Install a MongoDB server / sign up to a free hosted MongoDB service like mLab sandbox • Load the postcodes.zip data file using the mongoimport utility. If you use a MongoDB service, you will need to install MongoDB client on your machine first. • Create a Btree index on place.name, postal_code, place.name + place.country and place.country fields • Create a 2dsphere index on place.loc • Add the {"postal_code" : "38116", "place" : { "name" : "Graceland", "country" :"US", "state" : "Memphis", "loc" : [ 19.0419, 47.5328 ] } } document to the collection • Change the place.loc field of the same document to [-90.02604930000001, 35.0476912] • Add the field owner: Lisa Marie Presley to the same document. Observe that the structure of the document is different from the other documents of the collection. Send me the queries that answer to the following questions: • What is the value of the postal code of Graceland/Memphis? We need only the {"postal_code" : "38116"} document, fields other than postal_code are not acceptable! • How many postal_codes are in Budapest/Hungary? • When was the "59199cdff0269ea12235e9dc" ObjectId created? • Top 5 countries by number of documents in descending order • Which places are within 20km around longitude -90.02604930000001 and latitude 35.0476912 (Graceland)? The result must be sorted in alphabetical order and each place appear in the result only once (distinct). Homework