MongoDB is a scalable and high-performance next-generation database. Data in MongoDB is stored as documents, so that complex relationships can be expressed in a single data object. A document may consist of the following parts: an independent basic type attribute, an embedded document, or an array of documents. This flexibility allows developers to model a large number of problems in an easy-to-manage and flexible manner, without the need to scatter data into different data tables. MongoDB has the concept of "DBRef" when data cannot be constructed into a separate document.
MongoDB is a scalable and high-performance next-generation database. Data in MongoDB is stored as documents, so that complex relationships can be expressed in a single data object. A document may consist of the following parts: an independent basic type attribute, an embedded document, or an array of documents.
This flexibility allows developers to model a large number of problems in an easy-to-manage and flexible manner, without the need to scatter data into different data tables. When data cannot be constructed into a separate document, MongoDB has the concept of "DBRef", which is a pointer from one document attribute to another.
It is flexible to retrieve and query data from MongoDB databases-you can dynamically query documents based on any attributes in the main document, document, any embedded document, or any document in the array. You can use the dot symbol to access embedded documents.
Because Ubuntu 10.04 already has the MongoDB 1.2.2 source, you can directly use apt-get to install it:
Sudo apt-get install mongodb
When installing MongoDB, the system will install many MongoDB dependent packages. After the installation is complete, run MongoDB and a prompt will be displayed:
Mongod: error while loading shared libraries: libjavasjs. so: cannot open shared object file: No such file or directory
Solution:
Sudo apt-get install xulrunner-dev
Find the libjavasjs. so file:
Find/usr/lib | grep lib1_js
You can see:
/Usr/lib/xulrunner-devel-1.9.2.8/sdk/lib/lib1_js. so
/Usr/lib/xulrunner-1.9.2.8/libw.js. so
/Usr/lib/firefox-3.6.8/libw.js. so
Link the Library:
Sudo ln-s/usr/lib/xulrunner-1.9.2.8/lib1_js. so/usr/lib
Restart the mongodb service:
Sudo service mongodb start
Check whether the service is started:
Ps aux | grep rjd
Install pymongo
Because pymongo is installed in easy_install mode, you need to install setuptools first:
Sudo apt-get install python-setuptools
After installation, run the following command:
Sudo easy_install pymongo
Related reading: Precautions for installing MongoDB in Ubuntu 10.04