mysqljsonrelational-databasenon-relational-database

How efficient is using JSON with MySQL? (esp. JSON_EXTRACT, JSON_MERGE..)


I am used to MSSQL, now using MySQL, and have come to a point, where it is convenient to dump a whole JSON object into a single db column, instead of hacking it away into separate ones, in a relational database fashion. Most of the time, I will just SELECT the whole object back into the app when needed, but occasionally, I will want to filter rows according to contents of the JSONs and maybe do some other operations.

Is working with JSON objects "native" to MySQL, or is it kinda hammered it, for extended usability (JSON_EXTRACT, JSON_MERGE..), while sacrificing performance, and therefore not a good way to go?


Solution

  • Its native to MySQL and works very smooth.

    Read through this example.. its pretty simple and useful

    https://scotch.io/tutorials/working-with-json-in-mysql