Can NoSQL Databases Cure Us of Software Complexity?

If you’ve worked with Apache OFBiz or opentaps 1.x, you’ve probably had moments like this:

Q: What’s the difference between internal name and product name?

A: If your company wants to maintain an internal name for products that’s different than the standard product name, then you can put it in internalName. Otherwise you should keep them the same.

Welcome to software complexity.

When we design software, we’re making choices.  Do we add features for people who need them?  Or keep them out to make things simpler for people who don’t?  As much as we’d like to keep things simple, we must create features for users, and as we add features, we add complexity.

When it comes to business software like Enterprise Resource Planning (ERP) or Customer Relationship Management (CRM), the complexity is in the database.  To support all the features, we must create hundreds of tables with thousands of fields, even though not every user will need all the fields in all the tables.  It is simply how relational databases work.

For opentaps Framework 2, though, we’ve been experimenting with the MongoDB NoSQL database as our back end.  A NoSQL database is schema free.  What this means is that we don’t have to define the fields of a table in advance.  Instead, we use whatever fields we need as we need them.  So, for the example above, if you need an internal name, then simply add them.  If you don’t, then you don’t have to deal with it.  It simply doesn’t exist.

Try the opentaps 2 Notes demo application, and you’ll see how it works:

When you add your notes, the arbitrary fields are stored when you added them, but if the note doesn’t have any fields, nothing is stored.  Also note that the your fields are stored as they are entered, not using any of the hacks you may have used with relational databases:

For more technical details, see our wiki page on MongoDB and NoSQL.

We hope that a schema-free NoSQL database can reduce complexity by eliminating unnecessary data structures, keeping software elegant without sacrificing power.  We’ll let you know as we do more with MongoDB.

3 Comments

  1. Let’s go one step further and eliminate databases completely. We can reduce complexity even more by running our businesses on Excel spreadsheets.

  2. Wouldn’t that be nice? Could you show us how to do that?

  3. Adrian, for a smaller company that could be a short to medium time solution.But when you are representing and managing a bigger company things tend to become less black and white. You would need some software and servers to manage a large amount of information like that.