惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
News | PayPal Newsroom
Security Archives - TechRepublic
Security Archives - TechRepublic
Hacker News: Ask HN
Hacker News: Ask HN
H
Hacker News: Front Page
Apple Machine Learning Research
Apple Machine Learning Research
TaoSecurity Blog
TaoSecurity Blog
Help Net Security
Help Net Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
V
V2EX
Hugging Face - Blog
Hugging Face - Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
人人都是产品经理
人人都是产品经理
博客园 - 三生石上(FineUI控件)
Security Latest
Security Latest
Cloudbric
Cloudbric
WordPress大学
WordPress大学
S
SegmentFault 最新的问题
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Know Your Adversary
Know Your Adversary
A
Arctic Wolf
L
LangChain Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
The GitHub Blog
The GitHub Blog
P
Proofpoint News Feed
W
WeLiveSecurity
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
M
MIT News - Artificial intelligence
Google DeepMind News
Google DeepMind News
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The Cloudflare Blog
小众软件
小众软件
NISL@THU
NISL@THU
云风的 BLOG
云风的 BLOG
P
Privacy & Cybersecurity Law Blog
S
Security @ Cisco Blogs
博客园 - 【当耐特】
I
InfoQ
Vercel News
Vercel News
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
P
Proofpoint News Feed
O
OpenAI News
Google DeepMind News
Google DeepMind News
N
News and Events Feed by Topic
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
K
Kaspersky official blog
T
Threat Research - Cisco Blogs
量子位
宝玉的分享
宝玉的分享

博客园 - chenping2008

连接远程数据库,得到数据插入本地表中 php复制目录 PHP删除目录 php统计目录大小 js秒数转换天时分秒 JS切换图片 js 游览器log的记录 2个iframe中checkbox联动 JS Clone函数 JS普通递归的改进 JS随机数的产生方法 JS相等运算符(==)和等同运算符(===) silverlight树形结构区服选择 Mongodb在Ubuntu下的安装 redis windows下使用及redis命令 相册功能 Node.js 系列翻译---console Node.js 系列翻译---概要 补充Silverlight中图片显示
Mongodb的一些基本概念
chenping2008 · 2012-04-01 · via 博客园 - chenping2008

首先推荐给各位一本mongodbde的书籍《Mongodb权威指南》,可以在网上购买纸质的书籍,可以下载电子版的书籍。

1.Mongodb的概念

Mongodb是一种强大,灵活,可扩展的数据存储方式。它扩展了关系型数据库众多有用的功能,如索引,范围查询和排序。Mongodb的功能非常的丰富,比如内置的对MapReduce式聚合的支持,以及对地理空间索引的支持。

Mongodb是面向文档的数据库,而不是关系型的数据库。

  • 文档是Mongodb中数据的基本单元,非常类似关系数据库中的行的概念;
  • 多行文档组合成了集合,Mongodb中的集合可以看做表;
  • 多个集合可以归纳在一个数据库之下;
  • 每个文档都有一个特殊的键"_id",它在文档所处的集合中是唯一的;
  • 文档的格式是BSON的,可以简单呢理解为2进制的JSON。

关于文档的结构,基本上有3种

  • {“name”:"ping","age":"29"}
  • {"age":"29",name:{"firstname":"ping","lastname":"chen"}}
  • {“name”:"ping“,"fruits":["apple","banana"]}
  • {“name”:"ping“,"pets":[{"petid":1,"level":30},{"petid":101,"level":50}]}

Mongodb中新建的值的数据类型有

null,true,false,32-int,64-int,64浮点数,”字符串“,”符号“,对象id,日期,正则表达式,代码,2进制数据,最大值i,最小值,未定义,数据,内嵌文档

够丰富吧。

 关于每个文档都有的"_id"键的值的生成格式如下:

总共长度是12个字节。