When does your database choice matter?.

Why your database choice matters.

When does your database choice matter?
Tomislav Simnett

Tomislav Simnett

2 min read

We recently took a project over from another developer. For one reason or another, they'd chosen what's known as a NoSQL database: MongoDB. The reasons why could be endless, and when it was chosen, it might have seemed like a good idea. It turned out not to be.


On the flip side, we've recently built a site using mongodb, probably for the same reasons that the original developer of the first project chose it - ease of development, lack of constraints, malleable schema (or complete lack of one) amongst others.


What we're saying is that it's not the database in question that's good or bad, but the database choice based on your business requirements and future possible requirements.


That first project has since been migrated in its entirety to PostgreSQL, a robust RDBMS (Relational Database Management System). We could have chosen Oracle, MySQL or MSSQL to name a few others, but we chose PostgreSQL.


Firstly, we chose it because it provides a means to query using complex relationships - the whole point of an RDBMS. MongoDB doesn't offer that, but the data our client has, and is building, is full of these complex relationships.


Secondly, PostgreSQL provides us with a few nice extras that we haven't found as capable in other systems to date, discounting the non-open-source platforms (Oracle, MSSQL). Namely, really great spatial and geographical object management by way of PostGIS, an extension to PostgreSQL (pg from here on in), and another extension called HStore, which allows arbitrary hashes of data to be stored, much like you would in a NoSQL database, and also to query on it.


All of this is a little bit technical, but the gist is this: the database you choose now could determine whether your app will need rebuilding in months or years to come. Choosing the right one isn't necessarily following what everyone else is doing, but assessing a whole range of options against your current data and data that you perceive to have in the future.


Also, this isn't a task to be decided without developer input - your developer should have experience working with a number of databases (we've used MongoDB, MySQL, MSSQL, Oracle, Neo4j, PostgreSQL, a number of the various options in the cloud, and a few others to boot) so that they can provide the right advice based on your requirement, not their skillset.


Of course, as we've proven, it is possible to migrate data between storage formats, but it's a dangerous process, and can sometimes lead to hours if not days of downtime depending on how big your schema is, and how widely it varies if you're starting with a NoSQL type database.


For this particular piece of work, the results were astounding. A query using MongoDB and some code to cobble things together used to take upwards of 40 seconds. By moving the data into PostgreSQL, we reduced that down to a couple of hundred milliseconds.


That's the difference between customers walking away bored, and you bringing them to your till.


How much capacity is your business leaving behind?

Use the calculator to estimate what slow processes, manual work and disconnected systems could really be costing you.

More posts.

View all
Four interruptions, two lost hours and the process your people shouldn’t be driving

Business

Four interruptions, two lost hours and the process your people shouldn’t be driving

Four interruptions can wipe nearly two hours from the useful part of a working day, and that’s before you count the interruption itself. Add long manual processes, routine human error, rework and stress, and you get a working environment where good people spend too much time recovering, correcting and chasing.

The answer isn’t to tell people to focus harder. It’s to design a better system, one that drives the process, preserves context, moves routine work automatically and only interrupts people when their judgement is genuinely needed.

Tomislav Simnett

Tomislav Simnett

10 min read

The approval takes five minutes. The waiting costs far more.

Business

The approval takes five minutes. The waiting costs far more.

A five-minute approval can leave work waiting for days. Once a quote, purchase, job or invoice misses its slot, the delay spreads into the rest of the process.

People switch tasks, schedules move, customers wait and cash arrives later. The decision itself may be quick, but the queue around it can cost far more than anyone realises.

Tomislav Simnett

Tomislav Simnett

9 min read

You probably don’t need a CRM; you need the work to flow properly.

Business

You probably don’t need a CRM; you need the work to flow properly.

Most growing businesses think they need a CRM, but the real problem usually sits between departments.

When sales, operations and finance all rely on different systems, spreadsheets and good people end up holding the process together by hand.

Tomislav Simnett

Tomislav Simnett

6 min read