-
Notifications
You must be signed in to change notification settings - Fork 0
Persistent Storage
A database is required because....
- Non-proprietary
- Simple, zero-configuration database
- Relational makes things easy
- Previous knowledge of SQL makes that a preferable language of choice
- Simple python implementation.
A good place to start http://wiki.python.org/moin/DatabaseInterfaces
Flat-file, SQL based simple. No setup. Supports almost all SQL standard. Cons embedded into application no client-server mode
Advanced, client-server. Cons setup, not light. Supports things that are will not be needed
Dictionary type object that is persistent. Can store almost any object type easily.
Purely python, flat file. Can run embedded within an application or setup in client-server mode. Uses python expressions/regular expressions instead of SQL or other DB language. Non-relational.
NoSQL. Not used before but nice features
Currently most popular NoSQL DB. http://docs.mongodb.org/manual/core/geospatial-indexes/
High performance small read/writes are a good fit for MongoDB
flexible schemas allow - There is no predefined schema. A document structure is very simple: it follows the JSON format, and consists of a series of key-value pair.
http://docs.mongodb.org/manual/core/geospatial-indexes/
2d geospatial indexes make it possible to associate documents with locations in two-dimensional space, such as a point on a map. MongoDB interprets two-dimensional coordinates in a location field as points and can index these points in a special index type to support location-based queries. Geospatial indexes provide special geospatial query operators. For example, you can query for documents based on proximity to another location or based on inclusion in a specified region
MongoDB scales horizontally using sharding
Database administrators have relied on scale up — buying bigger servers as database load increases — rather than scale out — distributing the database across multiple hosts as load increases NoSQL databases typically use clusters of cheap commodity servers to manage the exploding data and transaction volumes, while RDBMS tends to rely on expensive proprietary servers and storage systems
- Data stored in BSON, see flexible schemas
- BSON is pretty much JSON, everyone loves JSON
None really
Created automatically on read (I think)
mongo MapWars
As there is no schema to worry about you just shove stuff in
mongo MapWars
> db.createCollection('users')
{ "ok" : 1 }
> db.users.insert({user: 'flabbyrabbit', pass: 'dog'})
> db.users.find()
{ "_id" : ObjectId("513782058da9dcc2c66ea7aa"), "user" : "flabbyrabbit", "pass" : "dog" }
http://docs.mongodb.org/ecosystem/drivers/python/
git clone git://github.com/mongodb/mongo-python-driver.git pymongo
cd pymongo/
python setup.py install
SQL rocks