当前位置:网站首页>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 .
边栏推荐
- 银行需要搭建智能客服模块的中台能力,驱动全场景智能客服务升级
- Ctfshow, information collection: web13
- MongoDB数据库基础知识整理
- Qu'est - ce qu'une violation de données
- With 8 modules and 40 thinking models, you can break the shackles of thinking and meet the thinking needs of different stages and scenes of your work. Collect it quickly and learn it slowly
- 居然从408改考自命题!211华北电力大学(北京)
- Write a ten thousand word long article "CAS spin lock" to send Jay's new album to the top of the hot list
- Oracle控制文件丢失恢复归档模式方法
- 上半年晋升 P8 成功,还买了别墅!
- CTFshow,信息搜集:web8
猜你喜欢
Xiaomi's path of chip self-development
Ctfshow, information collection: web7
[make a boat diary] [shapr3d STL format to gcode]
MySQL bit类型解析
Ctfshow, information collection: web1
MySQL installation configuration 2021 in Windows Environment
CTFshow,信息搜集:web6
Niuke real problem programming - day20
[机缘参悟-40]:方向、规则、选择、努力、公平、认知、能力、行动,读3GPP 6G白皮书的五层感悟
asp. Netnba information management system VS development SQLSERVER database web structure c programming computer web page source code project detailed design
随机推荐
有一头母牛,它每年年初生一头小母牛。每头小母牛从第四个年头开始,每年年初也生一头小母牛。请编程实现在第n年的时候,共有多少头母牛?
Unity's ASE realizes cartoon flame
【OBS】RTMPSockBuf_ Fill, remote host closed connection.
CTFshow,信息搜集:web9
Novel Slot Detection: A Benchmark for Discovering Unknown Slot Types in the Dialogue System
Oracle控制文件丢失恢复归档模式方法
【數據挖掘】視覺模式挖掘:Hog特征+餘弦相似度/k-means聚類
[make a boat diary] [shapr3d STL format to gcode]
Excerpted words
[机缘参悟-40]:方向、规则、选择、努力、公平、认知、能力、行动,读3GPP 6G白皮书的五层感悟
居然从408改考自命题!211华北电力大学(北京)
Ctfshow, information collection: web6
2. Heap sort "hard to understand sort"
CTFshow,信息搜集:web10
微信小程序 01
MySQL bit type resolution
[server data recovery] a case of RAID data recovery of a brand StorageWorks server
Unity's ASE achieves full screen sand blowing effect
CTFshow,信息搜集:web12
Used by Jetson AgX Orin canfd