Feeds

MongoDB daddy: My baby beats Google BigTable

The web is built on objects. Not tables

HP ProLiant Gen8: Integrated lifecycle automation

Get off the Table

10gen is hardly alone in splitting from MySQL's path – so-called NoSQL databases are the hype du jour – but Merriman argues that MongoDB is better suited than many to running modern day "cloud" applications because it uses a document-oriented data model. Mapping object-oriented code to a relational database is "painful work," Merriman says, and he argues that you have much the same problem with tabular NoSQL databases such as Google's proprietary BigTable, which underpins App Engine, and BigTable's open source doppelgänger, HBase

"Today, 95 per cent of the code we're writing is in an object-oriented language," he says. "We're to the point where object-oriented programming is ubiquitous enough, having a database that works well with that sort of thing is important." There are certain advantages to a tabular model – it's closer to what the average database programmer is used to – but you still have to map from objects in programs to tables.

MongoDB's document-oriented model is based on JSON, the lightweight JavaScript-based data exchange format. This setup not only plays nicely with object-oriented code, it ensures that your data is kept separate from your code. "It fits very elegantly with object-oriented programming models, but it's not too tightly coupled. If you're using Java and Python and Scala, and you're talking to Mongo in all three of those, the data is easily manipulated from all three of those," Merriman told The Register after his talk.

"JSON gives us a standards-based, language-independent way to store object-style data. So we're not storing methods. We're not storing class hierarchies. We're not storing the object 'graph' of your app. But we are storing the documents that are data of objects, including a good amount of embedding and nesting and lists. So the documents are pretty rich."

Speaking with The Register, Merriman acknowledged that MongoDB isn't the only NoSQL that uses a document-oriented model. CouchDB is the other obvious example. And he made it clear that MongoDB and other NoSQL database can't completely replace relational databases. They're not suited to complex transactions, and ad hoc queries aren't as easy. But MongoDB can scale, he says, and it can still handle ad hoc queries, and it offers strong consistency.

"We want Mongo to be a full-featured product, but it's never going to be quite as full-featured as a traditional RDMS. We're always going to leave a few things out so we can scale," Merriman says. Mongo may be suited to some tasks behind the firewall, but it is particularly suited for services in the cloud. Like the one it was originally built for. Today, MongoDB can be used in tandem with the new platform clouds from VMware (Cloud Foundry) and Red Hat (OpenShift), and there's a plug-in for the Ruby on Rails cloud from Heroku. "We want Mongo to be used in many, many platform-as-a-service stacks," Merriman says.

You can't run it with App Engine. Google's platform is necessarily tied to the company's own BigTable-based back-end infrastructure. Apparently, MongoDB owes a debt to BigTable. Merriman indicates that 10gen's distributed data–sharing setup is based on Google's famous BigTable research paper. But data sharing aside, MongoDB is very much a different animal.

With the introduction of Megastore – the high-availability layer built atop BigTable – Google's setup is closer to Mongo. "We read [Google's Megastore research paper] and we were almost laughing at the similarities," Merriman says. But mapping object-oriented code to a tabular database like BigTable, he argues, still lacks a certain elegance. And we would add that MongoDB is open source. ®

Reducing security risks from open source software

More from The Register

next story
Sysadmin Day 2014: Quick, there's still time to get the beers in
He walked over the broken glass, killed the thugs... and er... reconnected the cables*
Amazon Reveals One Weird Trick: A Loss On Almost $20bn In Sales
Investors really hate it: Share price plunge as growth SLOWS in key AWS division
US judge: YES, cops or feds so can slurp an ENTIRE Gmail account
Crooks don't have folders labelled 'drug records', opines NY beak
Auntie remains MYSTIFIED by that weekend BBC iPlayer and website outage
Still doing 'forensics' on the caching layer – Beeb digi wonk
SHOCK and AWS: The fall of Amazon's deflationary cloud
Just as Jeff Bezos did to books and CDs, Amazon's rivals are now doing to it
BlackBerry: Toss the server, mate... BES is in the CLOUD now
BlackBerry Enterprise Services takes aim at SMEs - but there's a catch
The triumph of VVOL: Everyone's jumping into bed with VMware
'Bandwagon'? Yes, we're on it and so what, say big dogs
Carbon tax repeal won't see data centre operators cut prices
Rackspace says electricity isn't a major cost, Equinix promises 'no levy'
prev story

Whitepapers

Designing a Defense for Mobile Applications
Learn about the various considerations for defending mobile applications - from the application architecture itself to the myriad testing technologies.
Implementing global e-invoicing with guaranteed legal certainty
Explaining the role local tax compliance plays in successful supply chain management and e-business and how leading global brands are addressing this.
Top 8 considerations to enable and simplify mobility
In this whitepaper learn how to successfully add mobile capabilities simply and cost effectively.
Seven Steps to Software Security
Seven practical steps you can begin to take today to secure your applications and prevent the damages a successful cyber-attack can cause.
Boost IT visibility and business value
How building a great service catalog relieves pressure points and demonstrates the value of IT service management.