NOSQL 之 Document Database 之 MongoDB

Official siste:
[url]http://www.mongodb.org/[/url]

MongoDB Manual Contents:
[url]http://docs.mongodb.org/manual/contents/[/url]

Java relates( especially Java Language Center ):
[url]http://docs.mongodb.org/ecosystem/drivers/#java[/url]

MongoDB API Docs for java:
[url]http://api.mongodb.org/java/[/url]

Spring Data MongoDB - Reference Documentation:
[url]http://static.springsource.org/spring-data/data-mongodb/docs/current/reference/html/index.html[/url]

The Little MongoDB Book: (即附件)
[url]http://openmymind.net/mongodb.pdf[/url][quote]To get started, there are six simple concepts we need to understand.
1. MongoDB has the same concept of a database with which you are likely already familiar (or a schema for you Oracle
folks). Within a MongoDB instance you can have zero or more databases, each acting as high-level containers for
everything else.
2. A database can have zero or more collections. A collection shares enough in common with a traditional table
that you can safely think of the two as the same thing.
3. Collections are made up of zero or more documents. Again, a document can safely be thought of as a row.
4. A document is made up of one or more fields, which you can probably guess are a lot like columns.
5. Indexes in MongoDB function much like their RDBMS counterparts.
6. Cursors are different than the other five concepts but they are important enough, and often overlooked, that I
think they are worthy of their own discussion. The important thing to understand about cursors is that when you
ask MongoDB for data, it returns a cursor, which we can do things to, such as counting or skipping ahead, without
actually pulling down data.[/quote]


[b]与 RDBMS 对应关系:
collection vs. table, document vs. row and field vs. column[/b]
[url]http://docs.mongodb.org/manual/reference/sql-comparison/[/url]


MongonDB Shell:

# 查看帮助;这个最有用!其他的大体都在里头
> help
# display current database
> db
# remove all documents from a collection, 注意只是删除该collection中的所有documents,并不删除该collection
> db.<collection_name>.remove()
# drop collection from the database,这个才是删除 collection,整个 collection,包括其中的 documents 和其对应的 indexes,都将被彻底删除,该 collection 在被 drop 后将不复存在
> db.<collection_name>.drop()
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值