Jonas Mayer Jonas Mayer - 1 month ago 10
Java Question

JSON ad-hoc vs NoSQ document database for a embedded desktop software in Java

I need to choose between a ad-hoc solution with JSON or pick one embedded NoSQL DB (OrientDB probably).


  • Open-Source desktop software in Java (free as beer)

  • Single connection

  • Continuous Delivery (will change)

  • Really easy client installation (copy and paste)

  • about 20,000 records

  • polyglot persistence

The problem:

  • setup NoSQL DB is hard

  • one environment build, interoperability (Linux and Windows)

  • lack of embedded Document NoSQL DB for Java

  • complexity

So JSOn ad-hoc is the right option? Some recommendation of a really embedded NoSQL database? or another approach?


Answer Source

One of the main motivations behind the development, and adoption, of NoSQL databases is the possibility to scale horizontally which is needed when your database reach a huge enough size that may require more nodes processing its operation to be more responsive.

If improve performance is the motivation one should have to move a database to a NoSQL approach when it is reaching a huge amount of data. As a side note, it is even interesting to think about the etymology behind the name of one of the most successful NoSQL databases so far, MongoDB that get the prefix "mongo" as a reference to humongous: enormous. This clearly states the purpose of such tools.

That being said, considering that in your scenario you are dealing with 20 thousands records only, you may have many other NoSQL alternatives that are easier to manage. You can go for JSON ad-hoc, or even use more tradicional, solid and stable tools like Firebird embedded or the most obvious and widely used option for embedded databases: SQLite.