The recent study of massive data analysis, finally ran to the database, read the introduction, but really feel good.
The following are Windows installations and simple actions
First go to the official website to download:
http://www.mongodb.org/
Remember to download the corresponding version.
Extract the file into the C:\mongoDB directory.
Run: Command bar MongoDB installed into system services.
Where--dbpath is the specified database directory,--logpath specifies the log file
"C:\mongoDB\bin\mongod.exe"--dbpath "C:\yk"--service--logpath "C:\yk\log.log"
Note: This is just to build a test environment, some security issues such as account password settings, if you want to set can refer to Mongod--help parameter content to set.
Then the direct operation of Mongo.exe can be connected to the computer by default.
After the installation is ready to get started, the page provides some introductory things.
In fact, it is better to knock yourself several times.
Http://www.mongodb.org/display/DOCS/Tutorial
We can also implement the database processing in other languages, I use python3,2,
py3.2 version of the support module download:
Http://pypi.python.org/packages/3.2/p/pymongo3/pymongo3-1.9b1.win32-py3.2.exe#md5=4238649fe52459d54c76ad8a926408f9
>>> Import Pymongo
>>> connection = Pymongo. Connection ("localhost", 27017)
>>> db = connection.test
>>> db.name
' Test '
> >> db.my_collection
Collection (Database (Connection (' localhost ', 27017), ' Test '), ' my_collection ')
>>> Db.my_collection.save ({"X": Ten})
ObjectId (' 4aba15ebe23f6b53b0000000 ')
>>> db.my_ Collection.save ({"X": 8})
ObjectId (' 4aba160ee23f6b543e000000 ')
>>> db.my_collection.save ({"X":
ObjectId (' 4aba160ee23f6b543e000002 ')
>>> db.my_collection.find_one ()
{' x ': ' _id ' : ObjectId (' 4aba15ebe23f6b53b0000000 ')}
>>> for item in Db.my_collection.find ():
... Print (item["x"])
...
8
>>> db.my_collection.create_index ("x")
' x_1 ' >>> for
item in Db.my_collection.find (). Sort ("X", Pymongo. Ascending): ... Print (item["x"])
...
8
>>> [item["X"] for the item in Db.my_collection.find (). Limit (2). Skip (1)]
[8, 11]
Other people's summary of it
http://www.wentrue.net/blog/?p=772
A good Python description:
Http://blog.nosqlfan.com/html/2989.html