Archive for August, 2010


August 13, 2010

What problem are noSQL databases solving?

  • Ease of use, installation and maintenance
  • Schema free – yet support searching, indexing, CRUD operations
  • Support storing or multiple data formats, including large binary data
  • Small footprint
  • Scalability
  • Cost
  • High performance by way of lesser functionality and dropping

noSQL is to databases what RISC architecture are to CPU architecture. Performance and simplicity over complexity.

NoSQL style databases has often been termed non-relational databases, not surprisingly noSQL databases support relationships.  If they did not support relationships they would be of no use.  noSQL databases is a movement towards schema free databases.  They do not support implicitly support JOIN, this operation is done within application  using iteration or hookups.

Whats wrong with Relational Databases

  • Cost
  • Setup and configuration effort
  • Supervision and periodic tuning
  • Overkill for small applications and medium sized apps
  • Rigid schema, applications grow and schema soon starts getting less cleaner
  • Modifying schema is hard
  • Harder to scale
  • Most web applications geared towards search/insert
  • Normalizing data:
    • was important when storage was costly
    • Joins are costly
    • Supports data integrity where rules are strictly enforced and data is consistent
    • hard to maintain multiple levels of truth
    • Not suited for fuzzy search or non-indexed search
    • De-normalized data is better manipulated by application where rules can be customized depending upon the situation
    • De-normalized data is better approach if application only does inserts and searches
  • noSQL databases need atomicity on a single record level only

Drawbacks of noSQL databases

  • Data Integrity needs to be enforced in application
  • Duplicate and inconsistent data


  • Small footprint – mobile devices, web based apps
  • Suited for JSON/Rest based interfaces
  • Scalability
  • Performance
  • Availability
  • Infrastructure – supported in clouds, any OS
  • Fluid schema

Both these DB are disk based and document oriented Open-Source databases.  They have a rich text based administration interface

Useful Links

MongoDB Admin

MongoDB interactive shell

NoSQL Landscape




August 13, 2010
  • Scalable
  • Indexing
  • Geo-spatial indexing, finding objects by location, proximity
  • Auto Sharding (version 1.7 onwards) – scaling by division
    • Queries can be run in parallel across all shards
  • Storage – disk based, using BSON (Binary serialized JSON)
  • Supports binary large objects, images, videos
  • Database replication
    • support of replication clusters
    • Automatic fail-over
    • Master slave(s) configuration

Concepts/Terms MongoDB==Relational DB

  • Documents == records/objects
  • Collections == tables
    • A collection may have heterogeneous set of documents
    • No need to pre-define columns or fields within a collection
  • query == cursor
  • Index == indexes
  • embedding and linking == Join
  • Queries return cursor not collections (for performance reasons)
  • Drawbacks

  • No Transaction support
  • No data integrity
  • MongoDB – Installation and First Steps

    MongoDb Interactive shell – basic commands

    MongoDb Interactive shell – searching records