mongo数据库的常见操作
连接mongodb数据库的命令查看对应数据库
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 [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
C:\Users\Administrator>d:
D:\>cd D:\developsoftware\MongoDB\bin
D:\developsoftware\MongoDB\bin>net start MongoDB
MongoDB 服务正在启动 .
MongoDB 服务已经启动成功。
D:\developsoftware\MongoDB\bin>mongo.exe
2016-01-09T11:12:44.498+0800 I CONTROL [main] Hotfix KB2731284 or later update
is not installed, will 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" : "威斯康星大学-麦迪逊",
"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 you an 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 have full access to all student support services. <br>\n2.you
will leave UW-Madison with the knowledge you gained and an official transcript
f the work you 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 be 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 :peaceful 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 80 for 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" : "威斯康星大学-麦迪逊",
"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 you an 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 have full access to all student support services. <br>\n2.you
will leave UW-Madison with the knowledge you gained and an official transcript
f the work you 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 be 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 :peaceful 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 80 for 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"
}
>
----------------------------------------------------------
连接mongodb数据库的命令查看对应数据库
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 [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
C:\Users\Administrator>d:
D:\>cd D:\developsoftware\MongoDB\bin
D:\developsoftware\MongoDB\bin>net start MongoDB
MongoDB 服务正在启动 .
MongoDB 服务已经启动成功。
D:\developsoftware\MongoDB\bin>mongo.exe
2016-01-09T11:12:44.498+0800 I CONTROL [main] Hotfix KB2731284 or later update
is not installed, will zero-out data files
MongoDB shell version: 3.2.0
connecting to: test
> use shujukuming;
switched to db shujukuming
> db.opportunity.findOne({"id":5});
> db.opportunity.findOne({"id":5});
Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
C:\Users\Administrator>d:
D:\>cd D:\developsoftware\MongoDB\bin
D:\developsoftware\MongoDB\bin>net start MongoDB
MongoDB 服务正在启动 .
MongoDB 服务已经启动成功。
D:\developsoftware\MongoDB\bin>mongo.exe
2016-01-09T11:12:44.498+0800 I CONTROL [main] Hotfix KB2731284 or later update
is not installed, will 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" : "威斯康星大学-麦迪逊",
"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 you an 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, use libraries, computer and sports an
d facilities, and have full access to all student support services. <br>\n2.you
will leave UW-Madison with the knowledge you gained and an official transcript o
f the work you completed on our campus. <br>\n3.Your academic work at UW-Madison
may transfer toward your degree program at home or to a degree program in the f
uture. <br>\n4.you’ll be 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 :peaceful 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 80 for Internet (iBT) and 550 for pap
er test or 213 (computer-based) <br>\nIELTS: Minimum of 6.5<br>\nGPA:3.0<br>\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" : "威斯康星大学-麦迪逊",
"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 you an 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, use libraries, computer and sports an
d facilities, and have full access to all student support services. <br>\n2.you
will leave UW-Madison with the knowledge you gained and an official transcript o
f the work you completed on our campus. <br>\n3.Your academic work at UW-Madison
may transfer toward your degree program at home or to a degree program in the f
uture. <br>\n4.you’ll be 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 :peaceful 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 80 for Internet (iBT) and 550 for pap
er test or 213 (computer-based) <br>\nIELTS: Minimum of 6.5<br>\nGPA:3.0<br>\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"
}
>
mongo数据库的常见操作的更多相关文章
- 【代码学习】MYSQL数据库的常见操作
---恢复内容开始--- ============================== MYSQL数据库的常见操作 ============================== 一.mysql的连接与 ...
- MySQL数据库的常见操作(七)
MySQL数据库的常见操作 1.创建数据库 2.创建重名的数据库以及如何查看警告信息 3.设置数据库的编码方式(默认为utf8) 4.修改和查看数据库的编码方式 5.删除数据库 6.6.删除已经删除了 ...
- 【代码总结】MYSQL数据库的常见操作
============================== MYSQL数据库的常见操作 ============================== 一.mysql的连接与关闭 -h:指定所连接的服 ...
- Flask中Mysql数据库的常见操作
from flask import Flask,render_template #导入第三方链接库sql点金术 from flask_sqlalchemy import SQLAlchemy #建立对 ...
- Android学习记录(2)—Android中数据库的常见操作
android中数据库操作是非常常见了,我们会经常用到,操作的方法也有很多种形式,这里我就把最常见的两种形式记录下来了,以备以后用到方便查看.我就不写注释和解释了,因为android数据库的操作和其它 ...
- MySQL数据库的常见操作
1.查看所有的数据库 1 show databases; 2.创建数据库 后面的时编码格式 1 create database dbName charset='utf8'; 3.使用/切换数据库 1 ...
- pymongo操作mongo数据库的查操作
一: 数据结构 { "_id" : ObjectId("5de8a5b748a75a8d48b72bdc"), ", ", ", ...
- Vc数据库编程基础MySql数据库的常见库命令.跟表操作命令
Vc数据库编程基础MySql数据库的常见操作 一丶数据库常见的库操作 1.1查看全部数据库 命令: show databases 1.2 创建数据库 命令: Create database 数据库名 ...
- 大数据学习之路——MySQL基础(一)——MySQL的基础知识与常见操作
一.存储引擎 1.含义 存储引擎是数据库底层软件组织,数据库管理系统(DBMS)使用数据引擎进行创建.查询.更新和删除数据.不同的存储引擎提供不同的存储机制.索引技巧.锁定水平等功能,使用不同的存储引 ...
随机推荐
- python条件控制
条件控制 现在我们写这样一个程序:在程序里设定好你的年龄,然后启动程序让用户猜测,用户输入后,根据他的输入提示用户输入的是否正确,如果错误,提示是猜大了还是小了 my_age = 24 user_in ...
- 【经验随笔】MYSQL表加锁升级导致数据库访问失败
背景:有一次定位问题发现,在同一个session连接中对MYSQL部分表加锁,导致其它未加锁的表不能访问. 用Spring管理MYSQL数据连接,在多线程访问数据库的情况下容易出问题.一个线程中对部分 ...
- 关于AJAX异步请求的那些事儿(2)
1.使用AJAX发起GET请求消息 xhr.open("GET","XX.PHP?K1=V1$K2=V2",true); xhr.send(null); 2.使 ...
- iOS刚进入后台接受推送、打开推送调转到相应的界面
刚进入后台的时候消息处理时候我用了本地推送!可以看我前边写的博客,怎么处理刚进入后台接收推送的案例,链接 /** 注释:打开推送的三种方式:-peter 1.apns的时候,结束进程退出后台:启动的时 ...
- 【Unity与23种设计模式】访问者模式(Visitor)
GoF中定义: "定义一个能够在一个对象结构中对于所有元素执行的操作.访问者让你可以定义一个新的操作,而不必更改到被操作元素的类接口." 暂时没有完全搞明白 直接上代码 //访问者 ...
- Python3基础教程1——Python的环境搭建
2018年3月8日 当然推荐一个比较系统的教程 http://www.runoob.com/python3/python3-tutorial.html 人家也写的也比我好啦 本教程为新手向的,请大佬跳 ...
- 100个命令Linux常用命令大全
Linux常用命令大全100条: 1,echo "aa" > test.txt 和 echo "bb" >> test.txt//>将原 ...
- Java设计模式(四)Builder建造者模式
一.场景描述 建造者模式同工厂模式.抽象工厂模式一样,用于创建继承类对象. 工厂模式:http://www.cnblogs.com/mahongbiao/p/8618970.html 抽象工厂模式:h ...
- FNV算法实战
HASH算法介绍 Hash,一般翻译做"散列",也有直接音译为"哈希"的,就是把任意长度的输入(又叫做预映射, pre-image),通过散列算法,变换成固定长 ...
- 在js中实现新窗口打开页面
我们都知道可以在html代码中使用<a href="xxxx" target="_blank"></a>这种方式来打开一个新的窗口打开一 ...