`

NOSQL 之 Document Database 之 MongoDB

阅读更多

Official siste:
http://www.mongodb.org/

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

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

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

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

The Little MongoDB Book: (即附件)
http://openmymind.net/mongodb.pdf
引用
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.



与 RDBMS 对应关系:
collection vs. table, document vs. row and field vs. column

http://docs.mongodb.org/manual/reference/sql-comparison/


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()



分享到:
评论

相关推荐

    nosql之MOngoDB,java测试类,涵盖常用方法

    MongoDB是一种流行的开源、分布式NoSQL数据库系统,以其高性能、高可用性和可扩展性而备受赞誉。MongoDB采用文档型数据模型,支持JSON格式的数据存储,使得它在处理半结构化和非结构化数据时非常灵活。在这个Java...

    Big.Data.NoSQL.Architecting.MongoDB.epub

    Big Data, MongoDB not only enables the user in understanding the buzz words “Big Data” and “NoSQL”, it also delves in understanding one of the popular document-based NoSQL databases “MongoDB”....

    Pro MongoDB Development [2016]

    Pro MongoDB Development is about MongoDB, a NoSQL database based on the BSON (binary JSON) document model. The book discusses all aspects of using MongoDB in web applications: Java, PHP, Ruby, ...

    Practical MongoDB(Apress,2015)

    Architecting, Developing, and Administering MongoDB begins with a short introduction to the basics of NoSQL databases and then introduces readers to MongoDB—the leading document based NoSQL database,...

    NoSQL.Manager.for.MongoDB.Pro.3.1.0.5

    MongoDB provides users with a NoSQL document database system whose advantages are related to scalability (being capable of handling large data sets) and dynamic schema structuring, which enables you ...

    NoSql,使用Java进行连接并进行增删改查,MongoDB

    MongoDB是一种流行的NoSQL数据库,它以非关系型数据存储为特点,提供了高可用性、高性能和可扩展性。在Java开发中,我们通常使用Java驱动程序来与MongoDB进行交互,实现对数据库的增删改查操作。下面将详细介绍如何...

    mongoDB非关系型数据库安装以及使用指南

    MongoDB是NoSQL数据库的一种,不使用传统的关系型数据库表格和列结构,而是使用键值对、文档、集合和数据库的概念。 二、MongoDB安装步骤 1. 下载安装包:访问MongoDB官方网站...

    MongoDB 3 Succinctly

    MongoDB is one of the biggest players in the NoSQL database market, providing high performance, high availability, and automatic scaling. It’s an open-source document database written in C++ and ...

    spring-data使用mongodbTemplate对MongoDB进行读写操作

    这个库是Spring Data框架的一部分,旨在简化数据访问层的实现,尤其在使用NoSQL数据库如MongoDB时。MongoDBTemplate是Spring Data MongoDB的核心组件,它提供了丰富的API来执行常见的数据库操作。 首先,让我们深入...

    C# to MongoDB 增删改通用demo

    MongoDB 是一个流行的开源、非关系型数据库系统,属于 NoSQL 数据库的一种,以其灵活性、高性能和可扩展性而受到广大开发者的欢迎。C# 是 Microsoft .NET 平台上广泛使用的编程语言,拥有丰富的库支持,包括对 ...

    MongoDB Basics

    MongoDB Basics, from The Definitive Guide to MongoDB, 2E, shows you how a document-oriented database system differs from a relational database, and how to install and get started using it. You'll ...

    MongoDB for Java Developers(PACKT,2015)

    The MongoDB database is a well-recognized rising star in the NoSQL world. It is a document database that allows data persistence and enables you to query data in a nested state without any schema ...

    Mongodb 学习 PPT上课教程

    3. 模式自由: MongoDB 的每一个 Document 都包含了元数据信息,每个文档之间不强迫要求使用相同的格式。 4. 高可用性: MongoDB 支持在复制集(Replica Set)通过异步复制达到故障转移,自动恢复,集群中主服务器...

    mongodb 手册,帮助文件。

    ### MongoDB 手册知识点概述 #### 一、安装 MongoDB **1.1 安装 MongoDB on Red Hat Enterprise, CentOS, or Fedora Linux** - **环境准备**:确保系统为 Red Hat Enterprise、CentOS 或 Fedora Linux。 - **安装...

    mongodb-driver-3.9.1.zip_MongoDB

    MongoDB是一款开源、分布式、高性能的NoSQL数据库,它的出现为处理海量数据提供了新的解决方案。在Java开发中,为了能够与MongoDB进行交互,我们需要使用MongoDB的Java驱动程序,这就是"mongodb-driver-3.9.1.zip...

    Practical MongoDB 无水印破地方 0分

    MongoDB experts Navin Sabharwal and Shankatala Gupta Edward introduce readers to MongoDB – the leading document based NoSQL database, acquainting them step by step with all aspects of MongoDB....

    五、MongoDB 学习PPT

    MongoDB的核心概念包括库(database)、集合(collection)和文档(document)。库是MongoDB中数据的最高级别组织单位,类似于SQL中的数据库。集合是库中的逻辑单元,类似表,但不需要预定义模式,这意味着集合内的...

    java操作mongoDB(CRUD)

    MongoDB是一个流行的NoSQL数据库,以其灵活性、高性能和易扩展性而闻名。在Java中,我们通常使用官方提供的Java驱动程序来实现与MongoDB的通信。 首先,要进行Java连接MongoDB,你需要在项目中引入MongoDB Java驱动...

Global site tag (gtag.js) - Google Analytics