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 socket知识点
---恢复内容开始--- 数据在网络上进行传播,需要通过一种通信协议.常见的通信协议有:HTTP,SMTP,DNS,FTP,SSH,SNMP,ICMP PING,DNCP. OSI(Open Syst ...
- Mysql 忘记管理员密码更改
对管理员设置密码 第一种方式: #mysqladmin -u root password 'new-password'; #mysqladmin -u root -h localhost passwo ...
- 设计模式——适配器模式(C++实现)
#include <iostream> #include <string> using namespace std; class STTarget { publ ...
- Sql中根据旧表创建新表的SQL语句
今天在网上查了下,根据旧表创建新表的SQL语句,网上给了两个答案 create table tab_new like tab_old (使用旧表创建新表) create table tab_new a ...
- 值得 .NET 开发者了解的15个特性
本文列举了 15 个值得了解的 C# 特性,旨在让 .NET 开发人员更好的使用 C# 语言进行开发工作. 1. ObsoleteAttribute ObsoleteAttribute 适用于除组件. ...
- Download a image 图片另存为
点击一个链接,下载图片: JS: 1.找到图片的URL,即src的值: 2.创建一个anchor,将URL赋值给anchor 的 href. 3.将anchor追加到body,并且添加click事件: ...
- Cesium 鼠标拾取椭球、地形、模型坐标点(经度+纬度+高程)
首先,Cesium 中的坐标可分为两种情况:二维和三维,三维又有地形和模型之分: 1.二维坐标,获取椭球体表面的经纬度坐标: var handler = new Cesium.ScreenSpaceE ...
- NodeJs的async
async.auto最强大的一个api,它适合逻辑复杂的代码,代码中你一部分需要串行,两部分相互依赖,一部分又需要并行,代码中不需要依赖,这个时候你就可以通过auto随性所欲控制你的代码逻辑. var ...
- ng-if ng-show ng-hide区别(面试题)
ng-if ng-show ng-hide区别 实现原理方面: ng-show/ng-hide是通过修改css样式方式控制元素显示与隐藏,对应的DOM元素会一直存在于当前页面中: 而ng-if根据表 ...
- 【windows】 配置一个本地的tomcat服务器
配置tomcat 公司的许多业务都是用java+tomcat模式的,做本地测试的时候经常要搭建一个自己的tomcat服务器.整个操作不难,但是记录一下,万一以后遇到什么问题也可以放这里. ■ 安装ja ...