Database – Would a NoSQL DB be more efficient than a relational DB for storing JSON objects

databasejsonnosqlrelational-database

I am using a library that returns a JSON object (as a string, but I think that's standard), and I would like to store the contents of this object into a local database.

I'm fairly fresh-faced in terms of interfacing with DBs, but I can find my way around. I was using a MySQL database to store the data, but this involved using methods to extract the fields of the raw object, and slicing and dicing.

I'm wondering if it would be more efficient to use a NoSQL solution to store the data, as it's already in the right form.

Best Answer

The decision of whether to use relational DB or non-relational (document/OO/graph) database should not be based on the representation of the data (JSON/BSON/XML/...), but on the operations you intend to preform on the data.

If you have a strict schema, and you need to execute SQL queries - You should use relational DB. Otherwise, you may consider other options.

Look here to consider your options.