Why Mongo DB is revolutionary (and is this a good thing?)

NOSQL databases like MongoDB are making a big splash in the computer industry. But are they set to replace the tried and test technology of the last fifty years? 

Here is my take on it, with a bit of history thrown in.

7,000 years ago the Mesopotamians invented bookkeeping.  Since then, records were kept in ledgers: sheets of paper divided into columns.  A spreadsheet.  But on a sheet of paper. In 1890, Herman Hollerith invented the punched card and started a revolution in record-keeping.  Then commercial computers used magnetic tapes.  But cards and tapes still use fixed layouts with one record after the other. To read record six you have to read one to five first. 

Things changed in a big way in the 1960′s

Disk storage entered the world of commercial computing. The disk space was divided into files and each file divided into records. IBM invented ISAM (Indexed Sequential Access Method) which allowed the software to read the records individually or in sequence. You could also link records, so the customer number in a purchase order record, allowed you to find the customer record and add this data into the mix. 

This was formalised as the relational model in 1970 and eventually implemented in numerous database management systems such as MySQL or Oracle. Access to the data was standardised in a coding standard called SQL. But a Mesopotamian would recognise the concept. A relational table was a lot like a ledger. It had rows and columns just the same.

Seven millennia of record keeping and fifty years of the relational model are now being challenged by a new model. The generic name is NOSQL. The main system is MongoDB, but Oracle have a product as well and there are others. In a MongoDB database rows and columns have gone. Instead there are free-form records. Fields can contain a data item or can have a structure below it, even an array of indeterminant length, for example a list of invoice numbers. Each record can in theory have different data in it. 

It’s creating a big impression on the industry. I am looking at adding MongoDB to my lockdown project sudsjs.com and I will report on that later.

Benefits claimed by MongoDB

  1. Handle large volumes of data at high speed with a scale-out architecture
  2. Store unstructured, semi-structured, or structured data
  3. Enable easy updates to schemas and fields
  4. Be developer-friendly

These are pretty weak.

1. Given that people have run things like airline reservation systems with a relational database, I don’t see handling large volumes of data as an issue. When you drill down, the benefit is claimed because MongoDB is available as a cloud-based solution. This is hardly unique. To be fair though it is designed with very large databases in mind from the ground up.

2. I have never see unstructured put forward as a benefit in an IT situation before. A mechanic tells me he/she has an unstructured approach to fixing my car I am taking my car somewhere else.  

To be fair what they actually mean (I hope) is data with a complex structure.  But you can model any data in a relational way if you think about it hard enough. And often, that thinking is itself beneficial. There are of course applications that this fits, but I don't recall ever needing this capability.

3. Updating schemas (these are definitions of how the data is structured) has never been a problem with relational databases.

4. Developer-friendly - please.

So what is the big news here? 50 years of technology, several huge companies and an enormous skills-base are going to be made obsolete by a technology with some pretty feeble benefits.

But it is very cool. Anything could happen.

No comments:

Post a Comment