Introduce to Document-oriented Database: MongoBD.
Conception
- Document -> Collection -> Database
- Example: MongoDB (using in Web App)
- using B-Tree as storage structure
- Object Oriented Programming
- Unifying programming model and data model
- Everything is treated as object
Document
- like
json, thekey-valuepair 
- Document can be seen as
object
Collection
- a class of document
- can be seen as
class
Database
- some documents constitute a database
- usually for one application
Interface
Insert
> db.foo.insert({"bar":"bsd})
> db.foo.batchInsert([{"_id":0},{"_id":1},{"_id":2}])
Find

Delete
> db.foo.remove()
> db.mailing.list.remove({"opt-out":true})
Update

本文介绍了面向文档的数据库MongoDB的基本概念,包括其数据模型、集合与数据库的关系,并通过示例展示了如何使用B-树作为存储结构。此外,还提供了插入、查找、删除和更新等常用操作的命令实例。

被折叠的 条评论
为什么被折叠?



