Common operations for MONGO databases

Source: Internet
Author: User
Tags diff findone sessions

Commands to connect to the MongoDB database view the corresponding database
Mongo.exe
Use shujukuming;
Db.opportunity.findOne ({"id": 5});

Db.opportunity.findOne ();

Db.facultype.drop ();
Db.institute.drop ();
Db.node.drop ();

Db.opportunity.drop ();
Db.program.drop ();
Db.user.drop ();

Db.userweb.drop ();

"Title_pic": "./upload/product/logo/2016-01-09/thumb/1452323575_4478803
86.jpg "

Microsoft Windows [version 6.1.7601]
Copyright (c) Microsoft Corporation. All rights reserved.

C:\users\administrator>d:

D:\>CD D:\developsoftware\MongoDB\bin

D:\developsoftware\mongodb\bin>net Start MongoDB
The MongoDB service is starting.
MongoDB Service has started successfully.


D:\developsoftware\mongodb\bin>mongo.exe
2016-01-09t11:12:44.498+0800 I CONTROL [main] Hotfix KB2731284 or later update
is not installed, would zero-out data files
MongoDB Shell version:3.2.0
Connecting To:test
> Use shujukuming;
Switched to DB shujukuming
> Db.opportunity.findOne ({"id": 5});
{
"_id": ObjectId ("5645576c916891242b28318c"),
"id": 5,
"institute_id": 300,
"Institute": "University of wisconsin–?" Madison ",
"Tinstitute": "University of Wisconsin-Madison",
"title": "Visiting International Student Program",
"Type": 1,
"Level": 4,
"url": "Http://continuingstudies.wisc.edu/visp/index.html",
"Introduce": "Experience Uw-madison student life! The visiting Interna
ional Student Program (VISP) offers a opportunity to become an official UW
Madison student and to take regular university courses with our world-class FAC
Lty. ",
"Benefit": "1.you may join clubs, use libraries, computer and sports a
D facilities, and has full access to all student support services. <br>\n2.you
Would leave Uw-madison with the knowledge you gained and an official transcript
f The work your completed on our campus. <br>\n3. Your academic work at Uw-madiso
May transfer toward your degree program at home or to a degree program in the
Uture. <br>\n4.you ' ll invited to participate in and join activities sponsor
D by the Wisconsin Alumni Association (WAA) International Network of over 400,0
0 students worldwide.<br>\n5. The Madison Experience:p eaceful places to study a
D Explore while experiencing the beauty of our city. ",
"To_who": "",
"Apply_fee": "",
"Cost": "$ 22,305 Fall or Spring (4 Months) <br>\n$46,353 academic year
(9 Months) <br>\n$ 5,614 4-week session (1 Month) <br>\n$11,178 8-week session (2
Months) ",
"Cost_url": "Http://continuingstudies.wisc.edu/visp/financial-requirem
Nts.htm ",
"Attention": "",
"Apply_url": "https://uwmadison.qualtrics.com/SE/?SID=SV_0HTPAaHgHK45d
O ",
"Deadline": "Fall:may 1<br>\nspring:september 1<br>\nsummer (Diff
Rent sessions offered between may-august): February 1 ",
"Requirement": "Toefl:minimum of the Internet (IBT) and 550 for PA
ER test or 213 (computer-based) <br>\nielts:minimum of 6.5<br>\ngpa:3.0<br>\ns
anned copy of official college transcripts <br>\nscanned copy of Passport infor
ation page<br>\nscanned Copy of your financial support documents\n\n ",
"term": "Fall semester (September-december) <br>\nspring semester (Ja
Uary-may) <br>\nsummer (Different sessions offered between May-august) ",
"Apply_process_url": "Http://continuingstudies.wisc.edu/visp/applyvisp
htm
}
> Db.opportunity.findOne ({"id": 5});
{
"_id": ObjectId ("5645576c916891242b28318c"),
"id": 5,
"institute_id": 300,
"Institute": "University of wisconsin–?" Madison ",
"Tinstitute": "University of Wisconsin-Madison",
"title": "Visiting International Student Program",
"Type": 1,
"Level": 4,
"url": "Http://continuingstudies.wisc.edu/visp/index.html",
"Introduce": "Experience Uw-madison student life! The visiting Interna
ional Student Program (VISP) offers a opportunity to become an official UW
Madison student and to take regular university courses with our world-class FAC
Lty. ",
"Benefit": "1.you may join clubs, use libraries, computer and sports a
D facilities, and has full access to all student support services. <br>\n2.you
Would leave Uw-madison with the knowledge you gained and an official transcript
f The work your completed on our campus. <br>\n3. Your academic work at Uw-madiso
May transfer toward your degree program at home or to a degree program in the
Uture. <br>\n4.you ' ll invited to participate in and join activities sponsor
D by the Wisconsin Alumni Association (WAA) International Network of over 400,0
0 students worldwide.<br>\n5. The Madison Experience:p eaceful places to study a
D Explore while experiencing the beauty of our city. ",
"To_who": "",
"Apply_fee": "",
"Cost": "$ 22,305 Fall or Spring (4 Months) <br>\n$46,353 academic year
(9 Months) <br>\n$ 5,614 4-week session (1 Month) <br>\n$11,178 8-week session (2
Months) ",
"Cost_url": "Http://continuingstudies.wisc.edu/visp/financial-requirem
Nts.htm ",
"Attention": "",
"Apply_url": "https://uwmadison.qualtrics.com/SE/?SID=SV_0HTPAaHgHK45d
O ",
"Deadline": "Fall:may 1<br>\nspring:september 1<br>\nsummer (Diff
Rent sessions offered between may-august): February 1 ",
"Requirement": "Toefl:minimum of the Internet (IBT) and 550 for PA
ER test or 213 (computer-based) <br>\nielts:minimum of 6.5<br>\ngpa:3.0<br>\ns
anned copy of official college transcripts <br>\nscanned copy of Passport infor
ation page<br>\nscanned Copy of your financial support documents\n\n ",
"term": "Fall semester (September-december) <br>\nspring semester (Ja
Uary-may) <br>\nsummer (Different sessions offered between May-august) ",
"Apply_process_url": "Http://continuingstudies.wisc.edu/visp/applyvisp
htm
}
>

