当前位置:网站首页>Basic knowledge sorting of mongodb database
Basic knowledge sorting of mongodb database
2022-07-07 15:18:00 【1024 questions】
understand Mongodb Let's get to know NoSQL,NoSQL yes Not Only SQL Abbreviation . Provided by lack SQL The storage and retrieval technology of the strictly restricted model of relational database . Mainly to simplify the design 、 Horizontal expansion and finer control of data availability .NoSQL There are many technologies, such as :Redis Key value structure of 、HBase Column structure of .
Two 、MongodbMongodb It's also NoSQL A kind of . It is based on a document model that stores data objects as separate documents in a collection . Use it to provide high performance 、 High availability and automatically expanded data storage .
3、 ... and 、 aggregateMongodb Group data together by using sets . A collection is simply a set of documents with the same or similar purpose . Collections are similar to tradition SQL Table of database . It's just that collections don't enforce strict patterns , Documents in the same collection can have slightly different structures from each other .
Four 、 fileThe document is Mongodb The representation of a single data entity in a database .SQL The row data of is flat , Each value in the row has a column . stay Mongodb Documents in can contain embedded subdocuments , So as to provide a closer internal data model for applications . stay Mongodb Records representing documents in are stored as BSON, This is a JSON A lightweight binary form of . Its fields / The value corresponds to Javascript Properties and values of . At the same time MongoDB The maximum size of the document in is 16MB. This prevents RAM Overuse or severe impact on the file system .
Besides , The field name of the document cannot contain (null) character 、 Period (.) Or the dollar sign ($)._id The field name is for the object ID Reserved . The _id Field is a unique in the system ID, It consists of the following parts :
1. One 4 Byte value , Represents the number of seconds passed since the era .
2. One 3 Byte machine identifier
3. One 2 Byte process ID
4. One 3 Byte counter , Start with a random value
5、 ... and 、Mongodb data typeMongodb Each data type is assigned from 1 To 255 The integer of ID Number , You can use it to query by type .
| Double | Double precision value | 1 |
| String | character string | 2 |
| Object | object | 3 |
| Array | Array | 4 |
| Binary data | binary data | 5 |
| Object id | object ID | 7 |
| Boolean | Boolean value | 8 |
| Date | date | 9 |
| Null | Null value | 10 |
| Regular Expression | Regular expressions | 11 |
| JavaScript | Javascript | 13 |
| Symbol | Symbol | 14 |
| JavaScript(with scope) | Javascript( With scope ) | 15 |
| 32-bit intger | 32 An integer | 16 |
| Timestamp | Time stamp | 17 |
| 64-bit integer | 64 An integer | 18 |
| Min Key | minimum value | 255 |
| Max Key | Maximum | 127 |
When comparing different BSON Value of type ,Nongodb Use the following comparison order from lowest to highest :
1. Minimum key ( Internal type )
2. Null value
3. The number
4. Symbol 、 character string
5. object
6. Array
7. binary data
8. object ID
9. Boolean value
10. date , Time stamp
11. Regular expressions
12. Maximum key ( Internal type )
This is about MongoDB This is the end of the article on database basics . I hope it will be helpful for your study , I also hope you can support the software development network .
边栏推荐
猜你喜欢

Apache多个组件漏洞公开(CVE-2022-32533/CVE-2022-33980/CVE-2021-37839)

CTFshow,信息搜集:web13

Guangzhou Development Zone enables geographical indication products to help rural revitalization

【深度学习】图像超分实验:SRCNN/FSRCNN
Window环境下配置Mongodb数据库

【OBS】RTMPSockBuf_ Fill, remote host closed connection.
![[target detection] yolov5 Runtong voc2007 data set](/img/b3/b7f3d46075cb1782d772a24362003e.png)
[target detection] yolov5 Runtong voc2007 data set

Ctfshow, information collection: web2

IDA pro逆向工具寻找socket server的IP和port

【搞船日记】【Shapr3D的STL格式转Gcode】
随机推荐
Ctfshow, information collection: web5
2022全开源企业发卡网修复短网址等BUG_2022企业级多商户发卡平台源码
MySQL bit type resolution
PAT 甲级 1103 Integer Factorizatio
Yyds dry goods inventory # solve the real problem of famous enterprises: cross line
全日制研究生和非全日制研究生的区别!
Niuke real problem programming - day18
CTFshow,信息搜集:web6
Win10 or win11 taskbar, automatically hidden and transparent
【数字IC验证快速入门】26、SystemVerilog项目实践之AHB-SRAMC(6)(APB协议基本要点)
摘抄的只言片语
【深度学习】图像超分实验:SRCNN/FSRCNN
【兰州大学】考研初试复试资料分享
Lidar Knowledge Drop
Niuke real problem programming - day15
【OBS】RTMPSockBuf_ Fill, remote host closed connection.
Ctfshow, information collection: web14
Bits and Information & integer notes
CTFshow,信息搜集:web9
CTFshow,信息搜集:web5