当前位置:网站首页>Node の MongoDB 安装
Node の MongoDB 安装
2022-07-04 12:42:00 【华为云】
MongoDB数据库
定义:MongoDB 是一个基于分布式文件存储的数据库。由 C++ 语言编写。旨在为 WEB 应用提供可扩展的高性能数据存储解决方案。
MongoDB 是一个介于关系数据库和非关系数据库之间的产品,是非关系数据库当中功能最丰富,最像关系数据库的。
安装地址:https://www.MongoDB.com/try/download/community
关系型数据库和非关系型数据库
说到MongoDB肯定要介绍一下关系型数据库和非关系型数据库。
关系型数据库最典型的数据结构是表,由二维表格模型及其之间的联系所组成的一个数据组织。
非关系型数据库严格上不是一种数据库,应该是一种数据结构化存储方法的集合,可以是文档或者键值对等。比如像,map一样的键值对关系。
非关系型数据库优点:
1、格式灵活:存储数据的格式可以是key,value形式、文档形式、图片形式等等,文档形式、图片形式等等,使用灵活,应用场景广泛,而关系型数据库则只支持基础类型。
2、速度快:nosql可以使用硬盘或者随机存储器作为载体,而关系型数据库只能使用硬盘;
3、高扩展性;
4、成本低:nosql数据库部署简单,基本都是开源软件。
缺点:
1、不提供sql支持,学习和使用成本较高;
2、无事务处理;
3、数据结构相对复杂,复杂查询方面稍欠。
PS:本次只是使用一下,前端人员对其的掌握要求没有后端高
MongoDB安装
在之前已经在官网上讲数据库msi下载下来了,接下来开始安装
- 根据提示安装,前两部选择next即可
- 然后可以使用
custom
来自定义安装目录
- 接下来点击next安装即可
PS:在安装时有一个坑,如果你勾选了
Install MongoDB Compass
,那么安装时会卡死,因为这是MongoDB
提供的可视化界面,但是下载时会从国外下载。
MongoDB启动
此时,MongoDB已经安装完毕了,现在启动测试一下是否成功
在之前自定义的安装目录下,有一个bin文件夹,里面有mongod.exe文件,这个程序就是用来启动mongodb服务器的。
在想要存放数据的地方,创建一个文件夹,比如db
,这里我
然后在之前的bin文件夹中,使用cmd打开面包,输入mongod --dbpath=/mongodb/Server/data/db
由于我们并没有指定mongodb服务的端口号,所以它启动在默认的27017窗口。
打开浏览器,范围地址http://127.0.0.1:27017/,可看到如下信息
It looks like you are trying to access MongoDB over HTTP on the native driver port.
MongoDB可视化界面
对于MongoDB数据库,如果一直在命令控制符界面中使用有些不太方便,可以使用navicat,也可以直接使用MongoDB提供的图形化界面Compass
。
下载地址:https://www.MongoDB.com/try/download/compass?jmp=docs
Compass
图形化界面基本下载后打开就能使用了
点击connect按钮,然后就会连接到本地27017数据库当中。
连接成功后,点击界面左下角的加号+, 可以创建数据库
接下来就可以在图形化界面当中对数据库进行操作了
边栏推荐
- AI 绘画极简教程
- 6 分钟看完 BGP 协议。
- Annual comprehensive analysis of China's mobile reading market in 2022
- 实时云交互如何助力教育行业发展
- Dgraph: large scale dynamic graph dataset
- 在 Apache 上配置 WebDAV 服务器
- Using scrcpy projection
- "Tips" to slim down Seurat objects
- DVWA range exercise 4
- [cloud native | kubernetes] in depth understanding of ingress (12)
猜你喜欢
Xue Jing, director of insight technology solutions: Federal learning helps secure the flow of data elements
DVWA range exercise 4
8个扩展子包!RecBole推出2.0!
After installing vscode, the program runs (an include error is detected, please update the includepath, which has been solved for this translation unit (waveform curve is disabled) and (the source fil
Personalized online cloud database hybrid optimization system | SIGMOD 2022 selected papers interpretation
[AI system frontier dynamics, issue 40] Hinton: my deep learning career and research mind method; Google refutes rumors and gives up tensorflow; The apotheosis framework is officially open source
Will the concept of "being integrated" become a new inflection point of the information and innovation industry?
ISO 27001 Information Security Management System Certification
Reinforcement learning - learning notes 1 | basic concepts
数据库锁表?别慌,本文教你如何解决
随机推荐
用fail2ban阻止密码尝试攻
DVWA range exercise 4
MySQL three-level distribution agent relationship storage
《预训练周刊》第52期:屏蔽视觉预训练、目标导向对话
Interviewer: what is the difference between redis expiration deletion strategy and memory obsolescence strategy?
【FAQ】华为帐号服务报错 907135701的常见原因总结和解决方法
Iptables foundation and Samba configuration examples
微服务入门
游戏启动后提示安装HMS Core,点击取消,未再次提示安装HMS Core(初始化失败返回907135003)
After the game starts, you will be prompted to install HMS core. Click Cancel, and you will not be prompted to install HMS core again (initialization failure returns 907135003)
n++也不靠谱
golang 设置goproxy代理的小细节,适用于go module下载超时,阿里云镜像go module下载超时
Runc hang causes the kubernetes node notready
runc hang 导致 Kubernetes 节点 NotReady
ArcGIS uses grid processing tools for image clipping
PostgreSQL 9.1 soaring Road
Database lock table? Don't panic, this article teaches you how to solve it
Using scrcpy projection
Dry goods sorting! How about the development trend of ERP in the manufacturing industry? It's enough to read this article
mysql三级分销代理关系存储