Microsoft Windows [version 6.1.7601]
Copyright (c) Microsoft Corporation. All rights reserved.

C:\users\administrator>d:

D:\>CD D:\developsoftware\MongoDB\bin

D:\developsoftware\mongodb\bin>net Start MongoDB
The MongoDB service is starting.
MongoDB Service has started successfully.


D:\developsoftware\mongodb\bin>mongo.exe
2016-01-09t11:12:44.498+0800 I CONTROL [main] Hotfix KB2731284 or later update
is not installed, would zero-out data files
MongoDB Shell version:3.2.0
Connecting To:test
> Use shujukuming;
Switched to DB shujukuming
> Db.opportunity.findOne ({"id": 5});
{
"_id": ObjectId ("5645576c916891242b28318c"),
"id": 5,
"institute_id": 300,
"Institute": "University of wisconsin–?" Madison ",
"Tinstitute": "University of Wisconsin-Madison",
"title": "Visiting International Student Program",
"Type": 1,
"Level": 4,
"url": "Http://continuingstudies.wisc.edu/visp/index.html",
"Introduce": "Experience Uw-madison student life! The visiting Internat
ional Student Program (VISP) offers a opportunity to become an official uw-
Madison student and to take regular university courses with our world-class FACU
Lty. ",
"Benefit": "1.you may join clubs, with libraries, computer and sports an
D facilities, and has full access to all student support services. <br>\n2.you
Would leave Uw-madison with the knowledge you gained and an official transcript O
f The work your completed on our campus. <br>\n3. Your academic work at Uw-madison
May transfer toward your degree program @ Home or to a degree program in the F
Uture. <br>\n4.you ' ll invited to participate in and join activities Sponsore
D by the Wisconsin Alumni Association (WAA) International Network of over 400,00
0 students worldwide.<br>\n5. The Madison Experience:p eaceful places to study an
D Explore while experiencing the beauty of our city. ",
"To_who": "",
"Apply_fee": "",
"Cost": "$ 22,305 Fall or Spring (4 Months) <br>\n$46,353 academic year
(9 Months) <br>\n$ 5,614 4-week session (1 Month) <br>\n$11,178 8-week session (2
Months) ",
"Cost_url": "Http://continuingstudies.wisc.edu/visp/financial-requireme
Nts.htm ",
"Attention": "",
"Apply_url": "Https://uwmadison.qualtrics.com/SE/?SID=SV_0HTPAaHgHK45dU
O ",
"Deadline": "Fall:may 1<br>\nspring:september 1<br>\nsummer (diffe
Rent sessions offered between may-august): February 1 ",
"Requirement": "Toefl:minimum of the Internet (IBT) and 550 for PAP
ER test or 213 (computer-based) <br>\nielts:minimum of 6.5&LT;BR&GT;\NGPA:3.0&LT;BR&GT;\NSC
anned copy of official college transcripts <br>\nscanned copy of Passport inform
ation page<br>\nscanned Copy of your financial support documents\n\n ",
"term": "Fall semester (September-december) <br>\nspring semester (Jan
Uary-may) <br>\nsummer (Different sessions offered between May-august) ",
"Apply_process_url": "Http://continuingstudies.wisc.edu/visp/applyvisp."
htm
}
> Db.opportunity.findOne ({"id": 5});
{
"_id": ObjectId ("5645576c916891242b28318c"),
"id": 5,
"institute_id": 300,
"Institute": "University of wisconsin–?" Madison ",
"Tinstitute": "University of Wisconsin-Madison",
"title": "Visiting International Student Program",
"Type": 1,
"Level": 4,
"url": "Http://continuingstudies.wisc.edu/visp/index.html",
"Introduce": "Experience Uw-madison student life! The visiting Internat
ional Student Program (VISP) offers a opportunity to become an official uw-
Madison student and to take regular university courses with our world-class FACU
Lty. ",
"Benefit": "1.you may join clubs, with libraries, computer and sports an
D facilities, and has full access to all student support services. <br>\n2.you
Would leave Uw-madison with the knowledge you gained and an official transcript O
f The work your completed on our campus. <br>\n3. Your academic work at Uw-madison
May transfer toward your degree program @ Home or to a degree program in the F
Uture. <br>\n4.you ' ll invited to participate in and join activities Sponsore
D by the Wisconsin Alumni Association (WAA) International Network of over 400,00
0 students worldwide.<br>\n5. The Madison Experience:p eaceful places to study an
D Explore while experiencing the beauty of our city. ",
"To_who": "",
"Apply_fee": "",
"Cost": "$ 22,305 Fall or Spring (4 Months) <br>\n$46,353 academic year
(9 Months) <br>\n$ 5,614 4-week session (1 Month) <br>\n$11,178 8-week session (2
Months) ",
"Cost_url": "Http://continuingstudies.wisc.edu/visp/financial-requireme
Nts.htm ",
"Attention": "",
"Apply_url": "Https://uwmadison.qualtrics.com/SE/?SID=SV_0HTPAaHgHK45dU
O ",
"Deadline": "Fall:may 1<br>\nspring:september 1<br>\nsummer (diffe
Rent sessions offered between may-august): February 1 ",
"Requirement": "Toefl:minimum of the Internet (IBT) and 550 for PAP
ER test or 213 (computer-based) <br>\nielts:minimum of 6.5&LT;BR&GT;\NGPA:3.0&LT;BR&GT;\NSC
anned copy of official college transcripts <br>\nscanned copy of Passport inform
ation page<br>\nscanned Copy of your financial support documents\n\n ",
"term": "Fall semester (September-december) <br>\nspring semester (Jan
Uary-may) <br>\nsummer (Different sessions offered between May-august) ",
"Apply_process_url": "Http://continuingstudies.wisc.edu/visp/applyvisp."
htm
}
>

Common operations for MONGO databases

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.