Submit Search
Upload
aggregation and indexing with suitable example using MongoDB.
•
0 likes
•
224 views
B
bhavesh lande
Follow
Implement aggregation and indexing with suitable example using MongoDB.
Read less
Read more
Engineering
Report
Share
Report
Share
1 of 3
Download now
Download to read offline
Recommended
database application using SQL DML statements: all types of Join, Sub-Query ...
database application using SQL DML statements: all types of Join, Sub-Query ...
bhavesh lande
Design and Develop SQL DDL statements which demonstrate the use of SQL objec...
Design and Develop SQL DDL statements which demonstrate the use of SQL objec...
bhavesh lande
Nested Queries Lecture
Nested Queries Lecture
Felipe Costa
Learn Normalization in simple language
Learn Normalization in simple language
FirstWire Apps
Naver속도의, 속도에 의한, 속도를 위한 몽고DB (네이버 컨텐츠검색과 몽고DB) [Naver]
Naver속도의, 속도에 의한, 속도를 위한 몽고DB (네이버 컨텐츠검색과 몽고DB) [Naver]
MongoDB
Datastructures in python
Datastructures in python
hydpy
Sql subquery
Sql subquery
Raveena Thakur
Skip lists (Advance Data structure)
Skip lists (Advance Data structure)
Shubham Shukla
Recommended
database application using SQL DML statements: all types of Join, Sub-Query ...
database application using SQL DML statements: all types of Join, Sub-Query ...
bhavesh lande
Design and Develop SQL DDL statements which demonstrate the use of SQL objec...
Design and Develop SQL DDL statements which demonstrate the use of SQL objec...
bhavesh lande
Nested Queries Lecture
Nested Queries Lecture
Felipe Costa
Learn Normalization in simple language
Learn Normalization in simple language
FirstWire Apps
Naver속도의, 속도에 의한, 속도를 위한 몽고DB (네이버 컨텐츠검색과 몽고DB) [Naver]
Naver속도의, 속도에 의한, 속도를 위한 몽고DB (네이버 컨텐츠검색과 몽고DB) [Naver]
MongoDB
Datastructures in python
Datastructures in python
hydpy
Sql subquery
Sql subquery
Raveena Thakur
Skip lists (Advance Data structure)
Skip lists (Advance Data structure)
Shubham Shukla
MySQL Functions
MySQL Functions
Compare Infobase Limited
Advanced MySQL Query Tuning
Advanced MySQL Query Tuning
Alexander Rubin
JSON-LD for RESTful services
JSON-LD for RESTful services
Markus Lanthaler
Dbms lab Manual
Dbms lab Manual
Vivek Kumar Sinha
Report 02(Binary Search)
Report 02(Binary Search)
Md. Bashartullah (Rabby)
MongoDB World 2019: The Sights (and Smells) of a Bad Query
MongoDB World 2019: The Sights (and Smells) of a Bad Query
MongoDB
STACKS IN DATASTRUCTURE
STACKS IN DATASTRUCTURE
Archie Jamwal
Learn 90% of Python in 90 Minutes
Learn 90% of Python in 90 Minutes
Matt Harrison
Normalization in Database
Normalization in Database
Roshni Singh
Sql query patterns, optimized
Sql query patterns, optimized
Karwin Software Solutions LLC
SQL JOIN
SQL JOIN
Ritwik Das
MySQL Query And Index Tuning
MySQL Query And Index Tuning
Manikanda kumar
Schedule in DBMS
Schedule in DBMS
PratibhaRashmiSingh
Data Structure and Algorithms Linked List
Data Structure and Algorithms Linked List
ManishPrajapati78
SQL Joins.pptx
SQL Joins.pptx
Ankit Rai
database application using SQL DML statements: Insert, Select, Update, Delet...
database application using SQL DML statements: Insert, Select, Update, Delet...
bhavesh lande
Sql queries
Sql queries
narendrababuc
Quick sort
Quick sort
Dhruv Sabalpara
Cat database
Cat database
tubbeles
More mastering the art of indexing
More mastering the art of indexing
Yoshinori Matsunobu
The Annual G20 Scorecard – Research Performance 2019
The Annual G20 Scorecard – Research Performance 2019
bhavesh lande
information control and Security system
information control and Security system
bhavesh lande
More Related Content
What's hot
MySQL Functions
MySQL Functions
Compare Infobase Limited
Advanced MySQL Query Tuning
Advanced MySQL Query Tuning
Alexander Rubin
JSON-LD for RESTful services
JSON-LD for RESTful services
Markus Lanthaler
Dbms lab Manual
Dbms lab Manual
Vivek Kumar Sinha
Report 02(Binary Search)
Report 02(Binary Search)
Md. Bashartullah (Rabby)
MongoDB World 2019: The Sights (and Smells) of a Bad Query
MongoDB World 2019: The Sights (and Smells) of a Bad Query
MongoDB
STACKS IN DATASTRUCTURE
STACKS IN DATASTRUCTURE
Archie Jamwal
Learn 90% of Python in 90 Minutes
Learn 90% of Python in 90 Minutes
Matt Harrison
Normalization in Database
Normalization in Database
Roshni Singh
Sql query patterns, optimized
Sql query patterns, optimized
Karwin Software Solutions LLC
SQL JOIN
SQL JOIN
Ritwik Das
MySQL Query And Index Tuning
MySQL Query And Index Tuning
Manikanda kumar
Schedule in DBMS
Schedule in DBMS
PratibhaRashmiSingh
Data Structure and Algorithms Linked List
Data Structure and Algorithms Linked List
ManishPrajapati78
SQL Joins.pptx
SQL Joins.pptx
Ankit Rai
database application using SQL DML statements: Insert, Select, Update, Delet...
database application using SQL DML statements: Insert, Select, Update, Delet...
bhavesh lande
Sql queries
Sql queries
narendrababuc
Quick sort
Quick sort
Dhruv Sabalpara
Cat database
Cat database
tubbeles
More mastering the art of indexing
More mastering the art of indexing
Yoshinori Matsunobu
What's hot
(20)
MySQL Functions
MySQL Functions
Advanced MySQL Query Tuning
Advanced MySQL Query Tuning
JSON-LD for RESTful services
JSON-LD for RESTful services
Dbms lab Manual
Dbms lab Manual
Report 02(Binary Search)
Report 02(Binary Search)
MongoDB World 2019: The Sights (and Smells) of a Bad Query
MongoDB World 2019: The Sights (and Smells) of a Bad Query
STACKS IN DATASTRUCTURE
STACKS IN DATASTRUCTURE
Learn 90% of Python in 90 Minutes
Learn 90% of Python in 90 Minutes
Normalization in Database
Normalization in Database
Sql query patterns, optimized
Sql query patterns, optimized
SQL JOIN
SQL JOIN
MySQL Query And Index Tuning
MySQL Query And Index Tuning
Schedule in DBMS
Schedule in DBMS
Data Structure and Algorithms Linked List
Data Structure and Algorithms Linked List
SQL Joins.pptx
SQL Joins.pptx
database application using SQL DML statements: Insert, Select, Update, Delet...
database application using SQL DML statements: Insert, Select, Update, Delet...
Sql queries
Sql queries
Quick sort
Quick sort
Cat database
Cat database
More mastering the art of indexing
More mastering the art of indexing
More from bhavesh lande
The Annual G20 Scorecard – Research Performance 2019
The Annual G20 Scorecard – Research Performance 2019
bhavesh lande
information control and Security system
information control and Security system
bhavesh lande
information technology and infrastructures choices
information technology and infrastructures choices
bhavesh lande
ethical issues,social issues
ethical issues,social issues
bhavesh lande
managing inforamation system
managing inforamation system
bhavesh lande
• E-commerce, e-business ,e-governance
• E-commerce, e-business ,e-governance
bhavesh lande
IT and innovations
IT and innovations
bhavesh lande
organisations and information systems
organisations and information systems
bhavesh lande
IT stratergy and digital goods
IT stratergy and digital goods
bhavesh lande
Implement Mapreduce with suitable example using MongoDB.
Implement Mapreduce with suitable example using MongoDB.
bhavesh lande
Unnamed PL/SQL code block: Use of Control structure and Exception handling i...
Unnamed PL/SQL code block: Use of Control structure and Exception handling i...
bhavesh lande
working with python
working with python
bhavesh lande
applications and advantages of python
applications and advantages of python
bhavesh lande
introduction of python in data science
introduction of python in data science
bhavesh lande
tools
tools
bhavesh lande
data scientists and their role
data scientists and their role
bhavesh lande
applications
applications
bhavesh lande
statistics techniques to deal with data
statistics techniques to deal with data
bhavesh lande
introduction to data science
introduction to data science
bhavesh lande
More from bhavesh lande
(19)
The Annual G20 Scorecard – Research Performance 2019
The Annual G20 Scorecard – Research Performance 2019
information control and Security system
information control and Security system
information technology and infrastructures choices
information technology and infrastructures choices
ethical issues,social issues
ethical issues,social issues
managing inforamation system
managing inforamation system
• E-commerce, e-business ,e-governance
• E-commerce, e-business ,e-governance
IT and innovations
IT and innovations
organisations and information systems
organisations and information systems
IT stratergy and digital goods
IT stratergy and digital goods
Implement Mapreduce with suitable example using MongoDB.
Implement Mapreduce with suitable example using MongoDB.
Unnamed PL/SQL code block: Use of Control structure and Exception handling i...
Unnamed PL/SQL code block: Use of Control structure and Exception handling i...
working with python
working with python
applications and advantages of python
applications and advantages of python
introduction of python in data science
introduction of python in data science
tools
tools
data scientists and their role
data scientists and their role
applications
applications
statistics techniques to deal with data
statistics techniques to deal with data
introduction to data science
introduction to data science
aggregation and indexing with suitable example using MongoDB.
1.
Practical No:11 Problem Statement:
Implement aggregation and indexing with suitable example using MongoDB. *Index* > use prac11 switched to db prac11 > db.stud.insert({_id:1,rollno:28,name:"Shail",dept:10}); > db.stud.insert({_id:2,rollno:26,name:"Shivesh",dept:10}); > db.stud.find(); { "_id" : 1, "rollno" : 28, "name" : "Shail", "dept" : 10 } { "_id" : 2, "rollno" : 26, "name" : "Shivesh", "dept" : 10 } > db.stud.insert({_id:3,rollno:22,name:"Alquama",dept:11}); > db.stud.insert({_id:4,rollno:33,name:"Swapnil",dept:11}); > > db.stud.find().pretty(); { "_id" : 1, "rollno" : 28, "name" : "Shail", "dept" : 10 } { "_id" : 2, "rollno" : 26, "name" : "Shivesh", "dept" : 10 } { "_id" : 3, "rollno" : 22, "name" : "Alquama", "dept" : 11 } { "_id" : 4, "rollno" : 33, "name" : "Swapnil", "dept" : 11 } db.stud.getIndexes(); [ { "v" : 1, "key" : { "_id" : 1 }, "ns" : "prac11.stud", "name" : "_id_" } ] db.stud.ensureIndex({name:1}); > db.stud.getIndexes(); [ { "v" : 1, "key" : { "_id" : 1 }, "ns" : "prac11.stud", "name" : "_id_" }, { "v" : 1, "key" : { "name" : 1 }, "ns" : "prac11.stud", "name" : "name_1" } db.stud.getIndexes(); [ { "v" : 1, "key" : { "_id" : 1 }, "ns" : "prac11.stud", "name" : "_id_" }, {
2.
"v" : 1, "key"
: { "name" : 1 }, "ns" : "prac11.stud", "name" : "name_1" }, { "v" : 1, "key" : { "rollno" : 1 }, "unique" : true, "ns" : "prac11.stud", "name" : "rollno_1" } db.system.indexes.find(); { "v" : 1, "key" : { "_id" : 1 }, "ns" : "prac11.stud", "name" : "_id_" } { "v" : 1, "key" : { "name" : 1 }, "ns" : "prac11.stud", "name" : "name_1" } { "v" : 1, "key" : { "rollno" : 1 }, "unique" : true, "ns" : "prac11.stud", "name" : "rollno_1" } { "v" : 1, "key" : { "_id" : 1 }, "ns" : "prac11.item", "name" : "_id_" } -------------------------------------------------------------------------------- ------------------------ *Aggergation* db.item.insert({Customer:'a',Name:"Mouse",Quantity:3,Price:200}); db.item.insert({Customer:'a',Name:"Keyboard",Quantity:5,Price:800}); > db.item.insert({Customer:'b',Name:"Mouse",Quantity:3,Price:500}); > db.item.insert({Customer:'a',Name:"Keyboard",Quantity:4,Price:2000}); > db.item.find().pretty(); { "_id" : ObjectId("5d8f128237dc2e143b51bde5"), "Customer" : "a", "Name" : "Mouse", "Quantity" : 3, "Price" : 200 } { "_id" : ObjectId("5d8f12a637dc2e143b51bde6"), "Customer" : "a", "Name" : "Keyboard", "Quantity" : 5, "Price" : 800 } { "_id" : ObjectId("5d8f12be37dc2e143b51bde7"), "Customer" : "b", "Name" : "Mouse", "Quantity" : 3, "Price" : 500 } { "_id" : ObjectId("5d8f12da37dc2e143b51bde8"), "Customer" : "a", "Name" : "Keyboard", "Quantity" : 4, "Price" : 2000 } > db.item.aggregate([{$group:{_id:"Name",total:{$sum:1}}}]); { "result" : [ { "_id" : "Name", "total" : 4 } ], "ok" : 1 }
Download now