MongoDB learning experience

Source: Internet
Author: User
MongoDB's learning experience in NoSQL (NotOnlySQL)-Non-relational databases, and another popular database technology. In addition to complex and bloated structured languages, you can add, delete, and perform basic operations in a few simple functions. NoSQL is like a flexible monkey, and SQL is like a big dumb. Curious about NoSQL technology, and recently browsed NoS roughly

MongoDB learning experience NoSQL (Not Only SQL)-Non-relational databases, another popular database technology. In addition to complex and bloated structured languages, you can add, delete, and perform basic operations in a few simple functions. NoSQL is like a flexible monkey, and SQL is like a big dumb. Curious about NoSQL technology, and recently browsed NoS roughly

MongoDB learning experience

NoSQL (Not Only SQL)-Non-relational database, another popular database technology. In addition to complex and bloated structured languages, you can add, delete, and perform basic operations in a few simple functions. NoSQL is like a flexible monkey, and SQL is like a big dumb.

Curious about NoSQL technology, I recently roughly browsed MongoDB, which is widely used in NoSQL. Easy to understand, quick start, and best operation experience for MongoDB. MongoDB stores data in documents and the data format is Key: Value. It is a json data, so MongoDB's syntax and functions are similar to Javascript and can drive Javascript on the server.

Summarize and summarize the basic operations of MongoDB:

1. installation:

1 sudo apt-get install prepare DB2, start: 1 sudo service mongodb start3, basic data operations: 1) connect :( connect to test database by default) 1 connecting to: mydb2) insert: (The database is composed of sets. The following creates a set of persons and inserts data into the set of persons.) 1db. person. insert ({"name": "cjp", "age": "22"}) 3) find :( every piece of data in the Set, MongoDB automatically adds a GUID, that is, "_ id") 1db. person. find () 2ordb. person. find ({"name": "cjp"}) 4) update :( the first parameter is the search condition, and the second parameter is the updated value) 1db. person. update ({"name": "cjp" },{ "name": "cxp", "age": "25"}) 5) remove :( delete all data without parameters) 1db. person. remove () 2db. person. remove ({"name": "cxp "})

The basic operations for adding, deleting, modifying, and querying MongoDB are four functions. Of course, as a representative of high-performance databases, MongoDB far does not only have this function. The index, group, and aggregation in SQL can also be implemented in MongoDB, and the efficiency will be higher.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.