Submit Search
Upload
aggregation and indexing with suitable example using MongoDB.
•
0 likes
•
218 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
Python Programming Essentials - M8 - String Methods
Python Programming Essentials - M8 - String Methods
P3 InfoTech Solutions Pvt. Ltd.
Introduction to Bash Scripting, Zyxware Technologies, CSI Students Convention...
Introduction to Bash Scripting, Zyxware Technologies, CSI Students Convention...
Zyxware Technologies
List in Python
List in Python
Sharath Ankrajegowda
Php and MySQL
Php and MySQL
Tiji Thomas
Data Clustering with R
Data Clustering with R
Yanchang Zhao
Html table tags
Html table tags
eShikshak
Backtracking
Backtracking
Vikas Sharma
Minimum spanning tree
Minimum spanning tree
Amit Kumar Rathi
Recommended
Python Programming Essentials - M8 - String Methods
Python Programming Essentials - M8 - String Methods
P3 InfoTech Solutions Pvt. Ltd.
Introduction to Bash Scripting, Zyxware Technologies, CSI Students Convention...
Introduction to Bash Scripting, Zyxware Technologies, CSI Students Convention...
Zyxware Technologies
List in Python
List in Python
Sharath Ankrajegowda
Php and MySQL
Php and MySQL
Tiji Thomas
Data Clustering with R
Data Clustering with R
Yanchang Zhao
Html table tags
Html table tags
eShikshak
Backtracking
Backtracking
Vikas Sharma
Minimum spanning tree
Minimum spanning tree
Amit Kumar Rathi
MySQL Functions
MySQL Functions
Compare Infobase Limited
Php forms
Php forms
Anne Lee
List,tuple,dictionary
List,tuple,dictionary
nitamhaske
Class 5 - PHP Strings
Class 5 - PHP Strings
Ahmed Swilam
halstead software science measures
halstead software science measures
Deepti Pillai
Python programming : List and tuples
Python programming : List and tuples
Emertxe Information Technologies Pvt Ltd
Cascading style sheets (CSS-Web Technology)
Cascading style sheets (CSS-Web Technology)
Timbal Mayank
SINGLE-SOURCE SHORTEST PATHS
SINGLE-SOURCE SHORTEST PATHS
Md. Shafiuzzaman Hira
Html heading
Html heading
saichii27
Kotlin scope functions
Kotlin scope functions
Waheed Nazir
JavaScript Objects
JavaScript Objects
Reem Alattas
Operators php
Operators php
Chandni Pm
Functions and modules in python
Functions and modules in python
Karin Lagesen
N queen problem
N queen problem
Ridhima Chowdhury
Primality
Primality
Mohanasundaram Nattudurai
Deep drive into rust programming language
Deep drive into rust programming language
Vigneshwer Dhinakaran
LINUX:Control statements in shell programming
LINUX:Control statements in shell programming
bhatvijetha
CLOSEST PAIR (Final)
CLOSEST PAIR (Final)
Aruneel Das
Python Variable Types, List, Tuple, Dictionary
Python Variable Types, List, Tuple, Dictionary
Soba Arjun
Python Dictionaries and Sets
Python Dictionaries and Sets
Nicole Ryan
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
Php forms
Php forms
Anne Lee
List,tuple,dictionary
List,tuple,dictionary
nitamhaske
Class 5 - PHP Strings
Class 5 - PHP Strings
Ahmed Swilam
halstead software science measures
halstead software science measures
Deepti Pillai
Python programming : List and tuples
Python programming : List and tuples
Emertxe Information Technologies Pvt Ltd
Cascading style sheets (CSS-Web Technology)
Cascading style sheets (CSS-Web Technology)
Timbal Mayank
SINGLE-SOURCE SHORTEST PATHS
SINGLE-SOURCE SHORTEST PATHS
Md. Shafiuzzaman Hira
Html heading
Html heading
saichii27
Kotlin scope functions
Kotlin scope functions
Waheed Nazir
JavaScript Objects
JavaScript Objects
Reem Alattas
Operators php
Operators php
Chandni Pm
Functions and modules in python
Functions and modules in python
Karin Lagesen
N queen problem
N queen problem
Ridhima Chowdhury
Primality
Primality
Mohanasundaram Nattudurai
Deep drive into rust programming language
Deep drive into rust programming language
Vigneshwer Dhinakaran
LINUX:Control statements in shell programming
LINUX:Control statements in shell programming
bhatvijetha
CLOSEST PAIR (Final)
CLOSEST PAIR (Final)
Aruneel Das
Python Variable Types, List, Tuple, Dictionary
Python Variable Types, List, Tuple, Dictionary
Soba Arjun
Python Dictionaries and Sets
Python Dictionaries and Sets
Nicole Ryan
What's hot
(20)
MySQL Functions
MySQL Functions
Php forms
Php forms
List,tuple,dictionary
List,tuple,dictionary
Class 5 - PHP Strings
Class 5 - PHP Strings
halstead software science measures
halstead software science measures
Python programming : List and tuples
Python programming : List and tuples
Cascading style sheets (CSS-Web Technology)
Cascading style sheets (CSS-Web Technology)
SINGLE-SOURCE SHORTEST PATHS
SINGLE-SOURCE SHORTEST PATHS
Html heading
Html heading
Kotlin scope functions
Kotlin scope functions
JavaScript Objects
JavaScript Objects
Operators php
Operators php
Functions and modules in python
Functions and modules in python
N queen problem
N queen problem
Primality
Primality
Deep drive into rust programming language
Deep drive into rust programming language
LINUX:Control statements in shell programming
LINUX:Control statements in shell programming
CLOSEST PAIR (Final)
CLOSEST PAIR (Final)
Python Variable Types, List, Tuple, Dictionary
Python Variable Types, List, Tuple, Dictionary
Python Dictionaries and Sets
Python Dictionaries and Sets
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
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
database application using SQL DML statements: Insert, Select, Update, Delet...
database application using SQL DML statements: Insert, Select, Update, Delet...
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
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
More from bhavesh lande
(20)
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...
database application using SQL DML statements: all types of Join, Sub-Query ...
database application using SQL DML statements: all types of Join, Sub-Query ...
database application using SQL DML statements: Insert, Select, Update, Delet...
database application using SQL DML statements: Insert, Select, Update, Delet...
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...
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
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