This post was prompted by a recent AWS Podcast.  If you’ve never listened to it, and you’re as geeky as us, do it!  Well, not yet, otherwise you’ll miss all the cloud database fun we’re about to have!  Today, we’re talking about using the right database technologies for the job at hand.

What kind of database do you have?

It’s a transactional SQL database isn’t it.  That’s okay, it’s what everyone reaches for when they need a new database.  It’s what I do in a hurry too.  MySQL accounts for just over 33% of all database installations according to some analysis, because it’s fast, flexible, and for most implimentations, it’s free!

But this leads us on to our next question…

What is your database for?

To stick with our story about a MySQL database, that’s exactly the right thing for something like a small to medium sized online shop.  We want to be able to quickly write transactions like sales, but that latency isn’t super-critical.  We want to be able to report on trends and analyse relationships between sets of data in the database.  Perfect.

But what if we are also writing user session data to the database?  We record things like which pages a user visits, and we build their cart in a temporary table, which we clear down when the user checks out, or leaves our site.  Is our main transactional database the right fit for this?  More generally, if a MySQL database the right fit for this?

The right database tool for the job

If we aren’t so bothered about keeping the data and drawing long-term connections between it and our other datapoints, maybe a NoSQL database technology, such as AWS’s DynamoDB or Azure’s Cosmos DB.  In these types of NoSQL database, we can pop things into a table as quick as lightning, use it to read session states and so on, then purge it all down when we’re ready – so maybe a nightly routine.

The problem at this stage is that your developers and technology team have never worked with NoSQL before, and so they stick to what they know because it works.  And work it does, but not as efficiently as it could.  That might not be a problem right now, but what about in your busy Christmas trading period where your transactions are running slowly because of session data eating up your database’s performance.  You end up in a world where everything gets a little bit rubbish as opposed to everything being as good as it could be.

This might not seem like a big deal in this scenario, but what about in other use cases?

Trust nobody transactions

Other database technologies are more specialised, such as AWS’s Blockchain, or the equally imaginatively named, Azure Blockchain Service.  Blockchain is another way of storing, organising and reporting on data, and in that way can be thought of as another type of database.  This kind of database is particularly useful when you need to know that the data represented at this current time is absolutely correct and imuteable.

Quick-and-dirty blockchain explination time.  Each nex transaction (or more accurately, block of transactions) contains some maths which link it to the previous block of transactions.  If anyone were to change any of the data that went before, or any data in the current block, the mathmatics wouldn’t work anymore, and the blockchain would be broken.

Let’s say you have a supply chain which you don’t control, and where each entity in that supply chain needs to add records to a database when they have completed some transaction – blockchain is perfect!  If you’re using a MySQL database, or similar, your developers would need to write all kinds of front-end code to make sure that data stays intact – unless you’re using the right database technology!

Change is good

Systems grow and evolve over time.  That’s a good thing!  It shows that your system is useful, and that it is adaptable.  But make sure you and your team are just as adaptable when it comes to your technology platform.  Don’t be scared to try something new!  There’s nothing wrong with using lots of different database technologies if they’re all really good at what they do for you.

Contact us today to get help moving towards this blissful technological nirvana!