Direct naar content

Relational stress in DBAs? Not necessary!

Now what’s this weird headline, you may be thinking. Relational stress? Yet it’s what I regularly encounter when I stand in front of a group of database administrators and tell them about MongoDB. Leave “the relational” for what it is, because you really need a different mindset. NoSQL? NoStress!

DBA: “Yeah, but indexes then and if I need to create a table…”
Me: “It doesn’t work with tables, it works with documents and it’s schema-less.”
DBA: “um…”

The other day I gave a workshop for about seven people and it’s always a beautiful sight to see the penny drop. It really is a different way of thinking for a while, namely. But, I always say: don’t be afraid to let go of the structure. When you move from relational databases to non-relational databases, when it’s no longer about tables, but about collections. Not rows, but documents. And certainly also in terms of managing MongoDB, for example, it takes some getting used to. But really a lot of fun and it gives a lot of freedom.

MongoDB, JSON and Java

I gave the workshop at a large financial institution, where they use Microsoft SQL Server. They also run several large Oracle instances, but MySQL is also quite in vogue. But the development department was keen to get rid of legacy and they were curious to see if MongoDB would be suitable for a converted application they were working on. The conclusion was quickly reached that MongoDB was just the right fit, since they do a lot of programming in Java. MongoDB stores data via JSON and that works one-to-one with Java. Problem free!

I then set up a complete OTAP there, a development / test / acceptance / production environment. One of the requirements – because a financial institution – was that it all had to be set up very securely. Completely sealed off. That’s why I also implemented SSL there, so MongoDB runs completely on SSL and you can’t get in without a certificate.

More applications

That the developers are very happy with MongoDB was evident when the OTAP environment was just up and running and they immediately migrated a second application over. That’s how excited they were about it, and they plan to slowly migrate more and more applications to this platform.

By the way, the platform runs on Percona Server for MongoDB, because the organization already had MySQL from that as well. And the great thing is that Percona also has a very nice open source suite for management and monitoring. You can install that just like that and it pulls the statistical data from MongoDB without any problem.

Google uses the

By now I am quite enamored with NoSQL and MongoDB in particular, that much is clear. It’s a wonderful open-source product, with a proud community. It’s not the least of companies using MongoDB, either – how about Google? UPS? Facebook, ebay, Cisco?

It’s not surprising either, because one of the great features of NoSQL is that it scales horizontally. And that’s a big difference from Oracle, for example, which scales vertically. You can make the server bigger, add more processors and expand memory; but at some point that also stops.

MongoDB, on the other hand, scales horizontally and when you come to the conclusion that “it doesn’t fit anymore,” the server gets full, you just put a server next to it (Sharding) and then you move on. So you can put down clusters of thousands of machines, if you need to. If you see that there is a spike in data supply, then you add some extra machines. If it’s no longer needed, then you take it away again. And that makes it very flexible.

A MongoDB environment is set up like this

And because it works seamlessly with Java (as well as other development languages, fear not, .NET-ters!), it is a very fast development environment. What you often see is an environment being set up without a DBA involved. A developer sets up a MongoDB server in no time – just under his desk, so to speak – and starts “playing” with it. It works!

But if you want to take it more seriously, if it all gets a bit bigger and you run into performance problems, it is of course a good idea to call in someone who knows a bit more about it.

I can recommend it to every developer and every DBA, go with it! Yes, you enter a relationship-less time, but you get such freedom in return!

Download here: