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.