Thursday, October 25, 2012

Limitations in MongoDB

I recently started exploring MongoDB for storing unstructured data. The choice to explore MongoDB first was based on statistics showing popularity of NOSQL databases where MongoDB outperform others.

The list of limitations is solely based on my exploration and may not be relevant to the most recent release or upcoming releases as they may have been taken care of

  • Does not support Join. This results into lot of denormalization. Multiple queries needed to collect information
  •  Does not support Transactions though it supports atomic updates.
  • Missing aggregate functions
  • Drivers for different languages have different behavior like the driver for Ruby does not support decimal like in Currency data type. You have to store cents in a different field.
  • Collection name cant be longer than 128 characters.
  • namespace file size is fixed to 16 MB by default which lets it store approx 24,000 namespaces. This means that the number of collection and indexes in your database cant exceed 24,000. This can be changed though.
  • Data file largest pre-allocated size is 2 GB.
  • You cannot delete individual documents from a capped collection nor can you perform any update that will increase size of document.
  • All String values must be encoded in UTF-8. There are plenty of situations where old encoding is used and issues pop-up while importing this data.
  • Issues with Datetime conversion with Ruby driver, not sure if this issue is there with other drivers as well. You cant use date classes that maintain time zone since a BSON datetime cant encode that data. There is no way to create custom BSON type.
  • BSON documents in MongoDB v2.0 are limited to 16 MB in size.

No comments: